that implements the TGA interface (much like the VGA standard, but
older TGA adapters are *not* VGA compatible). On such systems, you
should say Y here so that the TGA driver rather than the standard
- VGA driver is used.
+ VGA driver is used. Note that, at this time, there is no X server
+ for these systems. If unsure, try N.
PCI support
CONFIG_PCI
This driver supports a frame buffer for the "platinum" graphics adapter
in some Power Macintoshes.
+PowerMac "valkyrie" frame buffer device support
+CONFIG_FB_VALKYRIE
+ This driver supports a frame buffer for the "valkyrie" graphics adapter
+ in some Power Macintoshes.
+
Chips 65550 display support
CONFIG_FB_CT65550
This is the frame buffer device driver for the Chips & Technologies
This is the frame buffer device driver for the Topcat graphics
hardware found in HP300 workstations.
-VGA chipset support (text only)
-CONFIG_FB_VGA
- This is the frame buffer device driver for generic VGA chips. This
- driver works only in text mode and is deprecated; it is preferable
- to say Y to "VGA text console" instead. For a graphical frame buffer
- device driver that works for VGA cards, say Y to "VESA VGA graphics
- console" below.
-
-TGA frame buffer support'
+TGA frame buffer support
CONFIG_FB_TGA
This is the frame buffer device driver for generic TGA graphic cards.
Say Y if you have one of those.
cards. You will get a boot time penguin logo at no additional cost.
Please read Documentation/fb/vesafb.txt. If unsure, say Y.
-MDA dual-headed support
-CONFIG_FB_MDA
+MDA text console (dual-headed)
+CONFIG_MDA_CONSOLE
Say Y here if you have an old MDA or monochrome Hercules graphics
adapter in your system acting as a second head ( = video card). You
will then be able to use two monitors with your Linux system. Do not
This driver is also available as a module ( = code which can be
inserted and removed from the running kernel whenever you want).
- The module will be called mdafb.o. If you want to compile it as
+ The module will be called mdacon.o. If you want to compile it as
a module, say M here and read Documentation/modules.txt.
If unsure, say N.
an image of the device tree that the kernel copies from Open
Firmware. If unsure, say Y here.
-Support for ATI Mach64 display cards
-CONFIG_ATY_VIDEO
- Several of the newer Power Macintoshes and clones have a video
- display interface based on the ATI Mach64 chipset. Say N here if
- you are sure you don't need this functionality, otherwise Y.
-
-Support for IMS Twin Turbo display card
-CONFIG_IMSTT_VIDEO
- Some Power Macintosh clones have an IMS Twin Turbo video display
- interface. Say Y to include support for this.
-
MESH (Power Mac internal SCSI) support
CONFIG_SCSI_MESH
Many Power Macintoshes and clones have a MESH (Macintosh Enhanced
static int __init default_ISA_polarity(int idx)
{
+#if 0
unsigned int irq = mp_irqs[idx].mpc_dstirq;
if (irq == 8)
return 1;
return ISA_ELCR(irq);
+#else
+ return 0;
+#endif
}
/*
static int __init trigger_flag_broken(int idx)
{
+#if 0
int bus = mp_irqs[idx].mpc_srcbus;
int polarity = MPBIOS_polarity(idx);
int trigger = MPBIOS_trigger(idx);
(trigger == 1) /* level */ )
return 1; /* broken */
-
+#endif
return 0;
}
continue;
mp_irqs[pos].mpc_irqtype = mp_INT;
- mp_irqs[pos].mpc_irqflag = (1 << 2) | 1; /* High-active edge */
+ mp_irqs[pos].mpc_irqflag = 0; /* default */
mp_irqs[pos].mpc_srcbus = MP_BUS_ISA;
mp_irqs[pos].mpc_srcbusirq = i;
mp_irqs[pos].mpc_dstapic = 0;
Added sanity check for <mtrr_add>/<mtrr_del> before <mtrr_init>.
Created addition queue for prior to SMP commence.
v1.23
+ 19980902 Richard Gooch <rgooch@atnf.csiro.au>
+ Ported patch to kernel 2.1.120-pre3.
+ v1.24
19980910 Richard Gooch <rgooch@atnf.csiro.au>
Removed sanity checks and addition queue: Linus prefers an OOPS.
- v1.24
+ v1.25
+ 19981001 Richard Gooch <rgooch@atnf.csiro.au>
+ Fixed harmless compiler warning in include/asm-i386/mtrr.h
+ Fixed version numbering and history for v1.23 -> v1.24.
+ v1.26
*/
#include <linux/types.h>
#include <linux/errno.h>
#include <asm/bitops.h>
#include <asm/atomic.h>
-#define MTRR_VERSION "1.24 (19980910)"
+#define MTRR_VERSION "1.26 (19981001)"
#define TRUE 1
#define FALSE 0
if (IS_ERR(filename))
goto out;
error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, ®s);
+ if (error == 0)
+ current->flags &= ~PF_DTRACE;
putname(filename);
out:
unlock_kernel();
if ((unsigned long) data > _NSIG)
goto out;
child->flags &= ~PF_TRACESYS;
+ if ((child->flags & PF_DTRACE) == 0) {
+ /* Spurious delayed TF traps may occur */
+ child->flags |= PF_DTRACE;
+ }
tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG;
put_stack_long(child, EFL_OFFSET, tmp);
child->exit_code = data;
/* Mask out spurious TF errors due to lazy TF clearing */
if (condition & DR_STEP) {
- if ((tsk->flags & PF_PTRACED) == 0)
+ /*
+ * The TF error should be masked out only if the current
+ * process is not traced and if the TRAP flag has been set
+ * previously by a tracing process (condition detected by
+ * the PF_DTRACE flag); remember that the i386 TRAP flag
+ * can be modified by the process itself in user mode,
+ * allowing programs to debug themselves without the ptrace()
+ * interface.
+ */
+ if ((tsk->flags & (PF_DTRACE|PF_PTRACED)) == PF_DTRACE)
goto clear_TF;
}
* (this will also clear the error)
*/
task = current;
- unlazy_fpu(task);
+ save_fpu(task);
task->tss.trap_no = 16;
task->tss.error_code = 0;
force_sig(SIGFPE, task);
# Note 2! The CFLAGS definition is now in the main makefile...
O_TARGET := 8xx_io.a
-O_OBJS = commproc.o uart.o enet.o
+O_OBJS = commproc.o uart.o
+ifdef CONFIG_MBX
+O_OBJS += enet.o
+endif
+ifdef CONFIG_FADS
+O_OBJS += fec.o
+endif
include $(TOPDIR)/Rules.make
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <asm/irq.h>
+#ifdef CONFIG_MBX
#include <asm/mbx.h>
+#endif
+#ifdef CONFIG_FADS
+#include <asm/fads.h>
+#endif
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/8xx_immap.h>
static void cpm_error_interrupt(void *);
void
-mbx_cpm_reset(uint host_page_addr)
+m8xx_cpm_reset(uint host_page_addr)
{
volatile immap_t *imp;
volatile cpm8xx_t *commproc;
pte_t *pte;
- imp = (immap_t *)MBX_IMAP_ADDR;
+ imp = (immap_t *)IMAP_ADDR;
commproc = (cpm8xx_t *)&imp->im_cpm;
#ifdef notdef
#endif
/* Set SDMA Bus Request priority 5.
+ * On 860T, this also enables FEC priority 6. I am not sure
+ * this is what we realy want for some applications, but the
+ * manual recommends it.
+ * Bit 25, FAM can also be set to use FEC aggressive mode (860T).
*/
imp->im_siu_conf.sc_sdcr = 1;
/* Initialize the CPM interrupt controller.
*/
- ((immap_t *)MBX_IMAP_ADDR)->im_cpic.cpic_cicr =
+ ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr =
(CICR_SCD_SCC4 | CICR_SCC_SCC3 | CICR_SCB_SCC2 | CICR_SCA_SCC1) |
((CPM_INTERRUPT/2) << 13) | CICR_HP_MASK;
- ((immap_t *)MBX_IMAP_ADDR)->im_cpic.cpic_cimr = 0;
+ ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr = 0;
/* Set our interrupt handler with the core CPU.
*/
if (request_irq(CPM_INTERRUPT, cpm_interrupt, 0, "cpm", NULL) != 0)
/* Install our own error handler.
*/
cpm_install_handler(CPMVEC_ERROR, cpm_error_interrupt, NULL);
- ((immap_t *)MBX_IMAP_ADDR)->im_cpic.cpic_cicr |= CICR_IEN;
+ ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr |= CICR_IEN;
}
/* CPM interrupt controller interrupt.
/* Get the vector by setting the ACK bit and then reading
* the register.
*/
- ((volatile immap_t *)MBX_IMAP_ADDR)->im_cpic.cpic_civr = 1;
- vec = ((volatile immap_t *)MBX_IMAP_ADDR)->im_cpic.cpic_civr;
+ ((volatile immap_t *)IMAP_ADDR)->im_cpic.cpic_civr = 1;
+ vec = ((volatile immap_t *)IMAP_ADDR)->im_cpic.cpic_civr;
vec >>= 11;
if (cpm_vecs[vec].handler != 0)
(*cpm_vecs[vec].handler)(cpm_vecs[vec].dev_id);
else
- ((immap_t *)MBX_IMAP_ADDR)->im_cpic.cpic_cimr &= ~(1 << vec);
+ ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr &= ~(1 << vec);
/* After servicing the interrupt, we have to remove the status
* indicator.
*/
- ((immap_t *)MBX_IMAP_ADDR)->im_cpic.cpic_cisr |= (1 << vec);
+ ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cisr |= (1 << vec);
}
(uint)handler, (uint)cpm_vecs[vec].handler);
cpm_vecs[vec].handler = handler;
cpm_vecs[vec].dev_id = dev_id;
- ((immap_t *)MBX_IMAP_ADDR)->im_cpic.cpic_cimr |= (1 << vec);
+ ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr |= (1 << vec);
}
/* Allocate some memory from the dual ported ram. We may want to
* citizen.
*/
uint
-mbx_cpm_dpalloc(uint size)
+m8xx_cpm_dpalloc(uint size)
{
uint retloc;
* UART "fifos" and the like.
*/
uint
-mbx_cpm_hostalloc(uint size)
+m8xx_cpm_hostalloc(uint size)
{
uint retloc;
/* Set a baud rate generator. This needs lots of work. There are
* four BRGs, any of which can be wired to any channel.
* The internal baud rate clock is the system clock divided by 16.
- * I need to find a way to get this system clock frequency, which is
- * part of the VPD.......
+ * This assumes the baudrate is 16x oversampled by the uart.
*/
-#define BRG_INT_CLK (40000000/16)
+#define BRG_INT_CLK (((bd_t *)res)->bi_intfreq * 1000000)
+#define BRG_UART_CLK (BRG_INT_CLK/16)
void
-mbx_cpm_setbrg(uint brg, uint rate)
+m8xx_cpm_setbrg(uint brg, uint rate)
{
volatile uint *bp;
*/
bp = (uint *)&cpmp->cp_brgc1;
bp += brg;
- *bp = ((BRG_INT_CLK / rate) << 1) | CPM_BRG_EN;
+ *bp = ((BRG_UART_CLK / rate) << 1) | CPM_BRG_EN;
}
+
* and dual port ram.
*/
extern cpm8xx_t *cpmp; /* Pointer to comm processor */
-uint mbx_cpm_dpalloc(uint size);
-uint mbx_cpm_hostalloc(uint size);
-void mbx_cpm_setbrg(uint brg, uint rate);
+uint m8xx_cpm_dpalloc(uint size);
+uint m8xx_cpm_hostalloc(uint size);
+void m8xx_cpm_setbrg(uint brg, uint rate);
/* Buffer descriptors used by many of the CPM protocols.
*/
#define BD_SC_OV ((ushort)0x0002) /* Overrun */
#define BD_SC_CD ((ushort)0x0001) /* ?? */
-/* Define enough so I can at least use the MBX serial port as a UART.
- * The MBX uses SMC1 as the host serial port.
+/* Parameter RAM offsets.
+*/
+#define PROFF_SCC1 ((uint)0x0000)
+#define PROFF_SCC2 ((uint)0x0100)
+#define PROFF_SCC3 ((uint)0x0200)
+#define PROFF_SMC1 ((uint)0x0280)
+#define PROFF_SCC4 ((uint)0x0300)
+#define PROFF_SMC2 ((uint)0x0380)
+
+/* Define enough so I can at least use the serial port as a UART.
*/
typedef struct smc_uart {
ushort smc_rbase; /* Rx Buffer descriptor base address */
ushort smc_rmask; /* Temporary bit mask */
} smc_uart_t;
-#define PROFF_SMC1 ((uint)0x0280) /* Offset in Parameter RAM */
-#define PROFF_SMC2 ((uint)0x0380)
-
/* Function code bits.
*/
#define SMC_EB ((u_char)0x10) /* Set big endian byte order */
/* SMC Event and Mask register.
*/
#define SMCM_TXE ((unsigned char)0x10)
-#define SMCM_BSY ((unsigned char)0x14)
+#define SMCM_BSY ((unsigned char)0x04)
#define SMCM_TX ((unsigned char)0x02)
#define SMCM_RX ((unsigned char)0x01)
#define SCC_TODR_TOD ((ushort)0x8000)
+/* SCC Event and Mask register.
+*/
+#define SCCM_TXE ((unsigned char)0x10)
+#define SCCM_BSY ((unsigned char)0x04)
+#define SCCM_TX ((unsigned char)0x02)
+#define SCCM_RX ((unsigned char)0x01)
+
typedef struct scc_param {
ushort scc_rbase; /* Rx Buffer descriptor base address */
ushort scc_tbase; /* Tx Buffer descriptor base address */
ushort sen_taddrl; /* temp address (LSB) */
} scc_enet_t;
-#define PROFF_SCC1 ((uint)0x0000) /* Offset in Parameter RAM */
-
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use. The TCLK and RCLK seem unique
* to the MBX860 board. Any two of the four available clocks could be
#define BD_ENET_TX_CSL ((ushort)0x0001)
#define BD_ENET_TX_STATS ((ushort)0x03ff) /* All status bits */
+/* SCC as UART
+*/
+typedef struct scc_uart {
+ sccp_t scc_genscc;
+ uint scc_res1; /* Reserved */
+ uint scc_res2; /* Reserved */
+ ushort scc_maxidl; /* Maximum idle chars */
+ ushort scc_idlc; /* temp idle counter */
+ ushort scc_brkcr; /* Break count register */
+ ushort scc_parec; /* receive parity error counter */
+ ushort scc_frmec; /* receive framing error counter */
+ ushort scc_nosec; /* receive noise counter */
+ ushort scc_brkec; /* receive break condition counter */
+ ushort scc_brkln; /* last received break length */
+ ushort scc_uaddr1; /* UART address character 1 */
+ ushort scc_uaddr2; /* UART address character 2 */
+ ushort scc_rtemp; /* Temp storage */
+ ushort scc_toseq; /* Transmit out of sequence char */
+ ushort scc_char1; /* control character 1 */
+ ushort scc_char2; /* control character 2 */
+ ushort scc_char3; /* control character 3 */
+ ushort scc_char4; /* control character 4 */
+ ushort scc_char5; /* control character 5 */
+ ushort scc_char6; /* control character 6 */
+ ushort scc_char7; /* control character 7 */
+ ushort scc_char8; /* control character 8 */
+ ushort scc_rccm; /* receive control character mask */
+ ushort scc_rccr; /* receive control character register */
+ ushort scc_rlbc; /* receive last break character */
+} scc_uart_t;
+
/* SCC Event and Mask registers when it is used as a UART.
*/
#define UART_SCCM_GLR ((ushort)0x1000)
#define UART_SCCM_TX ((ushort)0x0002)
#define UART_SCCM_RX ((ushort)0x0001)
+/* The SCC PMSR when used as a UART.
+*/
+#define SCU_PMSR_FLC ((ushort)0x8000)
+#define SCU_PMSR_SL ((ushort)0x4000)
+#define SCU_PMSR_CL ((ushort)0x3000)
+#define SCU_PMSR_UM ((ushort)0x0c00)
+#define SCU_PMSR_FRZ ((ushort)0x0200)
+#define SCU_PMSR_RZS ((ushort)0x0100)
+#define SCU_PMSR_SYN ((ushort)0x0080)
+#define SCU_PMSR_DRT ((ushort)0x0040)
+#define SCU_PMSR_PEN ((ushort)0x0010)
+#define SCU_PMSR_RPM ((ushort)0x000c)
+#define SCU_PMSR_REVP ((ushort)0x0008)
+#define SCU_PMSR_TPM ((ushort)0x0003)
+#define SCU_PMSR_TEVP ((ushort)0x0003)
+
+/* CPM Transparent mode SCC.
+ */
+typedef struct scc_trans {
+ sccp_t st_genscc;
+ uint st_cpres; /* Preset CRC */
+ uint st_cmask; /* Constant mask for CRC */
+} scc_trans_t;
+
/* CPM interrupts. There are nearly 32 interrupts generated by CPM
* channels or devices. All of these are presented to the PPC core
* as a single interrupt. The CPM interrupt handler dispatches its
*/
/* The number of Tx and Rx buffers. These are allocated from the page
- * pool. The code may assume these are power of two, so it it best
+ * pool. The code may assume these are power of two, so it is best
* to keep them that size.
* We don't need to allocate pages for the transmitter. We just use
* the skbuffer directly.
--- /dev/null
+/*
+ * Fast Ethernet Controller (FECC) driver for Motorola MPC8xx.
+ * Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
+ *
+ * This version of the driver is specific to the FADS implementation,
+ * since the board contains control registers external to the processor
+ * for the control of the LevelOne LXT970 transceiver. The MPC860T manual
+ * describes connections using the internal parallel port I/O, which
+ * is basically all of Port D.
+ *
+ * Right now, I am very watseful with the buffers. I allocate memory
+ * pages and then divide them into 2K frame buffers. This way I know I
+ * have buffers large enough to hold one frame within one buffer descriptor.
+ * Once I get this working, I will use 64 or 128 byte CPM buffers, which
+ * will be much more memory efficient and will easily handle lots of
+ * small packets.
+ *
+ */
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/string.h>
+#include <linux/ptrace.h>
+#include <linux/errno.h>
+#include <linux/ioport.h>
+#include <linux/malloc.h>
+#include <linux/interrupt.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+
+#include <asm/8xx_immap.h>
+#include <asm/pgtable.h>
+#include <asm/fads.h>
+#include <asm/irq.h>
+#include <asm/bitops.h>
+#include <asm/uaccess.h>
+#include "commproc.h"
+
+/* The number of Tx and Rx buffers. These are allocated from the page
+ * pool. The code may assume these are power of two, so it it best
+ * to keep them that size.
+ * We don't need to allocate pages for the transmitter. We just use
+ * the skbuffer directly.
+ */
+#if 1
+#define FEC_ENET_RX_PAGES 4
+#define FEC_ENET_RX_FRSIZE 2048
+#define FEC_ENET_RX_FRPPG (PAGE_SIZE / FEC_ENET_RX_FRSIZE)
+#define RX_RING_SIZE (FEC_ENET_RX_FRPPG * FEC_ENET_RX_PAGES)
+#define TX_RING_SIZE 8 /* Must be power of two */
+#define TX_RING_MOD_MASK 7 /* for this to work */
+#else
+#define FEC_ENET_RX_PAGES 16
+#define FEC_ENET_RX_FRSIZE 2048
+#define FEC_ENET_RX_FRPPG (PAGE_SIZE / FEC_ENET_RX_FRSIZE)
+#define RX_RING_SIZE (FEC_ENET_RX_FRPPG * FEC_ENET_RX_PAGES)
+#define TX_RING_SIZE 16 /* Must be power of two */
+#define TX_RING_MOD_MASK 15 /* for this to work */
+#endif
+
+/* Interrupt events/masks.
+*/
+#define FEC_ENET_HBERR ((uint)0x80000000) /* Heartbeat error */
+#define FEC_ENET_BABR ((uint)0x40000000) /* Babbling receiver */
+#define FEC_ENET_BABT ((uint)0x20000000) /* Babbling transmitter */
+#define FEC_ENET_GRA ((uint)0x10000000) /* Graceful stop complete */
+#define FEC_ENET_TXF ((uint)0x08000000) /* Full frame transmitted */
+#define FEC_ENET_TXB ((uint)0x04000000) /* A buffer was transmitted */
+#define FEC_ENET_RXF ((uint)0x02000000) /* Full frame received */
+#define FEC_ENET_RXB ((uint)0x01000000) /* A buffer was received */
+#define FEC_ENET_MII ((uint)0x00800000) /* MII interrupt */
+#define FEC_ENET_EBERR ((uint)0x00400000) /* SDMA bus error */
+
+/* The FEC stores dest/src/type, data, and checksum for receive packets.
+ */
+#define PKT_MAXBUF_SIZE 1518
+#define PKT_MINBUF_SIZE 64
+#define PKT_MAXBLR_SIZE 1520
+
+/* The FEC buffer descriptors track the ring buffers. The rx_bd_base and
+ * tx_bd_base always point to the base of the buffer descriptors. The
+ * cur_rx and cur_tx point to the currently available buffer.
+ * The dirty_tx tracks the current buffer that is being sent by the
+ * controller. The cur_tx and dirty_tx are equal under both completely
+ * empty and completely full conditions. The empty/ready indicator in
+ * the buffer descriptor determines the actual condition.
+ */
+struct fec_enet_private {
+ /* The saved address of a sent-in-place packet/buffer, for skfree(). */
+ struct sk_buff* tx_skbuff[TX_RING_SIZE];
+ ushort skb_cur;
+ ushort skb_dirty;
+
+ /* CPM dual port RAM relative addresses.
+ */
+ cbd_t *rx_bd_base; /* Address of Rx and Tx buffers. */
+ cbd_t *tx_bd_base;
+ cbd_t *cur_rx, *cur_tx; /* The next free ring entry */
+ cbd_t *dirty_tx; /* The ring entries to be free()ed. */
+ scc_t *sccp;
+ struct net_device_stats stats;
+ char tx_full;
+ unsigned long lock;
+};
+
+static int fec_enet_open(struct device *dev);
+static int fec_enet_start_xmit(struct sk_buff *skb, struct device *dev);
+static int fec_enet_rx(struct device *dev);
+static void fec_enet_mii(struct device *dev);
+static void fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs);
+static int fec_enet_close(struct device *dev);
+static struct net_device_stats *fec_enet_get_stats(struct device *dev);
+static void set_multicast_list(struct device *dev);
+
+static ushort my_enet_addr[] = { 0x0800, 0x3e26, 0x1559 };
+
+/* MII processing. We keep this as simple as possible. Requests are
+ * placed on the list (if there is room). When the request is finished
+ * by the MII, an optional function may be called.
+ */
+typedef struct mii_list {
+ uint mii_regval;
+ void (*mii_func)(uint val);
+ struct mii_list *mii_next;
+} mii_list_t;
+
+#define NMII 10
+mii_list_t mii_cmds[NMII];
+mii_list_t *mii_free;
+mii_list_t *mii_head;
+mii_list_t *mii_tail;
+
+static int mii_queue(int request, void (*func)(int));
+
+/* Make MII read/write commands for the FEC.
+*/
+#define mk_mii_read(REG) (0x60020000 | ((REG & 0x1f) << 18))
+#define mk_mii_write(REG, VAL) (0x50020000 | ((REG & 0x1f) << 18) | \
+ (VAL & 0xffff))
+
+static int
+fec_enet_open(struct device *dev)
+{
+
+ /* I should reset the ring buffers here, but I don't yet know
+ * a simple way to do that.
+ */
+
+ dev->tbusy = 0;
+ dev->interrupt = 0;
+ dev->start = 1;
+
+ return 0; /* Always succeed */
+}
+
+static int
+fec_enet_start_xmit(struct sk_buff *skb, struct device *dev)
+{
+ struct fec_enet_private *fep = (struct fec_enet_private *)dev->priv;
+ volatile cbd_t *bdp;
+ unsigned long flags;
+
+ /* Transmitter timeout, serious problems. */
+ if (dev->tbusy) {
+ int tickssofar = jiffies - dev->trans_start;
+ if (tickssofar < 20)
+ return 1;
+ printk("%s: transmit timed out.\n", dev->name);
+ fep->stats.tx_errors++;
+#ifndef final_version
+ {
+ int i;
+ cbd_t *bdp;
+ printk(" Ring data dump: cur_tx %x%s cur_rx %x.\n",
+ fep->cur_tx, fep->tx_full ? " (full)" : "",
+ fep->cur_rx);
+ bdp = fep->tx_bd_base;
+ for (i = 0 ; i < TX_RING_SIZE; i++)
+ printk("%04x %04x %08x\n",
+ bdp->cbd_sc,
+ bdp->cbd_datlen,
+ bdp->cbd_bufaddr);
+ bdp = fep->rx_bd_base;
+ for (i = 0 ; i < RX_RING_SIZE; i++)
+ printk("%04x %04x %08x\n",
+ bdp->cbd_sc,
+ bdp->cbd_datlen,
+ bdp->cbd_bufaddr);
+ }
+#endif
+
+ dev->tbusy=0;
+ dev->trans_start = jiffies;
+
+ return 0;
+ }
+
+ /* Block a timer-based transmit from overlapping. This could better be
+ done with atomic_swap(1, dev->tbusy), but set_bit() works as well. */
+ if (test_and_set_bit(0, (void*)&dev->tbusy) != 0) {
+ printk("%s: Transmitter access conflict.\n", dev->name);
+ return 1;
+ }
+
+ if (test_and_set_bit(0, (void*)&fep->lock) != 0) {
+ printk("%s: tx queue lock!.\n", dev->name);
+ /* don't clear dev->tbusy flag. */
+ return 1;
+ }
+
+ /* Fill in a Tx ring entry */
+ bdp = fep->cur_tx;
+
+#ifndef final_version
+ if (bdp->cbd_sc & BD_ENET_TX_READY) {
+ /* Ooops. All transmit buffers are full. Bail out.
+ * This should not happen, since dev->tbusy should be set.
+ */
+ printk("%s: tx queue full!.\n", dev->name);
+ fep->lock = 0;
+ return 1;
+ }
+#endif
+
+ /* Clear all of the status flags.
+ */
+ bdp->cbd_sc &= ~BD_ENET_TX_STATS;
+
+ /* Set buffer length and buffer pointer.
+ */
+ bdp->cbd_bufaddr = __pa(skb->data);
+ bdp->cbd_datlen = skb->len;
+
+ /* Save skb pointer.
+ */
+ fep->tx_skbuff[fep->skb_cur] = skb;
+
+ fep->stats.tx_bytes += skb->len;
+ fep->skb_cur = (fep->skb_cur+1) & TX_RING_MOD_MASK;
+
+ /* Push the data cache so the CPM does not get stale memory
+ * data.
+ */
+ /*flush_dcache_range(skb->data, skb->data + skb->len);*/
+
+ /* Send it on its way. Tell CPM its ready, interrupt when done,
+ * its the last BD of the frame, and to put the CRC on the end.
+ */
+ save_flags(flags);
+ cli();
+
+ bdp->cbd_sc |= (BD_ENET_TX_READY | BD_ENET_TX_INTR | BD_ENET_TX_LAST | BD_ENET_TX_TC);
+
+ dev->trans_start = jiffies;
+ (&(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec))->fec_x_des_active = 0x01000000;
+
+ /* If this was the last BD in the ring, start at the beginning again.
+ */
+ if (bdp->cbd_sc & BD_ENET_TX_WRAP)
+ bdp = fep->tx_bd_base;
+ else
+ bdp++;
+
+ fep->lock = 0;
+ if (bdp->cbd_sc & BD_ENET_TX_READY)
+ fep->tx_full = 1;
+ else
+ dev->tbusy=0;
+ restore_flags(flags);
+
+ fep->cur_tx = (cbd_t *)bdp;
+
+ return 0;
+}
+
+/* The interrupt handler.
+ * This is called from the MPC core interrupt.
+ */
+static void
+fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
+{
+ struct device *dev = dev_id;
+ struct fec_enet_private *fep;
+ volatile cbd_t *bdp;
+ volatile fec_t *ep;
+ uint int_events;
+ int c=0;
+
+ fep = (struct fec_enet_private *)dev->priv;
+ ep = &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec);
+ if (dev->interrupt)
+ printk("%s: Re-entering the interrupt handler.\n", dev->name);
+ dev->interrupt = 1;
+
+ /* Get the interrupt events that caused us to be here.
+ */
+ while ((int_events = ep->fec_ievent) != 0) {
+ ep->fec_ievent = int_events;
+ if ((int_events &
+ (FEC_ENET_HBERR | FEC_ENET_BABR |
+ FEC_ENET_BABT | FEC_ENET_EBERR)) != 0)
+ printk("FEC ERROR %x\n", int_events);
+
+ /* Handle receive event in its own function.
+ */
+ if (int_events & (FEC_ENET_RXF | FEC_ENET_RXB))
+ fec_enet_rx(dev_id);
+
+ /* Transmit OK, or non-fatal error. Update the buffer descriptors.
+ * FEC handles all errors, we just discover them as part of the
+ * transmit process.
+ */
+ if (int_events & (FEC_ENET_TXF | FEC_ENET_TXB)) {
+ bdp = fep->dirty_tx;
+ while ((bdp->cbd_sc&BD_ENET_TX_READY)==0) {
+#if 1
+ if (bdp==fep->cur_tx)
+ break;
+#endif
+ if (++c>1) {/*we go here when an it has been lost*/};
+
+
+ if (bdp->cbd_sc & BD_ENET_TX_HB) /* No heartbeat */
+ fep->stats.tx_heartbeat_errors++;
+ if (bdp->cbd_sc & BD_ENET_TX_LC) /* Late collision */
+ fep->stats.tx_window_errors++;
+ if (bdp->cbd_sc & BD_ENET_TX_RL) /* Retrans limit */
+ fep->stats.tx_aborted_errors++;
+ if (bdp->cbd_sc & BD_ENET_TX_UN) /* Underrun */
+ fep->stats.tx_fifo_errors++;
+ if (bdp->cbd_sc & BD_ENET_TX_CSL) /* Carrier lost */
+ fep->stats.tx_carrier_errors++;
+
+ fep->stats.tx_errors++;
+
+ fep->stats.tx_packets++;
+
+#ifndef final_version
+ if (bdp->cbd_sc & BD_ENET_TX_READY)
+ printk("HEY! Enet xmit interrupt and TX_READY.\n");
+#endif
+ /* Deferred means some collisions occurred during transmit,
+ * but we eventually sent the packet OK.
+ */
+ if (bdp->cbd_sc & BD_ENET_TX_DEF)
+ fep->stats.collisions++;
+
+ /* Free the sk buffer associated with this last transmit.
+ */
+ dev_kfree_skb(fep->tx_skbuff[fep->skb_dirty]/*, FREE_WRITE*/);
+ fep->skb_dirty = (fep->skb_dirty + 1) & TX_RING_MOD_MASK;
+
+ /* Update pointer to next buffer descriptor to be transmitted.
+ */
+ if (bdp->cbd_sc & BD_ENET_TX_WRAP)
+ bdp = fep->tx_bd_base;
+ else
+ bdp++;
+
+ /* Since we have freed up a buffer, the ring is no longer
+ * full.
+ */
+ if (fep->tx_full && dev->tbusy) {
+ fep->tx_full = 0;
+ dev->tbusy = 0;
+ mark_bh(NET_BH);
+ }
+
+ fep->dirty_tx = (cbd_t *)bdp;
+#if 0
+ if (bdp==fep->cur_tx)
+ break;
+#endif
+ }/*while (bdp->cbd_sc&BD_ENET_TX_READY)==0*/
+ } /* if tx events */
+
+ if (int_events & FEC_ENET_MII)
+ fec_enet_mii(dev_id);
+
+ } /* while any events */
+
+ dev->interrupt = 0;
+
+ return;
+}
+
+/* During a receive, the cur_rx points to the current incoming buffer.
+ * When we update through the ring, if the next incoming buffer has
+ * not been given to the system, we just set the empty indicator,
+ * effectively tossing the packet.
+ */
+static int
+fec_enet_rx(struct device *dev)
+{
+ struct fec_enet_private *fep;
+ volatile cbd_t *bdp;
+ struct sk_buff *skb;
+ ushort pkt_len;
+ volatile fec_t *ep;
+
+ fep = (struct fec_enet_private *)dev->priv;
+ ep = &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec);
+
+ /* First, grab all of the stats for the incoming packet.
+ * These get messed up if we get called due to a busy condition.
+ */
+ bdp = fep->cur_rx;
+
+for (;;) {
+ if (bdp->cbd_sc & BD_ENET_RX_EMPTY)
+ break;
+
+#ifndef final_version
+ /* Since we have allocated space to hold a complete frame,
+ * the last indicator should be set.
+ */
+ if ((bdp->cbd_sc & BD_ENET_RX_LAST) == 0)
+ printk("FEC ENET: rcv is not +last\n");
+#endif
+
+ /* Frame too long or too short.
+ */
+ if (bdp->cbd_sc & (BD_ENET_RX_LG | BD_ENET_RX_SH))
+ fep->stats.rx_length_errors++;
+ if (bdp->cbd_sc & BD_ENET_RX_NO) /* Frame alignment */
+ fep->stats.rx_frame_errors++;
+ if (bdp->cbd_sc & BD_ENET_RX_CR) /* CRC Error */
+ fep->stats.rx_crc_errors++;
+ if (bdp->cbd_sc & BD_ENET_RX_OV) /* FIFO overrun */
+ fep->stats.rx_crc_errors++;
+
+ /* Report late collisions as a frame error.
+ * On this error, the BD is closed, but we don't know what we
+ * have in the buffer. So, just drop this frame on the floor.
+ */
+ if (bdp->cbd_sc & BD_ENET_RX_CL) {
+ fep->stats.rx_frame_errors++;
+ }
+ else {
+
+ /* Process the incoming frame.
+ */
+ fep->stats.rx_packets++;
+ pkt_len = bdp->cbd_datlen;
+ fep->stats.rx_bytes += pkt_len;
+
+ /* This does 16 byte alignment, exactly what we need.
+ */
+ skb = dev_alloc_skb(pkt_len);
+
+ if (skb == NULL) {
+ printk("%s: Memory squeeze, dropping packet.\n", dev->name);
+ fep->stats.rx_dropped++;
+ }
+ else {
+ skb->dev = dev;
+ skb_put(skb,pkt_len); /* Make room */
+ eth_copy_and_sum(skb,
+ (unsigned char *)__va(bdp->cbd_bufaddr),
+ pkt_len, 0);
+ skb->protocol=eth_type_trans(skb,dev);
+ netif_rx(skb);
+ }
+ }
+
+ /* Clear the status flags for this buffer.
+ */
+ bdp->cbd_sc &= ~BD_ENET_RX_STATS;
+
+ /* Mark the buffer empty.
+ */
+ bdp->cbd_sc |= BD_ENET_RX_EMPTY;
+
+ /* Update BD pointer to next entry.
+ */
+ if (bdp->cbd_sc & BD_ENET_RX_WRAP)
+ bdp = fep->rx_bd_base;
+ else
+ bdp++;
+
+#if 1
+ /* Doing this here will keep the FEC running while we process
+ * incoming frames. On a heavily loaded network, we should be
+ * able to keep up at the expense of system resources.
+ */
+ ep->fec_r_des_active = 0x01000000;
+#endif
+ }
+ fep->cur_rx = (cbd_t *)bdp;
+
+#if 0
+ /* Doing this here will allow us to process all frames in the
+ * ring before the FEC is allowed to put more there. On a heavily
+ * loaded network, some frames may be lost. Unfortunately, this
+ * increases the interrupt overhead since we can potentially work
+ * our way back to the interrupt return only to come right back
+ * here.
+ */
+ ep->fec_r_des_active = 0x01000000;
+#endif
+
+ return 0;
+}
+
+static void
+fec_enet_mii(struct device *dev)
+{
+ struct fec_enet_private *fep;
+ volatile fec_t *ep;
+ mii_list_t *mip;
+ uint mii_reg;
+
+ fep = (struct fec_enet_private *)dev->priv;
+ ep = &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec);
+ mii_reg = ep->fec_mii_data;
+
+ if ((mip = mii_head) == NULL) {
+ printk("MII and no head!\n");
+ return;
+ }
+
+ if (mip->mii_func != NULL)
+ (*(mip->mii_func))(mii_reg);
+
+ mii_head = mip->mii_next;
+ mip->mii_next = mii_free;
+ mii_free = mip;
+
+ if ((mip = mii_head) != NULL)
+ ep->fec_mii_data = mip->mii_regval;
+}
+
+static int
+mii_queue(int regval, void (*func)(int))
+{
+ unsigned long flags;
+ mii_list_t *mip;
+ int retval;
+
+ retval = 0;
+
+ save_flags(flags);
+ cli();
+
+ if ((mip = mii_free) != NULL) {
+ mii_free = mip->mii_next;
+ mip->mii_regval = regval;
+ mip->mii_func = func;
+ mip->mii_next = NULL;
+ if (mii_head) {
+ mii_tail->mii_next = mip;
+ mii_tail = mip;
+ }
+ else {
+ mii_head = mii_tail = mip;
+ (&(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec))->fec_mii_data = regval;
+ }
+ }
+ else {
+ retval = 1;
+ }
+
+ restore_flags(flags);
+
+ return(retval);
+}
+
+static void
+mii_status(uint mii_reg)
+{
+ if (((mii_reg >> 18) & 0x1f) == 1) {
+ /* status register.
+ */
+ printk("fec: ");
+ if (mii_reg & 0x0004)
+ printk("link up");
+ else
+ printk("link down");
+
+ if (mii_reg & 0x0010)
+ printk(",remote fault");
+ if (mii_reg & 0x0020)
+ printk(",auto complete");
+ printk("\n");
+ }
+ if (((mii_reg >> 18) & 0x1f) == 0x14) {
+ /* Extended chip status register.
+ */
+ printk("fec: ");
+ if (mii_reg & 0x0800)
+ printk("100 Mbps");
+ else
+ printk("10 Mbps");
+
+ if (mii_reg & 0x1000)
+ printk(", Full-Duplex\n");
+ else
+ printk(", Half-Duplex\n");
+ }
+}
+
+static void
+mii_startup_cmds(void)
+{
+
+ /* Read status registers to clear any pending interrupt.
+ */
+ mii_queue(mk_mii_read(1), mii_status);
+ mii_queue(mk_mii_read(18), mii_status);
+
+ /* Read extended chip status register.
+ */
+ mii_queue(mk_mii_read(0x14), mii_status);
+
+ /* Enable Link status change interrupts.
+ mii_queue(mk_mii_write(0x11, 0x0002), NULL);
+ */
+}
+
+/* This supports the mii_link interrupt below.
+ * We should get called three times. Once for register 1, once for
+ * register 18, and once for register 20.
+ */
+static uint mii_saved_reg1;
+
+static void
+mii_relink(uint mii_reg)
+{
+ if (((mii_reg >> 18) & 0x1f) == 1) {
+ /* Just save the status register and get out.
+ */
+ mii_saved_reg1 = mii_reg;
+ return;
+ }
+ if (((mii_reg >> 18) & 0x1f) == 18) {
+ /* Not much here, but has to be read to clear the
+ * interrupt condition.
+ */
+ if ((mii_reg & 0x8000) == 0)
+ printk("fec: re-link and no IRQ?\n");
+ if ((mii_reg & 0x4000) == 0)
+ printk("fec: no PHY power?\n");
+ }
+ if (((mii_reg >> 18) & 0x1f) == 20) {
+ /* Extended chip status register.
+ * OK, now we have it all, so figure out what is going on.
+ */
+ printk("fec: ");
+ if (mii_saved_reg1 & 0x0004)
+ printk("link up");
+ else
+ printk("link down");
+
+ if (mii_saved_reg1 & 0x0010)
+ printk(", remote fault");
+ if (mii_saved_reg1 & 0x0020)
+ printk(", auto complete");
+
+ if (mii_reg & 0x0800)
+ printk(", 100 Mbps");
+ else
+ printk(", 10 Mbps");
+
+ if (mii_reg & 0x1000)
+ printk(", Full-Duplex\n");
+ else
+ printk(", Half-Duplex\n");
+ }
+}
+
+/* This interrupt occurs when the LTX970 detects a link change.
+*/
+static void
+mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
+{
+ struct device *dev = dev_id;
+ struct fec_enet_private *fep;
+ volatile fec_t *ep;
+
+ fep = (struct fec_enet_private *)dev->priv;
+ ep = &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec);
+
+ /* We need to sequentially read registers 1 and 18 to clear
+ * the interrupt. We don't need to do that here because this
+ * is an edge triggered interrupt that has already been acknowledged
+ * by the top level handler. We also read the extended status
+ * register 20. We just queue the commands and let them happen
+ * as part of the "normal" processing.
+ */
+ mii_queue(mk_mii_read(1), mii_relink);
+ mii_queue(mk_mii_read(18), mii_relink);
+ mii_queue(mk_mii_read(20), mii_relink);
+}
+
+static int
+fec_enet_close(struct device *dev)
+{
+ /* Don't know what to do yet.
+ */
+
+ return 0;
+}
+
+static struct net_device_stats *fec_enet_get_stats(struct device *dev)
+{
+ struct fec_enet_private *fep = (struct fec_enet_private *)dev->priv;
+
+ return &fep->stats;
+}
+
+/* Set or clear the multicast filter for this adaptor.
+ * Skeleton taken from sunlance driver.
+ * The CPM Ethernet implementation allows Multicast as well as individual
+ * MAC address filtering. Some of the drivers check to make sure it is
+ * a group multicast address, and discard those that are not. I guess I
+ * will do the same for now, but just remove the test if you want
+ * individual filtering as well (do the upper net layers want or support
+ * this kind of feature?).
+ */
+
+static void set_multicast_list(struct device *dev)
+{
+ struct fec_enet_private *fep;
+ struct dev_mc_list *dmi;
+ u_char *mcptr, *tdptr;
+ volatile fec_t *ep;
+ int i, j;
+
+ fep = (struct fec_enet_private *)dev->priv;
+ ep = &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec);
+
+ if (dev->flags&IFF_PROMISC) {
+
+ /* Log any net taps. */
+ printk("%s: Promiscuous mode enabled.\n", dev->name);
+ ep->fec_r_cntrl |= 0x0008;
+ } else {
+
+ ep->fec_r_cntrl &= ~0x0008;
+
+ if (dev->flags & IFF_ALLMULTI) {
+ /* Catch all multicast addresses, so set the
+ * filter to all 1's.
+ */
+ ep->fec_hash_table_high = 0xffffffff;
+ ep->fec_hash_table_low = 0xffffffff;
+ }
+#if 0
+ else {
+ /* Clear filter and add the addresses in the list.
+ */
+ ep->sen_gaddr1 = 0;
+ ep->sen_gaddr2 = 0;
+ ep->sen_gaddr3 = 0;
+ ep->sen_gaddr4 = 0;
+
+ dmi = dev->mc_list;
+
+ for (i=0; i<dev->mc_count; i++) {
+
+ /* Only support group multicast for now.
+ */
+ if (!(dmi->dmi_addr[0] & 1))
+ continue;
+
+ /* The address in dmi_addr is LSB first,
+ * and taddr is MSB first. We have to
+ * copy bytes MSB first from dmi_addr.
+ */
+ mcptr = (u_char *)dmi->dmi_addr + 5;
+ tdptr = (u_char *)&ep->sen_taddrh;
+ for (j=0; j<6; j++)
+ *tdptr++ = *mcptr--;
+
+ /* Ask CPM to run CRC and set bit in
+ * filter mask.
+ */
+ cpmp->cp_cpcr = mk_cr_cmd(CPM_CR_CH_SCC1, CPM_CR_SET_GADDR) | CPM_CR_FLG;
+ /* this delay is necessary here -- Cort */
+ udelay(10);
+ while (cpmp->cp_cpcr & CPM_CR_FLG);
+ }
+ }
+#endif
+ }
+}
+
+/* Initialize the FECC Ethernet on 860T.
+ */
+__initfunc(int m8xx_enet_init(void))
+{
+ struct device *dev;
+ struct fec_enet_private *fep;
+ int i, j;
+ unsigned char *eap;
+ unsigned long mem_addr;
+ pte_t *pte;
+ volatile cbd_t *bdp;
+ cbd_t *cbd_base;
+ volatile immap_t *immap;
+ volatile fec_t *fecp;
+ unsigned char rtc_save_cfg, rtc_val;
+
+ immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */
+
+ /* Allocate some private information.
+ */
+ fep = (struct fec_enet_private *)kmalloc(sizeof(*fep), GFP_KERNEL);
+ __clear_user(fep,sizeof(*fep));
+
+ /* Create an Ethernet device instance.
+ */
+ dev = init_etherdev(0, 0);
+
+ fecp = &(immap->im_cpm.cp_fec);
+
+ /* Whack a reset. We should wait for this.
+ */
+ fecp->fec_ecntrl = 1;
+ udelay(10);
+
+ /* Enable interrupts we wish to service.
+ */
+ fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_TXB |
+ FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII);
+
+ /* Clear any outstanding interrupt.
+ */
+ fecp->fec_ievent = 0xffc0;
+
+ fecp->fec_ivec = (FEC_INTERRUPT/2) << 29;
+
+ /* Set station address.
+ */
+ fecp->fec_addr_low = (my_enet_addr[0] << 16) | my_enet_addr[1];
+ fecp->fec_addr_high = my_enet_addr[2];
+
+ eap = (unsigned char *)&my_enet_addr[0];
+ for (i=0; i<6; i++)
+ dev->dev_addr[i] = *eap++;
+
+ /* Reset all multicast.
+ */
+ fecp->fec_hash_table_high = 0;
+ fecp->fec_hash_table_low = 0;
+
+ /* Set maximum receive buffer size.
+ */
+ fecp->fec_r_buff_size = PKT_MAXBLR_SIZE;
+ fecp->fec_r_hash = PKT_MAXBUF_SIZE;
+
+ /* Allocate memory for buffer descriptors.
+ */
+ if (((RX_RING_SIZE + TX_RING_SIZE) * sizeof(cbd_t)) > PAGE_SIZE) {
+ printk("FECC init error. Need more space.\n");
+ printk("FECC initialization failed.\n");
+ return 1;
+ }
+ mem_addr = __get_free_page(GFP_KERNEL);
+ cbd_base = (cbd_t *)mem_addr;
+
+ /* Make it uncached.
+ */
+ pte = va_to_pte(&init_task, (int)mem_addr);
+ pte_val(*pte) |= _PAGE_NO_CACHE;
+ flush_tlb_page(current->mm->mmap, mem_addr);
+
+ /* Set receive and transmit descriptor base.
+ */
+ fecp->fec_r_des_start = __pa(mem_addr);
+ fep->rx_bd_base = cbd_base;
+ fecp->fec_x_des_start = __pa((unsigned long)(cbd_base + RX_RING_SIZE));
+ fep->tx_bd_base = cbd_base + RX_RING_SIZE;
+
+ fep->dirty_tx = fep->cur_tx = fep->tx_bd_base;
+ fep->cur_rx = fep->rx_bd_base;
+
+ fep->skb_cur = fep->skb_dirty = 0;
+
+ /* Initialize the receive buffer descriptors.
+ */
+ bdp = fep->rx_bd_base;
+ for (i=0; i<FEC_ENET_RX_PAGES; i++) {
+
+ /* Allocate a page.
+ */
+ mem_addr = __get_free_page(GFP_KERNEL);
+
+ /* Make it uncached.
+ */
+ pte = va_to_pte(&init_task, mem_addr);
+ pte_val(*pte) |= _PAGE_NO_CACHE;
+ flush_tlb_page(current->mm->mmap, mem_addr);
+
+ /* Initialize the BD for every fragment in the page.
+ */
+ for (j=0; j<FEC_ENET_RX_FRPPG; j++) {
+ bdp->cbd_sc = BD_ENET_RX_EMPTY;
+ bdp->cbd_bufaddr = __pa(mem_addr);
+ mem_addr += FEC_ENET_RX_FRSIZE;
+ bdp++;
+ }
+ }
+
+ /* Set the last buffer to wrap.
+ */
+ bdp--;
+ bdp->cbd_sc |= BD_SC_WRAP;
+
+ /* ...and the same for transmmit.
+ */
+ bdp = fep->tx_bd_base;
+ for (i=0; i<TX_RING_SIZE; i++) {
+
+ /* Initialize the BD for every fragment in the page.
+ */
+ bdp->cbd_sc = 0;
+ bdp->cbd_bufaddr = 0;
+ bdp++;
+ }
+
+ /* Set the last buffer to wrap.
+ */
+ bdp--;
+ bdp->cbd_sc |= BD_SC_WRAP;
+
+ /* Enable MII mode, half-duplex until we know better..
+ */
+ fecp->fec_r_cntrl = 0x0c;
+ fecp->fec_x_cntrl = 0x00;
+
+ /* Enable big endian and don't care about SDMA FC.
+ */
+ fecp->fec_fun_code = 0x78000000;
+
+ /* Set MII speed (50 MHz core).
+ */
+ fecp->fec_mii_speed = 0x14;
+
+ /* Configure all of port D for MII.
+ */
+ immap->im_ioport.iop_pdpar = 0x1fff;
+ immap->im_ioport.iop_pddir = 0x1c58;
+
+ /* Install our interrupt handlers. The 860T FADS board uses
+ * IRQ2 for the MII interrupt.
+ */
+ if (request_irq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0)
+ panic("Could not allocate FEC IRQ!");
+ if (request_irq(SIU_IRQ2, mii_link_interrupt, 0, "mii", dev) != 0)
+ panic("Could not allocate MII IRQ!");
+
+ dev->base_addr = (unsigned long)fecp;
+ dev->priv = fep;
+ dev->name = "fec";
+
+ /* The FEC Ethernet specific entries in the device structure. */
+ dev->open = fec_enet_open;
+ dev->hard_start_xmit = fec_enet_start_xmit;
+ dev->stop = fec_enet_close;
+ dev->get_stats = fec_enet_get_stats;
+ dev->set_multicast_list = set_multicast_list;
+
+ /* And last, enable the transmit and receive processing.
+ */
+ fecp->fec_ecntrl = 2;
+ fecp->fec_r_des_active = 0x01000000;
+
+ printk("FEC ENET Version 0.1, ");
+ for (i=0; i<5; i++)
+ printk("%02x:", dev->dev_addr[i]);
+ printk("%02x\n", dev->dev_addr[5]);
+
+ for (i=0; i<NMII-1; i++)
+ mii_cmds[i].mii_next = &mii_cmds[i+1];
+ mii_free = mii_cmds;
+
+ mii_startup_cmds();
+
+ return 0;
+}
+
#include <linux/init.h>
#include <linux/delay.h>
#include <asm/uaccess.h>
+#include <asm/8xx_immap.h>
+#ifdef CONFIG_MBX
+#include <asm/mbx.h>
+#endif
+#ifdef CONFIG_FADS
+#include <asm/fads.h>
+#endif
#include "commproc.h"
#ifdef CONFIG_SERIAL_CONSOLE
#define TX_WAKEUP ASYNC_SHARE_IRQ
static char *serial_name = "CPM UART driver";
-static char *serial_version = "0.01";
+static char *serial_version = "0.02";
static DECLARE_TASK_QUEUE(tq_serial);
#define smc_scc_num hub6
#define SCC_NUM_BASE 2
+/* The index into the CPM registers for the first SCC in the table.
+*/
+#define SCC_IDX_BASE 1
+
static struct serial_state rs_table[] = {
/* UART CLK PORT IRQ FLAGS NUM */
{ 0, 0, PROFF_SMC1, CPMVEC_SMC1, 0, 0 }, /* SMC1 ttyS0 */
{ 0, 0, PROFF_SMC2, CPMVEC_SMC2, 0, 1 }, /* SMC1 ttyS0 */
+ { 0, 0, PROFF_SCC2, CPMVEC_SCC2, 0, 2 }, /* SCC2 ttyS2 */
+ { 0, 0, PROFF_SCC3, CPMVEC_SCC3, 0, 3 }, /* SCC3 ttyS3 */
};
#define NR_PORTS (sizeof(rs_table)/sizeof(struct serial_state))
smcp->smc_smcm &= ~SMCM_TX;
}
else {
- sccp = &cpmp->cp_scc[idx - SCC_NUM_BASE];
+ sccp = &cpmp->cp_scc[idx - SCC_IDX_BASE];
sccp->scc_sccm &= ~UART_SCCM_TX;
}
restore_flags(flags);
smcp->smc_smcm |= SMCM_TX;
}
else {
- sccp = &cpmp->cp_scc[idx - SCC_NUM_BASE];
+ sccp = &cpmp->cp_scc[idx - SCC_IDX_BASE];
sccp->scc_sccm |= UART_SCCM_TX;
}
restore_flags(flags);
int idx;
ser_info_t *info;
volatile smc_t *smcp;
+ volatile scc_t *sccp;
info = (ser_info_t *)dev_id;
if ((idx = info->state->smc_scc_num) < SCC_NUM_BASE) {
smcp = &cpmp->cp_smc[idx];
+ events = smcp->smc_smce;
+ if (events & SMCM_RX)
+ receive_chars(info);
+ if (events & SMCM_TX)
+ transmit_chars(info);
+ smcp->smc_smce = events;
}
else {
- panic("SCC UART Interrupt....not ready");
+ sccp = &cpmp->cp_scc[idx - SCC_IDX_BASE];
+ events = sccp->scc_scce;
+ if (events & SCCM_RX)
+ receive_chars(info);
+ if (events & SCCM_TX)
+ transmit_chars(info);
+ sccp->scc_scce = events;
}
- events = smcp->smc_smce;
#ifdef SERIAL_DEBUG_INTR
printk("rs_interrupt_single(%d, %x)...",
info->state->smc_scc_num, events);
#endif
- if (events & SMCM_RX)
- receive_chars(info);
- if (events & SMCM_TX)
- transmit_chars(info);
- smcp->smc_smce = events;
#ifdef modem_control
check_modem_status(info);
#endif
volatile smc_t *smcp;
volatile scc_t *sccp;
volatile smc_uart_t *up;
+ volatile scc_uart_t *scup;
save_flags(flags); cli();
* are coming.
*/
up = (smc_uart_t *)&cpmp->cp_dparam[state->port];
+#if 0
up->smc_mrblr = 1; /* receive buffer length */
up->smc_maxidl = 0; /* wait forever for next char */
+#else
+ up->smc_mrblr = RX_BUF_SIZE;
+ up->smc_maxidl = RX_BUF_SIZE;
+#endif
up->smc_brkcr = 1; /* number of break chars */
}
else {
- sccp = &cpmp->cp_scc[idx - SCC_NUM_BASE];
- sccp->scc_sccm |= UART_SCCM_RX;
+ sccp = &cpmp->cp_scc[idx - SCC_IDX_BASE];
+ scup = (scc_uart_t *)&cpmp->cp_dparam[state->port];
+#if 0
+ scup->scc_genscc.scc_mrblr = 1; /* receive buffer length */
+ scup->scc_maxidl = 0; /* wait forever for next char */
+#else
+ scup->scc_genscc.scc_mrblr = RX_BUF_SIZE;
+ scup->scc_maxidl = RX_BUF_SIZE;
+#endif
+
+ sccp->scc_sccm |= (UART_SCCM_TX | UART_SCCM_RX);
+ sccp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT);
}
info->flags |= ASYNC_INITIALIZED;
smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
}
else {
- sccp = &cpmp->cp_scc[idx - SCC_NUM_BASE];
- sccp->scc_sccm &= ~UART_SCCM_RX;
+ sccp = &cpmp->cp_scc[idx - SCC_IDX_BASE];
+ sccp->scc_sccm &= ~(UART_SCCM_TX | UART_SCCM_RX);
+ sccp->scc_gsmrl &= ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
}
-
if (info->tty)
set_bit(TTY_IO_ERROR, &info->tty->flags);
static void change_speed(ser_info_t *info)
{
int baud_rate;
- unsigned cflag, cval, prev_mode;
- int i, bits, idx;
+ unsigned cflag, cval, scval, prev_mode;
+ int i, bits, sbits, idx;
unsigned long flags;
volatile smc_t *smcp;
volatile scc_t *sccp;
* The value 'bits' counts this for us.
*/
cval = 0;
+ scval = 0;
/* byte size and parity */
switch (cflag & CSIZE) {
/* Never happens, but GCC is too dumb to figure it out */
default: bits = 8; break;
}
+ sbits = bits - 5;
+
if (cflag & CSTOPB) {
cval |= SMCMR_SL; /* Two stops */
+ scval |= SCU_PMSR_SL;
bits++;
}
if (cflag & PARENB) {
cval |= SMCMR_PEN;
+ scval |= SCU_PMSR_PEN;
bits++;
}
- if (!(cflag & PARODD))
+ if (!(cflag & PARODD)) {
cval |= SMCMR_PM_EVEN;
+ scval |= (SCU_PMSR_REVP | SCU_PMSR_TEVP);
+ }
/* Determine divisor based on baud rate */
i = cflag & CBAUD;
smcp->smc_smcmr |= (prev_mode & (SMCMR_REN | SMCMR_TEN));
}
else {
- sccp = &cpmp->cp_scc[idx - SCC_NUM_BASE];
- sccp->scc_sccm &= ~UART_SCCM_RX;
+ sccp = &cpmp->cp_scc[idx - SCC_IDX_BASE];
+ sccp->scc_pmsr = (sbits << 12) | scval;
}
- mbx_cpm_setbrg(info->state->smc_scc_num, baud_rate);
+ m8xx_cpm_setbrg(info->state->smc_scc_num, baud_rate);
restore_flags(flags);
}
smcp->smc_smcmr &= ~SMCMR_REN;
}
else {
- sccp = &cpmp->cp_scc[idx - SCC_NUM_BASE];
+ sccp = &cpmp->cp_scc[idx - SCC_IDX_BASE];
sccp->scc_sccm &= ~UART_SCCM_RX;
+ sccp->scc_gsmrl &= ~SCC_GSMRL_ENR;
}
/*
* Before we drop DTR, make sure the UART transmitter
struct serial_state * state;
ser_info_t *info;
uint mem_addr, dp_addr;
- int i, j;
+ int i, j, idx;
ushort chan;
volatile cbd_t *bdp;
volatile cpm8xx_t *cp;
volatile smc_t *sp;
volatile smc_uart_t *up;
+ volatile scc_t *scp;
+ volatile scc_uart_t *sup;
+ volatile immap_t *immap;
init_bh(SERIAL_BH, do_serial_bh);
#if 0
panic("Couldn't register callout driver\n");
cp = cpmp; /* Get pointer to Communication Processor */
+ immap = (immap_t *)IMAP_ADDR; /* and to internal registers */
/* Configure SMCs Tx/Rx instead of port B parallel I/O.
*/
cp->cp_pbdir &= ~0x00000cc0;
cp->cp_pbodr &= ~0x00000cc0;
+ /* Configure SCC2 and SCC3 instead of port A parallel I/O.
+ */
+#ifndef CONFIG_MBX
+ /* The "standard" configuration through the 860.
+ */
+ immap->im_ioport.iop_papar |= 0x003c;
+ immap->im_ioport.iop_padir &= ~0x003c;
+ immap->im_ioport.iop_paodr &= ~0x003c;
+#else
+ /* On the MBX, SCC3 is through Port D.
+ */
+ immap->im_ioport.iop_papar |= 0x000c; /* SCC2 on port A */
+ immap->im_ioport.iop_padir &= ~0x000c;
+ immap->im_ioport.iop_paodr &= ~0x000c;
+
+ immap->im_ioport.iop_pdpar |= 0x0030; /* SCC3 on port D */
+#endif
+
+ /* Since we don't yet do modem control, connect the port C pins
+ * as general purpose I/O. This will assert CTS and CD for the
+ * SCC ports.
+ */
+ immap->im_ioport.iop_pcdir |= 0x03c6;
+ immap->im_ioport.iop_pcpar &= ~0x03c6;
+
/* Wire BRG1 to SMC1 and BRG2 to SMC2.
*/
cp->cp_simode = 0x10000000;
+ /* Connect SCC2 and SCC3 to NMSI. Connect BRG3 to SCC2 and
+ * BRG4 to SCC3.
+ */
+ cp->cp_sicr &= ~0x00ffff00;
+ cp->cp_sicr |= 0x001b1200;
+
for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) {
state->magic = SSTATE_MAGIC;
state->line = i;
info->state = state;
state->info = (struct async_struct *)info;
- /* Right now, assume we are using SMCs.
- */
- sp = &cp->cp_smc[state->smc_scc_num];
-
- up = (smc_uart_t *)&cp->cp_dparam[state->port];
-
/* We need to allocate a transmit and receive buffer
* descriptors from dual port ram, and a character
* buffer area from host mem.
*/
- dp_addr = mbx_cpm_dpalloc(sizeof(cbd_t) * RX_NUM_FIFO);
+ dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * RX_NUM_FIFO);
/* Allocate space for FIFOs in the host memory.
*/
- mem_addr = mbx_cpm_hostalloc(RX_NUM_FIFO * RX_BUF_SIZE);
+ mem_addr = m8xx_cpm_hostalloc(RX_NUM_FIFO * RX_BUF_SIZE);
/* Set the physical address of the host memory
* buffers in the buffer descriptors, and the
* virtual address for us to work with.
*/
bdp = (cbd_t *)&cp->cp_dpmem[dp_addr];
- up->smc_rbase = dp_addr;
info->rx_cur = info->rx_bd_base = (cbd_t *)bdp;
for (j=0; j<(RX_NUM_FIFO-1); j++) {
bdp->cbd_bufaddr = __pa(mem_addr);
bdp->cbd_sc = BD_SC_WRAP | BD_SC_EMPTY | BD_SC_INTRPT;
- dp_addr = mbx_cpm_dpalloc(sizeof(cbd_t) * TX_NUM_FIFO);
+ if ((idx = state->smc_scc_num) < SCC_NUM_BASE) {
+ sp = &cp->cp_smc[idx];
+ up = (smc_uart_t *)&cp->cp_dparam[state->port];
+ up->smc_rbase = dp_addr;
+ }
+ else {
+ scp = &cp->cp_scc[idx - SCC_IDX_BASE];
+ sup = (scc_uart_t *)&cp->cp_dparam[state->port];
+ sup->scc_genscc.scc_rbase = dp_addr;
+ }
+
+ dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * TX_NUM_FIFO);
/* Allocate space for FIFOs in the host memory.
*/
- mem_addr = mbx_cpm_hostalloc(TX_NUM_FIFO * TX_BUF_SIZE);
+ mem_addr = m8xx_cpm_hostalloc(TX_NUM_FIFO * TX_BUF_SIZE);
/* Set the physical address of the host memory
* buffers in the buffer descriptors, and the
* virtual address for us to work with.
*/
bdp = (cbd_t *)&cp->cp_dpmem[dp_addr];
- up->smc_tbase = dp_addr;
info->tx_cur = info->tx_bd_base = (cbd_t *)bdp;
for (j=0; j<(TX_NUM_FIFO-1); j++) {
bdp->cbd_bufaddr = __pa(mem_addr);
bdp->cbd_sc = (BD_SC_WRAP | BD_SC_INTRPT);
- /* Set up the uart parameters in the parameter ram.
- */
- up->smc_rfcr = SMC_EB;
- up->smc_tfcr = SMC_EB;
+ if (idx < SCC_NUM_BASE) {
+ up->smc_tbase = dp_addr;
- /* Set this to 1 for now, so we get single character
- * interrupts. Using idle charater time requires
- * some additional tuning.
- */
- up->smc_mrblr = 1; /* receive buffer length */
- up->smc_maxidl = 0; /* wait forever for next char */
- up->smc_brkcr = 1; /* number of break chars */
+ /* Set up the uart parameters in the
+ * parameter ram.
+ */
+ up->smc_rfcr = SMC_EB;
+ up->smc_tfcr = SMC_EB;
- /* Send the CPM an initialize command.
- */
- if (state->smc_scc_num == 0)
- chan = CPM_CR_CH_SMC1;
- else
- chan = CPM_CR_CH_SMC2;
- cp->cp_cpcr = mk_cr_cmd(chan,
+ /* Set this to 1 for now, so we get single
+ * character interrupts. Using idle charater
+ * time requires some additional tuning.
+ */
+ up->smc_mrblr = 1;
+ up->smc_maxidl = 0;
+ up->smc_brkcr = 1;
+
+ /* Send the CPM an initialize command.
+ */
+ if (state->smc_scc_num == 0)
+ chan = CPM_CR_CH_SMC1;
+ else
+ chan = CPM_CR_CH_SMC2;
+
+ cp->cp_cpcr = mk_cr_cmd(chan,
CPM_CR_INIT_TRX) | CPM_CR_FLG;
- while (cp->cp_cpcr & CPM_CR_FLG);
+ while (cp->cp_cpcr & CPM_CR_FLG);
- /* Set UART mode, 8 bit, no parity, one stop.
- * Enable receive and transmit.
- */
- sp->smc_smcmr = smcr_mk_clen(9) | SMCMR_SM_UART;
+ /* Set UART mode, 8 bit, no parity, one stop.
+ * Enable receive and transmit.
+ */
+ sp->smc_smcmr = smcr_mk_clen(9) | SMCMR_SM_UART;
- /* Disable all interrupts and clear all pending
- * events.
- */
- sp->smc_smcm = 0;
- sp->smc_smce = 0xff;
+ /* Disable all interrupts and clear all pending
+ * events.
+ */
+ sp->smc_smcm = 0;
+ sp->smc_smce = 0xff;
+ }
+ else {
+ sup->scc_genscc.scc_tbase = dp_addr;
+
+ /* Set up the uart parameters in the
+ * parameter ram.
+ */
+ sup->scc_genscc.scc_rfcr = SMC_EB;
+ sup->scc_genscc.scc_tfcr = SMC_EB;
+
+ /* Set this to 1 for now, so we get single
+ * character interrupts. Using idle charater
+ * time requires some additional tuning.
+ */
+ sup->scc_genscc.scc_mrblr = 1;
+ sup->scc_maxidl = 0;
+ sup->scc_brkcr = 1;
+ sup->scc_parec = 0;
+ sup->scc_frmec = 0;
+ sup->scc_nosec = 0;
+ sup->scc_brkec = 0;
+ sup->scc_uaddr1 = 0;
+ sup->scc_uaddr2 = 0;
+ sup->scc_toseq = 0;
+ sup->scc_char1 = 0x8000;
+ sup->scc_char2 = 0x8000;
+ sup->scc_char3 = 0x8000;
+ sup->scc_char4 = 0x8000;
+ sup->scc_char5 = 0x8000;
+ sup->scc_char6 = 0x8000;
+ sup->scc_char7 = 0x8000;
+ sup->scc_char8 = 0x8000;
+ sup->scc_rccm = 0xc0ff;
+
+ /* Send the CPM an initialize command.
+ */
+ if (state->smc_scc_num == 2)
+ chan = CPM_CR_CH_SCC2;
+ else
+ chan = CPM_CR_CH_SCC3;
+
+ cp->cp_cpcr = mk_cr_cmd(chan,
+ CPM_CR_INIT_TRX) | CPM_CR_FLG;
+ while (cp->cp_cpcr & CPM_CR_FLG);
+
+ /* Set UART mode, 8 bit, no parity, one stop.
+ * Enable receive and transmit.
+ */
+ scp->scc_gsmrh = 0;
+ scp->scc_gsmrl =
+ (SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);
+
+ /* Disable all interrupts and clear all pending
+ * events.
+ */
+ scp->scc_sccm = 0;
+ scp->scc_scce = 0xffff;
+ scp->scc_dsr = 0x7e7e;
+ scp->scc_pmsr = 0x3000;
+ }
/* Install interrupt handler.
*/
/* Set up the baud rate generator.
*/
- mbx_cpm_setbrg(state->smc_scc_num, 9600);
+ m8xx_cpm_setbrg(state->smc_scc_num, 9600);
/* If the port is the console, enable Rx and Tx.
*/
/* Allocate space for two buffer descriptors in the DP ram.
*/
- dp_addr = mbx_cpm_dpalloc(sizeof(cbd_t) * 2);
+ dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * 2);
/* Allocate space for two 2 byte FIFOs in the host memory.
*/
- mem_addr = mbx_cpm_hostalloc(4);
+ mem_addr = m8xx_cpm_hostalloc(4);
/* Set the physical address of the host memory buffers in
* the buffer descriptors.
/* Set up the baud rate generator.
*/
- mbx_cpm_setbrg(ser->smc_scc_num, 9600);
+ m8xx_cpm_setbrg(ser->smc_scc_num, 9600);
/* And finally, enable Rx and Tx.
*/
KERNELLOAD =0xc0000000
-# PowerPC (cross) tools
-ifneq ($(shell uname -m),ppc)
-CROSS_COMPILE = ppc-linux-elf-
-else
+ifeq ($(shell uname -m),ppc)
CHECKS = checks
endif
#define amiga_request_irq request_irq
#define amiga_free_irq free_irq
-#include "../../m68k/amiga/amiints.c"
+/*
+ * linux/arch/m68k/amiga/amiints.c -- Amiga Linux interrupt handling code
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive
+ * for more details.
+ *
+ * 11/07/96: rewritten interrupt handling, irq lists are exists now only for
+ * this sources where it makes sense (VERTB/PORTS/EXTER) and you must
+ * be careful that dev_id for this sources is unique since this the
+ * only possibility to distinguish between different handlers for
+ * free_irq. irq lists also have different irq flags:
+ * - IRQ_FLG_FAST: handler is inserted at top of list (after other
+ * fast handlers)
+ * - IRQ_FLG_SLOW: handler is inserted at bottom of list and before
+ * they're executed irq level is set to the previous
+ * one, but handlers don't need to be reentrant, if
+ * reentrance occured, slow handlers will be just
+ * called again.
+ * The whole interrupt handling for CIAs is moved to cia.c
+ * /Roman Zippel
+ */
+
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/kernel_stat.h>
+#include <linux/init.h>
+
+#include <asm/system.h>
+#include <asm/irq.h>
+#include <asm/traps.h>
+#include <asm/amigahw.h>
+#include <asm/amigaints.h>
+#include <asm/amipcmcia.h>
+
+#ifdef CONFIG_APUS
+#include <asm/amigappc.h>
+#endif
+
+extern int cia_request_irq(struct ciabase *base,int irq,
+ void (*handler)(int, void *, struct pt_regs *),
+ unsigned long flags, const char *devname, void *dev_id);
+extern void cia_free_irq(struct ciabase *base, unsigned int irq, void *dev_id);
+extern void cia_init_IRQ(struct ciabase *base);
+extern int cia_get_irq_list(struct ciabase *base, char *buf);
+
+/* irq node variables for amiga interrupt sources */
+static irq_node_t *ami_irq_list[AMI_STD_IRQS];
+
+unsigned short ami_intena_vals[AMI_STD_IRQS] = {
+ IF_VERTB, IF_COPER, IF_AUD0, IF_AUD1, IF_AUD2, IF_AUD3, IF_BLIT,
+ IF_DSKSYN, IF_DSKBLK, IF_RBF, IF_TBE, IF_SOFT, IF_PORTS, IF_EXTER
+};
+static const unsigned char ami_servers[AMI_STD_IRQS] = {
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1
+};
+
+static short ami_ablecount[AMI_IRQS];
+
+static void ami_badint(int irq, void *dev_id, struct pt_regs *fp)
+{
+ num_spurious += 1;
+}
+
+/*
+ * void amiga_init_IRQ(void)
+ *
+ * Parameters: None
+ *
+ * Returns: Nothing
+ *
+ * This function should be called during kernel startup to initialize
+ * the amiga IRQ handling routines.
+ */
+
+__initfunc(void amiga_init_IRQ(void))
+{
+ int i;
+
+ /* initialize handlers */
+ for (i = 0; i < AMI_STD_IRQS; i++) {
+ if (ami_servers[i]) {
+ ami_irq_list[i] = NULL;
+ } else {
+ ami_irq_list[i] = new_irq_node();
+ ami_irq_list[i]->handler = ami_badint;
+ ami_irq_list[i]->flags = IRQ_FLG_STD;
+ ami_irq_list[i]->dev_id = NULL;
+ ami_irq_list[i]->devname = NULL;
+ ami_irq_list[i]->next = NULL;
+ }
+ }
+ for (i = 0; i < AMI_IRQS; i++)
+ ami_ablecount[i] = 0;
+
+ /* turn off PCMCIA interrupts */
+ if (AMIGAHW_PRESENT(PCMCIA))
+ pcmcia_disable_irq();
+
+ /* turn off all interrupts... */
+ custom.intena = 0x7fff;
+ custom.intreq = 0x7fff;
+
+#ifdef CONFIG_APUS
+ APUS_WRITE(APUS_REG_INT, REGINT_INTMASTER | REGINT_ENABLEIPL);
+ APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT);
+ APUS_WRITE(APUS_IPL_EMU, IPLEMU_SETRESET | IPLEMU_IPLMASK);
+#endif
+ /* ... and enable the master interrupt bit */
+ custom.intena = IF_SETCLR | IF_INTEN;
+
+ cia_init_IRQ(&ciaa_base);
+ cia_init_IRQ(&ciab_base);
+}
+
+static inline void amiga_insert_irq(irq_node_t **list, irq_node_t *node)
+{
+ unsigned long flags;
+ irq_node_t *cur;
+
+ if (!node->dev_id)
+ printk("%s: Warning: dev_id of %s is zero\n",
+ __FUNCTION__, node->devname);
+
+ save_flags(flags);
+ cli();
+
+ cur = *list;
+
+ if (node->flags & IRQ_FLG_FAST) {
+ node->flags &= ~IRQ_FLG_SLOW;
+ while (cur && cur->flags & IRQ_FLG_FAST) {
+ list = &cur->next;
+ cur = cur->next;
+ }
+ } else if (node->flags & IRQ_FLG_SLOW) {
+ while (cur) {
+ list = &cur->next;
+ cur = cur->next;
+ }
+ } else {
+ while (cur && !(cur->flags & IRQ_FLG_SLOW)) {
+ list = &cur->next;
+ cur = cur->next;
+ }
+ }
+
+ node->next = cur;
+ *list = node;
+
+ restore_flags(flags);
+}
+
+static inline void amiga_delete_irq(irq_node_t **list, void *dev_id)
+{
+ unsigned long flags;
+ irq_node_t *node;
+
+ save_flags(flags);
+ cli();
+
+ for (node = *list; node; list = &node->next, node = *list) {
+ if (node->dev_id == dev_id) {
+ *list = node->next;
+ /* Mark it as free. */
+ node->handler = NULL;
+ restore_flags(flags);
+ return;
+ }
+ }
+ restore_flags(flags);
+ printk ("%s: tried to remove invalid irq\n", __FUNCTION__);
+}
+
+/*
+ * amiga_request_irq : add an interrupt service routine for a particular
+ * machine specific interrupt source.
+ * If the addition was successful, it returns 0.
+ */
+
+int amiga_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
+ unsigned long flags, const char *devname, void *dev_id)
+{
+ irq_node_t *node;
+
+ if (irq >= AMI_IRQS) {
+ printk ("%s: Unknown IRQ %d from %s\n", __FUNCTION__, irq, devname);
+ return -ENXIO;
+ }
+
+ if (irq >= IRQ_AMIGA_AUTO)
+ return sys_request_irq(irq - IRQ_AMIGA_AUTO, handler,
+ flags, devname, dev_id);
+
+ if (irq >= IRQ_AMIGA_CIAB)
+ return cia_request_irq(&ciab_base, irq - IRQ_AMIGA_CIAB,
+ handler, flags, devname, dev_id);
+
+ if (irq >= IRQ_AMIGA_CIAA)
+ return cia_request_irq(&ciaa_base, irq - IRQ_AMIGA_CIAA,
+ handler, flags, devname, dev_id);
+
+ if (ami_servers[irq]) {
+ if (!(node = new_irq_node()))
+ return -ENOMEM;
+ node->handler = handler;
+ node->flags = flags;
+ node->dev_id = dev_id;
+ node->devname = devname;
+ node->next = NULL;
+ amiga_insert_irq(&ami_irq_list[irq], node);
+ } else {
+ if (!(ami_irq_list[irq]->flags & IRQ_FLG_STD)) {
+ if (ami_irq_list[irq]->flags & IRQ_FLG_LOCK) {
+ printk("%s: IRQ %d from %s is not replaceable\n",
+ __FUNCTION__, irq, ami_irq_list[irq]->devname);
+ return -EBUSY;
+ }
+ if (!(flags & IRQ_FLG_REPLACE)) {
+ printk("%s: %s can't replace IRQ %d from %s\n",
+ __FUNCTION__, devname, irq, ami_irq_list[irq]->devname);
+ return -EBUSY;
+ }
+ }
+ ami_irq_list[irq]->handler = handler;
+ ami_irq_list[irq]->flags = flags;
+ ami_irq_list[irq]->dev_id = dev_id;
+ ami_irq_list[irq]->devname = devname;
+ }
+
+ /* enable the interrupt */
+ if (irq < IRQ_AMIGA_PORTS && !ami_ablecount[irq])
+ custom.intena = IF_SETCLR | ami_intena_vals[irq];
+
+ return 0;
+}
+
+void amiga_free_irq(unsigned int irq, void *dev_id)
+{
+ if (irq >= AMI_IRQS) {
+ printk ("%s: Unknown IRQ %d\n", __FUNCTION__, irq);
+ return;
+ }
+
+ if (irq >= IRQ_AMIGA_AUTO)
+ sys_free_irq(irq - IRQ_AMIGA_AUTO, dev_id);
+
+ if (irq >= IRQ_AMIGA_CIAB) {
+ cia_free_irq(&ciab_base, irq - IRQ_AMIGA_CIAB, dev_id);
+ return;
+ }
+
+ if (irq >= IRQ_AMIGA_CIAA) {
+ cia_free_irq(&ciaa_base, irq - IRQ_AMIGA_CIAA, dev_id);
+ return;
+ }
+
+ if (ami_servers[irq]) {
+ amiga_delete_irq(&ami_irq_list[irq], dev_id);
+ /* if server list empty, disable the interrupt */
+ if (!ami_irq_list[irq] && irq < IRQ_AMIGA_PORTS)
+ custom.intena = ami_intena_vals[irq];
+ } else {
+ if (ami_irq_list[irq]->dev_id != dev_id)
+ printk("%s: removing probably wrong IRQ %d from %s\n",
+ __FUNCTION__, irq, ami_irq_list[irq]->devname);
+ ami_irq_list[irq]->handler = ami_badint;
+ ami_irq_list[irq]->flags = IRQ_FLG_STD;
+ ami_irq_list[irq]->dev_id = NULL;
+ ami_irq_list[irq]->devname = NULL;
+ custom.intena = ami_intena_vals[irq];
+ }
+}
+
+/*
+ * Enable/disable a particular machine specific interrupt source.
+ * Note that this may affect other interrupts in case of a shared interrupt.
+ * This function should only be called for a _very_ short time to change some
+ * internal data, that may not be changed by the interrupt at the same time.
+ * ami_(enable|disable)_irq calls may also be nested.
+ */
+
+void amiga_enable_irq(unsigned int irq)
+{
+ if (irq >= AMI_IRQS) {
+ printk("%s: Unknown IRQ %d\n", __FUNCTION__, irq);
+ return;
+ }
+
+ if (--ami_ablecount[irq])
+ return;
+
+ /* No action for auto-vector interrupts */
+ if (irq >= IRQ_AMIGA_AUTO){
+ printk("%s: Trying to enable auto-vector IRQ %i\n",
+ __FUNCTION__, irq - IRQ_AMIGA_AUTO);
+ return;
+ }
+
+ if (irq >= IRQ_AMIGA_CIAB) {
+ cia_able_irq(&ciab_base, CIA_ICR_SETCLR |
+ (1 << (irq - IRQ_AMIGA_CIAB)));
+ return;
+ }
+
+ if (irq >= IRQ_AMIGA_CIAA) {
+ cia_able_irq(&ciaa_base, CIA_ICR_SETCLR |
+ (1 << (irq - IRQ_AMIGA_CIAA)));
+ return;
+ }
+
+ /* enable the interrupt */
+ custom.intena = IF_SETCLR | ami_intena_vals[irq];
+}
+
+void amiga_disable_irq(unsigned int irq)
+{
+ if (irq >= AMI_IRQS) {
+ printk("%s: Unknown IRQ %d\n", __FUNCTION__, irq);
+ return;
+ }
+
+ if (ami_ablecount[irq]++)
+ return;
+
+ /* No action for auto-vector interrupts */
+ if (irq >= IRQ_AMIGA_AUTO) {
+ printk("%s: Trying to disable auto-vector IRQ %i\n",
+ __FUNCTION__, irq - IRQ_AMIGA_AUTO);
+ return;
+ }
+
+ if (irq >= IRQ_AMIGA_CIAB) {
+ cia_able_irq(&ciab_base, 1 << (irq - IRQ_AMIGA_CIAB));
+ return;
+ }
+
+ if (irq >= IRQ_AMIGA_CIAA) {
+ cia_able_irq(&ciaa_base, 1 << (irq - IRQ_AMIGA_CIAA));
+ return;
+ }
+
+ /* disable the interrupt */
+ custom.intena = ami_intena_vals[irq];
+}
+
+inline void amiga_do_irq(int irq, struct pt_regs *fp)
+{
+ kstat.irqs[0][SYS_IRQS + irq]++;
+ ami_irq_list[irq]->handler(irq, ami_irq_list[irq]->dev_id, fp);
+}
+
+void amiga_do_irq_list(int irq, struct pt_regs *fp, struct irq_server *server)
+{
+ irq_node_t *node, *slow_nodes;
+ unsigned short flags;
+
+ kstat.irqs[0][SYS_IRQS + irq]++;
+ if (server->count++)
+ server->reentrance = 1;
+ /* serve first fast and normal handlers */
+ for (node = ami_irq_list[irq];
+ node && (!(node->flags & IRQ_FLG_SLOW));
+ node = node->next)
+ node->handler(irq, node->dev_id, fp);
+ custom.intreq = ami_intena_vals[irq];
+ if (!node) {
+ server->count--;
+ return;
+ }
+#ifdef CONFIG_APUS
+ APUS_WRITE(APUS_IPL_EMU, IPLEMU_SETRESET | IPLEMU_DISABLEINT);
+ APUS_WRITE(APUS_IPL_EMU, IPLEMU_IPLMASK);
+ APUS_WRITE(APUS_IPL_EMU, (IPLEMU_SETRESET
+ | (~(fp->mq) & IPLEMU_IPLMASK)));
+ APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT);
+#else
+ save_flags(flags);
+ restore_flags((flags & ~0x0700) | (fp->sr & 0x0700));
+#endif
+ /* if slow handlers exists, serve them now */
+ slow_nodes = node;
+ for (;;) {
+ for (; node; node = node->next)
+ node->handler(irq, node->dev_id, fp);
+ /* if reentrance occured, serve slow handlers again */
+ custom.intena = ami_intena_vals[irq];
+ if (!server->reentrance) {
+ server->count--;
+ custom.intena = IF_SETCLR | ami_intena_vals[irq];
+ return;
+ }
+ server->reentrance = 0;
+ custom.intena = IF_SETCLR | ami_intena_vals[irq];
+ node = slow_nodes;
+ }
+}
+
+/*
+ * The builtin Amiga hardware interrupt handlers.
+ */
+
+static void ami_int1(int irq, void *dev_id, struct pt_regs *fp)
+{
+ unsigned short ints = custom.intreqr & custom.intenar;
+
+ /* if serial transmit buffer empty, interrupt */
+ if (ints & IF_TBE) {
+ custom.intreq = IF_TBE;
+ amiga_do_irq(IRQ_AMIGA_TBE, fp);
+ }
+
+ /* if floppy disk transfer complete, interrupt */
+ if (ints & IF_DSKBLK) {
+ custom.intreq = IF_DSKBLK;
+ amiga_do_irq(IRQ_AMIGA_DSKBLK, fp);
+ }
+
+ /* if software interrupt set, interrupt */
+ if (ints & IF_SOFT) {
+ custom.intreq = IF_SOFT;
+ amiga_do_irq(IRQ_AMIGA_SOFT, fp);
+ }
+}
+
+static void ami_int3(int irq, void *dev_id, struct pt_regs *fp)
+{
+ unsigned short ints = custom.intreqr & custom.intenar;
+ static struct irq_server server = {0, 0};
+
+ /* if a blitter interrupt */
+ if (ints & IF_BLIT) {
+ custom.intreq = IF_BLIT;
+ amiga_do_irq(IRQ_AMIGA_BLIT, fp);
+ }
+
+ /* if a copper interrupt */
+ if (ints & IF_COPER) {
+ custom.intreq = IF_COPER;
+ amiga_do_irq(IRQ_AMIGA_COPPER, fp);
+ }
+
+ /* if a vertical blank interrupt */
+ if (ints & IF_VERTB)
+ amiga_do_irq_list(IRQ_AMIGA_VERTB, fp, &server);
+}
+
+static void ami_int4(int irq, void *dev_id, struct pt_regs *fp)
+{
+ unsigned short ints = custom.intreqr & custom.intenar;
+
+ /* if audio 0 interrupt */
+ if (ints & IF_AUD0) {
+ custom.intreq = IF_AUD0;
+ amiga_do_irq(IRQ_AMIGA_AUD0, fp);
+ }
+
+ /* if audio 1 interrupt */
+ if (ints & IF_AUD1) {
+ custom.intreq = IF_AUD1;
+ amiga_do_irq(IRQ_AMIGA_AUD1, fp);
+ }
+
+ /* if audio 2 interrupt */
+ if (ints & IF_AUD2) {
+ custom.intreq = IF_AUD2;
+ amiga_do_irq(IRQ_AMIGA_AUD2, fp);
+ }
+
+ /* if audio 3 interrupt */
+ if (ints & IF_AUD3) {
+ custom.intreq = IF_AUD3;
+ amiga_do_irq(IRQ_AMIGA_AUD3, fp);
+ }
+}
+
+static void ami_int5(int irq, void *dev_id, struct pt_regs *fp)
+{
+ unsigned short ints = custom.intreqr & custom.intenar;
+
+ /* if serial receive buffer full interrupt */
+ if (ints & IF_RBF) {
+ /* acknowledge of IF_RBF must be done by the serial interrupt */
+ amiga_do_irq(IRQ_AMIGA_RBF, fp);
+ }
+
+ /* if a disk sync interrupt */
+ if (ints & IF_DSKSYN) {
+ custom.intreq = IF_DSKSYN;
+ amiga_do_irq(IRQ_AMIGA_DSKSYN, fp);
+ }
+}
+
+static void ami_int7(int irq, void *dev_id, struct pt_regs *fp)
+{
+ panic ("level 7 interrupt received\n");
+}
+
+void (*amiga_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
+ ami_badint, ami_int1, ami_badint, ami_int3,
+ ami_int4, ami_int5, ami_badint, ami_int7
+};
+
+int amiga_get_irq_list(char *buf)
+{
+ int i, len = 0;
+ irq_node_t *node;
+
+ for (i = 0; i < AMI_STD_IRQS; i++) {
+ if (!(node = ami_irq_list[i]))
+ continue;
+ if (node->flags & IRQ_FLG_STD)
+ continue;
+ len += sprintf(buf+len, "ami %2d: %10u ", i,
+ kstat.irqs[0][SYS_IRQS + i]);
+ do {
+ if (ami_servers[i]) {
+ if (node->flags & IRQ_FLG_FAST)
+ len += sprintf(buf+len, "F ");
+ else if (node->flags & IRQ_FLG_SLOW)
+ len += sprintf(buf+len, "S ");
+ else
+ len += sprintf(buf+len, " ");
+ } else {
+ if (node->flags & IRQ_FLG_LOCK)
+ len += sprintf(buf+len, "L ");
+ else
+ len += sprintf(buf+len, " ");
+ }
+ len += sprintf(buf+len, "%s\n", node->devname);
+ if ((node = node->next))
+ len += sprintf(buf+len, " ");
+ } while (node);
+ }
+
+ len += cia_get_irq_list(&ciaa_base, buf+len);
+ len += cia_get_irq_list(&ciab_base, buf+len);
+ return len;
+}
#define m68k_num_memory num_memory
#define m68k_memory memory
+#include <linux/init.h>
+
+/* machine dependent "kbd-reset" setup function */
+void (*kbd_reset_setup) (char *, int) __initdata = 0;
+
#include <asm/io.h>
-#include "../../m68k/amiga/config.c"
+/*
+ * linux/arch/m68k/amiga/config.c
+ *
+ * Copyright (C) 1993 Hamish Macdonald
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive
+ * for more details.
+ */
+
+/*
+ * Miscellaneous Amiga stuff
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/kd.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/init.h>
+
+#include <asm/bootinfo.h>
+#include <asm/setup.h>
+#include <asm/system.h>
+#include <asm/pgtable.h>
+#include <asm/amigahw.h>
+#include <asm/amigaints.h>
+#include <asm/irq.h>
+#include <asm/machdep.h>
+#include <linux/zorro.h>
+
+unsigned long amiga_model;
+unsigned long amiga_eclock;
+unsigned long amiga_masterclock;
+unsigned long amiga_colorclock;
+unsigned long amiga_chipset;
+unsigned char amiga_vblank;
+unsigned char amiga_psfreq;
+struct amiga_hw_present amiga_hw_present;
+
+static const char *amiga_models[] = {
+ "A500", "A500+", "A600", "A1000", "A1200", "A2000", "A2500", "A3000",
+ "A3000T", "A3000+", "A4000", "A4000T", "CDTV", "CD32", "Draco"
+};
+
+extern char m68k_debug_device[];
+
+static void amiga_sched_init(void (*handler)(int, void *, struct pt_regs *));
+/* amiga specific keyboard functions */
+extern int amiga_keyb_init(void);
+extern int amiga_kbdrate (struct kbd_repeat *);
+extern void amiga_kbd_reset_setup(char*, int);
+/* amiga specific irq functions */
+extern void amiga_init_IRQ (void);
+extern void (*amiga_default_handler[]) (int, void *, struct pt_regs *);
+extern int amiga_request_irq (unsigned int irq,
+ void (*handler)(int, void *, struct pt_regs *),
+ unsigned long flags, const char *devname,
+ void *dev_id);
+extern void amiga_free_irq (unsigned int irq, void *dev_id);
+extern void amiga_enable_irq (unsigned int);
+extern void amiga_disable_irq (unsigned int);
+static void amiga_get_model(char *model);
+static int amiga_get_hardware_list(char *buffer);
+extern int amiga_get_irq_list (char *);
+/* amiga specific timer functions */
+static unsigned long amiga_gettimeoffset (void);
+static void a3000_gettod (int *, int *, int *, int *, int *, int *);
+static void a2000_gettod (int *, int *, int *, int *, int *, int *);
+static int amiga_hwclk (int, struct hwclk_time *);
+static int amiga_set_clock_mmss (unsigned long);
+extern void amiga_mksound( unsigned int count, unsigned int ticks );
+#ifdef CONFIG_AMIGA_FLOPPY
+extern void amiga_floppy_setup(char *, int *);
+#endif
+static void amiga_reset (void);
+static int amiga_wait_key (struct console *co);
+extern void amiga_init_sound(void);
+static void amiga_savekmsg_init(void);
+static void amiga_mem_console_write(struct console *co, const char *b,
+ unsigned int count);
+void amiga_serial_console_write(struct console *co, const char *s,
+ unsigned int count);
+static void amiga_debug_init(void);
+#ifdef CONFIG_HEARTBEAT
+static void amiga_heartbeat(int on);
+#endif
+
+static struct console amiga_console_driver = {
+ "debug",
+ NULL, /* write */
+ NULL, /* read */
+ NULL, /* device */
+ amiga_wait_key, /* wait_key */
+ NULL, /* unblank */
+ NULL, /* setup */
+ CON_PRINTBUFFER,
+ -1,
+ 0,
+ NULL
+};
+
+#ifdef CONFIG_MAGIC_SYSRQ
+static char amiga_sysrq_xlate[128] =
+ "\0001234567890-=\\\000\000" /* 0x00 - 0x0f */
+ "qwertyuiop[]\000123" /* 0x10 - 0x1f */
+ "asdfghjkl;'\000\000456" /* 0x20 - 0x2f */
+ "\000zxcvbnm,./\000+789" /* 0x30 - 0x3f */
+ " \177\t\r\r\000\177\000\000\000-\000\000\000\000\000" /* 0x40 - 0x4f */
+ "\000\201\202\203\204\205\206\207\210\211()/*+\000" /* 0x50 - 0x5f */
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" /* 0x60 - 0x6f */
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"; /* 0x70 - 0x7f */
+#endif
+
+extern void (*kd_mksound)(unsigned int, unsigned int);
+
+ /*
+ * Parse an Amiga-specific record in the bootinfo
+ */
+
+int amiga_parse_bootinfo(const struct bi_record *record)
+{
+ int unknown = 0;
+ const unsigned long *data = record->data;
+
+ switch (record->tag) {
+ case BI_AMIGA_MODEL:
+ amiga_model = *data;
+ break;
+
+ case BI_AMIGA_ECLOCK:
+ amiga_eclock = *data;
+ break;
+
+ case BI_AMIGA_CHIPSET:
+ amiga_chipset = *data;
+ break;
+
+ case BI_AMIGA_CHIP_SIZE:
+ amiga_chip_size = *(const int *)data;
+ break;
+
+ case BI_AMIGA_VBLANK:
+ amiga_vblank = *(const unsigned char *)data;
+ break;
+
+ case BI_AMIGA_PSFREQ:
+ amiga_psfreq = *(const unsigned char *)data;
+ break;
+
+ case BI_AMIGA_AUTOCON:
+ if (zorro_num_autocon < ZORRO_NUM_AUTO)
+ memcpy(&zorro_autocon[zorro_num_autocon++],
+ (const struct ConfigDev *)data,
+ sizeof(struct ConfigDev));
+ else
+ printk("amiga_parse_bootinfo: too many AutoConfig devices\n");
+ break;
+
+ case BI_AMIGA_SERPER:
+ /* serial port period: ignored here */
+ break;
+
+ default:
+ unknown = 1;
+ }
+ return(unknown);
+}
+
+ /*
+ * Identify builtin hardware
+ */
+
+__initfunc(static void amiga_identify(void))
+{
+ /* Fill in some default values, if necessary */
+ if (amiga_eclock == 0)
+ amiga_eclock = 709379;
+
+ memset(&amiga_hw_present, 0, sizeof(amiga_hw_present));
+
+ printk("Amiga hardware found: ");
+ if (amiga_model >= AMI_500 && amiga_model <= AMI_DRACO)
+ printk("[%s] ", amiga_models[amiga_model-AMI_500]);
+
+ switch(amiga_model) {
+ case AMI_UNKNOWN:
+ goto Generic;
+
+ case AMI_600:
+ case AMI_1200:
+ AMIGAHW_SET(A1200_IDE);
+ AMIGAHW_SET(PCMCIA);
+ case AMI_500:
+ case AMI_500PLUS:
+ case AMI_1000:
+ case AMI_2000:
+ case AMI_2500:
+ AMIGAHW_SET(A2000_CLK); /* Is this correct for all models? */
+ goto Generic;
+
+ case AMI_3000:
+ case AMI_3000T:
+ AMIGAHW_SET(AMBER_FF);
+ AMIGAHW_SET(MAGIC_REKICK);
+ /* fall through */
+ case AMI_3000PLUS:
+ AMIGAHW_SET(A3000_SCSI);
+ AMIGAHW_SET(A3000_CLK);
+ AMIGAHW_SET(ZORRO3);
+ goto Generic;
+
+ case AMI_4000T:
+ AMIGAHW_SET(A4000_SCSI);
+ /* fall through */
+ case AMI_4000:
+ AMIGAHW_SET(A4000_IDE);
+ AMIGAHW_SET(A3000_CLK);
+ AMIGAHW_SET(ZORRO3);
+ goto Generic;
+
+ case AMI_CDTV:
+ case AMI_CD32:
+ AMIGAHW_SET(CD_ROM);
+ AMIGAHW_SET(A2000_CLK); /* Is this correct? */
+ goto Generic;
+
+ Generic:
+ AMIGAHW_SET(AMI_VIDEO);
+ AMIGAHW_SET(AMI_BLITTER);
+ AMIGAHW_SET(AMI_AUDIO);
+ AMIGAHW_SET(AMI_FLOPPY);
+ AMIGAHW_SET(AMI_KEYBOARD);
+ AMIGAHW_SET(AMI_MOUSE);
+ AMIGAHW_SET(AMI_SERIAL);
+ AMIGAHW_SET(AMI_PARALLEL);
+ AMIGAHW_SET(CHIP_RAM);
+ AMIGAHW_SET(PAULA);
+
+ switch(amiga_chipset) {
+ case CS_OCS:
+ case CS_ECS:
+ case CS_AGA:
+ switch (custom.deniseid & 0xf) {
+ case 0x0c:
+ AMIGAHW_SET(DENISE_HR);
+ break;
+ case 0x08:
+ AMIGAHW_SET(LISA);
+ break;
+ }
+ break;
+ default:
+ AMIGAHW_SET(DENISE);
+ break;
+ }
+ switch ((custom.vposr>>8) & 0x7f) {
+ case 0x00:
+ AMIGAHW_SET(AGNUS_PAL);
+ break;
+ case 0x10:
+ AMIGAHW_SET(AGNUS_NTSC);
+ break;
+ case 0x20:
+ case 0x21:
+ AMIGAHW_SET(AGNUS_HR_PAL);
+ break;
+ case 0x30:
+ case 0x31:
+ AMIGAHW_SET(AGNUS_HR_NTSC);
+ break;
+ case 0x22:
+ case 0x23:
+ AMIGAHW_SET(ALICE_PAL);
+ break;
+ case 0x32:
+ case 0x33:
+ AMIGAHW_SET(ALICE_NTSC);
+ break;
+ }
+ AMIGAHW_SET(ZORRO);
+ break;
+
+ case AMI_DRACO:
+ panic("No support for Draco yet");
+
+ default:
+ panic("Unknown Amiga Model");
+ }
+
+#define AMIGAHW_ANNOUNCE(name, str) \
+ if (AMIGAHW_PRESENT(name)) \
+ printk(str)
+
+ AMIGAHW_ANNOUNCE(AMI_VIDEO, "VIDEO ");
+ AMIGAHW_ANNOUNCE(AMI_BLITTER, "BLITTER ");
+ AMIGAHW_ANNOUNCE(AMBER_FF, "AMBER_FF ");
+ AMIGAHW_ANNOUNCE(AMI_AUDIO, "AUDIO ");
+ AMIGAHW_ANNOUNCE(AMI_FLOPPY, "FLOPPY ");
+ AMIGAHW_ANNOUNCE(A3000_SCSI, "A3000_SCSI ");
+ AMIGAHW_ANNOUNCE(A4000_SCSI, "A4000_SCSI ");
+ AMIGAHW_ANNOUNCE(A1200_IDE, "A1200_IDE ");
+ AMIGAHW_ANNOUNCE(A4000_IDE, "A4000_IDE ");
+ AMIGAHW_ANNOUNCE(CD_ROM, "CD_ROM ");
+ AMIGAHW_ANNOUNCE(AMI_KEYBOARD, "KEYBOARD ");
+ AMIGAHW_ANNOUNCE(AMI_MOUSE, "MOUSE ");
+ AMIGAHW_ANNOUNCE(AMI_SERIAL, "SERIAL ");
+ AMIGAHW_ANNOUNCE(AMI_PARALLEL, "PARALLEL ");
+ AMIGAHW_ANNOUNCE(A2000_CLK, "A2000_CLK ");
+ AMIGAHW_ANNOUNCE(A3000_CLK, "A3000_CLK ");
+ AMIGAHW_ANNOUNCE(CHIP_RAM, "CHIP_RAM ");
+ AMIGAHW_ANNOUNCE(PAULA, "PAULA ");
+ AMIGAHW_ANNOUNCE(DENISE, "DENISE ");
+ AMIGAHW_ANNOUNCE(DENISE_HR, "DENISE_HR ");
+ AMIGAHW_ANNOUNCE(LISA, "LISA ");
+ AMIGAHW_ANNOUNCE(AGNUS_PAL, "AGNUS_PAL ");
+ AMIGAHW_ANNOUNCE(AGNUS_NTSC, "AGNUS_NTSC ");
+ AMIGAHW_ANNOUNCE(AGNUS_HR_PAL, "AGNUS_HR_PAL ");
+ AMIGAHW_ANNOUNCE(AGNUS_HR_NTSC, "AGNUS_HR_NTSC ");
+ AMIGAHW_ANNOUNCE(ALICE_PAL, "ALICE_PAL ");
+ AMIGAHW_ANNOUNCE(ALICE_NTSC, "ALICE_NTSC ");
+ AMIGAHW_ANNOUNCE(MAGIC_REKICK, "MAGIC_REKICK ");
+ AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA ");
+ if (AMIGAHW_PRESENT(ZORRO))
+ printk("ZORRO%s ", AMIGAHW_PRESENT(ZORRO3) ? "3" : "");
+ printk("\n");
+
+#undef AMIGAHW_ANNOUNCE
+}
+
+ /*
+ * Setup the Amiga configuration info
+ */
+
+__initfunc(void config_amiga(void))
+{
+ amiga_debug_init();
+ amiga_identify();
+
+ mach_sched_init = amiga_sched_init;
+ mach_keyb_init = amiga_keyb_init;
+ mach_kbdrate = amiga_kbdrate;
+ kbd_reset_setup = amiga_kbd_reset_setup;
+ mach_init_IRQ = amiga_init_IRQ;
+ mach_default_handler = &amiga_default_handler;
+#ifndef CONFIG_APUS
+ mach_request_irq = amiga_request_irq;
+ mach_free_irq = amiga_free_irq;
+ enable_irq = amiga_enable_irq;
+ disable_irq = amiga_disable_irq;
+#endif
+ mach_get_model = amiga_get_model;
+ mach_get_hardware_list = amiga_get_hardware_list;
+ mach_get_irq_list = amiga_get_irq_list;
+ mach_gettimeoffset = amiga_gettimeoffset;
+ if (AMIGAHW_PRESENT(A3000_CLK)){
+ mach_gettod = a3000_gettod;
+ }
+ else{ /* if (AMIGAHW_PRESENT(A2000_CLK)) */
+ mach_gettod = a2000_gettod;
+ }
+
+ mach_max_dma_address = 0xffffffff; /*
+ * default MAX_DMA=0xffffffff
+ * on all machines. If we don't
+ * do so, the SCSI code will not
+ * be able to allocate any mem
+ * for transfers, unless we are
+ * dealing with a Z2 mem only
+ * system. /Jes
+ */
+
+ mach_hwclk = amiga_hwclk;
+ mach_set_clock_mmss = amiga_set_clock_mmss;
+#ifdef CONFIG_AMIGA_FLOPPY
+ mach_floppy_setup = amiga_floppy_setup;
+#endif
+ mach_reset = amiga_reset;
+ conswitchp = &dummy_con;
+ kd_mksound = amiga_mksound;
+#ifdef CONFIG_MAGIC_SYSRQ
+ mach_sysrq_key = 0x5f; /* HELP */
+ mach_sysrq_shift_state = 0x03; /* SHIFT+ALTGR */
+ mach_sysrq_shift_mask = 0xff; /* all modifiers except CapsLock */
+ mach_sysrq_xlate = amiga_sysrq_xlate;
+#endif
+#ifdef CONFIG_HEARTBEAT
+ mach_heartbeat = amiga_heartbeat;
+#endif
+
+ /* Fill in the clock values (based on the 700 kHz E-Clock) */
+ amiga_masterclock = 40*amiga_eclock; /* 28 MHz */
+ amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */
+
+ /* clear all DMA bits */
+ custom.dmacon = DMAF_ALL;
+ /* ensure that the DMA master bit is set */
+ custom.dmacon = DMAF_SETCLR | DMAF_MASTER;
+
+ /* initialize chipram allocator */
+ amiga_chip_init ();
+
+ /* debugging using chipram */
+ if (!strcmp( m68k_debug_device, "mem" )){
+ if (!AMIGAHW_PRESENT(CHIP_RAM))
+ printk("Warning: no chipram present for debugging\n");
+ else {
+ amiga_savekmsg_init();
+ amiga_console_driver.write = amiga_mem_console_write;
+ register_console(&amiga_console_driver);
+ }
+ }
+
+ /* our beloved beeper */
+ if (AMIGAHW_PRESENT(AMI_AUDIO))
+ amiga_init_sound();
+
+ /*
+ * if it is an A3000, set the magic bit that forces
+ * a hard rekick
+ */
+ if (AMIGAHW_PRESENT(MAGIC_REKICK))
+ *(unsigned char *)ZTWO_VADDR(0xde0002) |= 0x80;
+
+#ifdef CONFIG_ZORRO
+ zorro_init();
+#endif
+}
+
+static unsigned short jiffy_ticks;
+
+__initfunc(static void amiga_sched_init(void (*timer_routine)(int, void *,
+ struct pt_regs *)))
+{
+ jiffy_ticks = (amiga_eclock+HZ/2)/HZ;
+
+ ciab.cra &= 0xC0; /* turn off timer A, continuous mode, from Eclk */
+ ciab.talo = jiffy_ticks % 256;
+ ciab.tahi = jiffy_ticks / 256;
+
+ /* install interrupt service routine for CIAB Timer A
+ *
+ * Please don't change this to use ciaa, as it interferes with the
+ * SCSI code. We'll have to take a look at this later
+ */
+ request_irq(IRQ_AMIGA_CIAB_TA, timer_routine, IRQ_FLG_LOCK,
+ "timer", NULL);
+ /* start timer */
+ ciab.cra |= 0x11;
+}
+
+#define TICK_SIZE 10000
+
+/* This is always executed with interrupts disabled. */
+static unsigned long amiga_gettimeoffset (void)
+{
+ unsigned short hi, lo, hi2;
+ unsigned long ticks, offset = 0;
+
+ /* read CIA B timer A current value */
+ hi = ciab.tahi;
+ lo = ciab.talo;
+ hi2 = ciab.tahi;
+
+ if (hi != hi2) {
+ lo = ciab.talo;
+ hi = hi2;
+ }
+
+ ticks = hi << 8 | lo;
+
+ if (ticks > jiffy_ticks / 2)
+ /* check for pending interrupt */
+ if (cia_set_irq(&ciab_base, 0) & CIA_ICR_TA)
+ offset = 10000;
+
+ ticks = jiffy_ticks - ticks;
+ ticks = (10000 * ticks) / jiffy_ticks;
+
+ return ticks + offset;
+}
+
+static void a3000_gettod (int *yearp, int *monp, int *dayp,
+ int *hourp, int *minp, int *secp)
+{
+ volatile struct tod3000 *tod = TOD_3000;
+
+ tod->cntrl1 = TOD3000_CNTRL1_HOLD;
+
+ *secp = tod->second1 * 10 + tod->second2;
+ *minp = tod->minute1 * 10 + tod->minute2;
+ *hourp = tod->hour1 * 10 + tod->hour2;
+ *dayp = tod->day1 * 10 + tod->day2;
+ *monp = tod->month1 * 10 + tod->month2;
+ *yearp = tod->year1 * 10 + tod->year2;
+
+ tod->cntrl1 = TOD3000_CNTRL1_FREE;
+}
+
+static void a2000_gettod (int *yearp, int *monp, int *dayp,
+ int *hourp, int *minp, int *secp)
+{
+ volatile struct tod2000 *tod = TOD_2000;
+
+ tod->cntrl1 = TOD2000_CNTRL1_HOLD;
+
+ while (tod->cntrl1 & TOD2000_CNTRL1_BUSY)
+ ;
+
+ *secp = tod->second1 * 10 + tod->second2;
+ *minp = tod->minute1 * 10 + tod->minute2;
+ *hourp = (tod->hour1 & 3) * 10 + tod->hour2;
+ *dayp = tod->day1 * 10 + tod->day2;
+ *monp = tod->month1 * 10 + tod->month2;
+ *yearp = tod->year1 * 10 + tod->year2;
+
+ if (!(tod->cntrl3 & TOD2000_CNTRL3_24HMODE)){
+ if (!(tod->hour1 & TOD2000_HOUR1_PM) && *hourp == 12)
+ *hourp = 0;
+ else if ((tod->hour1 & TOD2000_HOUR1_PM) && *hourp != 12)
+ *hourp += 12;
+ }
+
+ tod->cntrl1 &= ~TOD2000_CNTRL1_HOLD;
+}
+
+static int amiga_hwclk(int op, struct hwclk_time *t)
+{
+ if (AMIGAHW_PRESENT(A3000_CLK)) {
+ volatile struct tod3000 *tod = TOD_3000;
+
+ tod->cntrl1 = TOD3000_CNTRL1_HOLD;
+
+ if (!op) { /* read */
+ t->sec = tod->second1 * 10 + tod->second2;
+ t->min = tod->minute1 * 10 + tod->minute2;
+ t->hour = tod->hour1 * 10 + tod->hour2;
+ t->day = tod->day1 * 10 + tod->day2;
+ t->wday = tod->weekday;
+ t->mon = tod->month1 * 10 + tod->month2 - 1;
+ t->year = tod->year1 * 10 + tod->year2;
+ } else {
+ tod->second1 = t->sec / 10;
+ tod->second2 = t->sec % 10;
+ tod->minute1 = t->min / 10;
+ tod->minute2 = t->min % 10;
+ tod->hour1 = t->hour / 10;
+ tod->hour2 = t->hour % 10;
+ tod->day1 = t->day / 10;
+ tod->day2 = t->day % 10;
+ if (t->wday != -1)
+ tod->weekday = t->wday;
+ tod->month1 = (t->mon + 1) / 10;
+ tod->month2 = (t->mon + 1) % 10;
+ tod->year1 = t->year / 10;
+ tod->year2 = t->year % 10;
+ }
+
+ tod->cntrl1 = TOD3000_CNTRL1_FREE;
+ } else /* if (AMIGAHW_PRESENT(A2000_CLK)) */ {
+ volatile struct tod2000 *tod = TOD_2000;
+
+ tod->cntrl1 = TOD2000_CNTRL1_HOLD;
+
+ while (tod->cntrl1 & TOD2000_CNTRL1_BUSY)
+ ;
+
+ if (!op) { /* read */
+ t->sec = tod->second1 * 10 + tod->second2;
+ t->min = tod->minute1 * 10 + tod->minute2;
+ t->hour = (tod->hour1 & 3) * 10 + tod->hour2;
+ t->day = tod->day1 * 10 + tod->day2;
+ t->wday = tod->weekday;
+ t->mon = tod->month1 * 10 + tod->month2 - 1;
+ t->year = tod->year1 * 10 + tod->year2;
+
+ if (!(tod->cntrl3 & TOD2000_CNTRL3_24HMODE)){
+ if (!(tod->hour1 & TOD2000_HOUR1_PM) && t->hour == 12)
+ t->hour = 0;
+ else if ((tod->hour1 & TOD2000_HOUR1_PM) && t->hour != 12)
+ t->hour += 12;
+ }
+ } else {
+ tod->second1 = t->sec / 10;
+ tod->second2 = t->sec % 10;
+ tod->minute1 = t->min / 10;
+ tod->minute2 = t->min % 10;
+ if (tod->cntrl3 & TOD2000_CNTRL3_24HMODE)
+ tod->hour1 = t->hour / 10;
+ else if (t->hour >= 12)
+ tod->hour1 = TOD2000_HOUR1_PM +
+ (t->hour - 12) / 10;
+ else
+ tod->hour1 = t->hour / 10;
+ tod->hour2 = t->hour % 10;
+ tod->day1 = t->day / 10;
+ tod->day2 = t->day % 10;
+ if (t->wday != -1)
+ tod->weekday = t->wday;
+ tod->month1 = (t->mon + 1) / 10;
+ tod->month2 = (t->mon + 1) % 10;
+ tod->year1 = t->year / 10;
+ tod->year2 = t->year % 10;
+ }
+
+ tod->cntrl1 &= ~TOD2000_CNTRL1_HOLD;
+ }
+
+ return 0;
+}
+
+static int amiga_set_clock_mmss (unsigned long nowtime)
+{
+ short real_seconds = nowtime % 60, real_minutes = (nowtime / 60) % 60;
+
+ if (AMIGAHW_PRESENT(A3000_CLK)) {
+ volatile struct tod3000 *tod = TOD_3000;
+
+ tod->cntrl1 = TOD3000_CNTRL1_HOLD;
+
+ tod->second1 = real_seconds / 10;
+ tod->second2 = real_seconds % 10;
+ tod->minute1 = real_minutes / 10;
+ tod->minute2 = real_minutes % 10;
+
+ tod->cntrl1 = TOD3000_CNTRL1_FREE;
+ } else /* if (AMIGAHW_PRESENT(A2000_CLK)) */ {
+ volatile struct tod2000 *tod = TOD_2000;
+
+ tod->cntrl1 = TOD2000_CNTRL1_HOLD;
+
+ while (tod->cntrl1 & TOD2000_CNTRL1_BUSY)
+ ;
+
+ tod->second1 = real_seconds / 10;
+ tod->second2 = real_seconds % 10;
+ tod->minute1 = real_minutes / 10;
+ tod->minute2 = real_minutes % 10;
+
+ tod->cntrl1 &= ~TOD2000_CNTRL1_HOLD;
+ }
+
+ return 0;
+}
+
+static int amiga_wait_key (struct console *co)
+{
+ int i;
+
+ while (1) {
+ while (ciaa.pra & 0x40);
+
+ /* debounce */
+ for (i = 0; i < 1000; i++);
+
+ if (!(ciaa.pra & 0x40))
+ break;
+ }
+
+ /* wait for button up */
+ while (1) {
+ while (!(ciaa.pra & 0x40));
+
+ /* debounce */
+ for (i = 0; i < 1000; i++);
+
+ if (ciaa.pra & 0x40)
+ break;
+ }
+ return 0;
+}
+
+void dbprintf(const char *fmt , ...)
+{
+ static char buf[1024];
+ va_list args;
+ extern void console_print (const char *str);
+ extern int vsprintf(char * buf, const char * fmt, va_list args);
+
+ va_start(args, fmt);
+ vsprintf(buf, fmt, args);
+ va_end(args);
+
+ console_print (buf);
+}
+
+static NORET_TYPE void amiga_reset( void )
+ ATTRIB_NORET;
+
+static void amiga_reset (void)
+{
+ for (;;);
+}
+
+
+ /*
+ * Debugging
+ */
+
+#define SAVEKMSG_MAXMEM 128*1024
+
+#define SAVEKMSG_MAGIC1 0x53415645 /* 'SAVE' */
+#define SAVEKMSG_MAGIC2 0x4B4D5347 /* 'KMSG' */
+
+struct savekmsg {
+ unsigned long magic1; /* SAVEKMSG_MAGIC1 */
+ unsigned long magic2; /* SAVEKMSG_MAGIC2 */
+ unsigned long magicptr; /* address of magic1 */
+ unsigned long size;
+ char data[0];
+};
+
+static struct savekmsg *savekmsg = NULL;
+
+static void amiga_mem_console_write(struct console *co, const char *s,
+ unsigned int count)
+{
+ if (savekmsg->size+count <= SAVEKMSG_MAXMEM-sizeof(struct savekmsg)) {
+ memcpy(savekmsg->data+savekmsg->size, s, count);
+ savekmsg->size += count;
+ }
+}
+
+static void amiga_savekmsg_init(void)
+{
+ savekmsg = (struct savekmsg *)amiga_chip_alloc(SAVEKMSG_MAXMEM);
+ savekmsg->magic1 = SAVEKMSG_MAGIC1;
+ savekmsg->magic2 = SAVEKMSG_MAGIC2;
+ savekmsg->magicptr = VTOP(savekmsg);
+ savekmsg->size = 0;
+}
+
+static void amiga_serial_putc(char c)
+{
+ custom.serdat = (unsigned char)c | 0x100;
+
+#ifdef CONFIG_APUS
+ /* I'm sure this should not be necessary since the address is
+ marked non-cachable and coherent. Still, without it the
+ serial output is not usable. -jskov */
+ eieio ();
+#endif
+
+ while (!(custom.serdatr & 0x2000))
+ ;
+}
+
+void amiga_serial_console_write(struct console *co, const char *s,
+ unsigned int count)
+{
+ while (count--) {
+ if (*s == '\n')
+ amiga_serial_putc('\r');
+ amiga_serial_putc(*s++);
+ }
+}
+
+#ifdef CONFIG_SERIAL_CONSOLE
+void amiga_serial_puts(const char *s)
+{
+ amiga_serial_console_write(NULL, s, strlen(s));
+}
+
+int amiga_serial_console_wait_key(struct console *co)
+{
+ int ch;
+
+ while (!(custom.intreqr & IF_RBF))
+ barrier();
+ ch = custom.serdatr & 0xff;
+ /* clear the interrupt, so that another character can be read */
+ custom.intreq = IF_RBF;
+ return ch;
+}
+
+void amiga_serial_gets(struct console *co, char *s, int len)
+{
+ int ch, cnt = 0;
+
+ while (1) {
+ ch = amiga_serial_console_wait_key(co);
+
+ /* Check for backspace. */
+ if (ch == 8 || ch == 127) {
+ if (cnt == 0) {
+ amiga_serial_putc('\007');
+ continue;
+ }
+ cnt--;
+ amiga_serial_puts("\010 \010");
+ continue;
+ }
+
+ /* Check for enter. */
+ if (ch == 10 || ch == 13)
+ break;
+
+ /* See if line is too long. */
+ if (cnt >= len + 1) {
+ amiga_serial_putc(7);
+ cnt--;
+ continue;
+ }
+
+ /* Store and echo character. */
+ s[cnt++] = ch;
+ amiga_serial_putc(ch);
+ }
+ /* Print enter. */
+ amiga_serial_puts("\r\n");
+ s[cnt] = 0;
+}
+#endif
+
+__initfunc(static void amiga_debug_init(void))
+{
+ if (!strcmp( m68k_debug_device, "ser" )) {
+ /* no initialization required (?) */
+ amiga_console_driver.write = amiga_serial_console_write;
+ register_console(&amiga_console_driver);
+ }
+}
+
+#ifdef CONFIG_HEARTBEAT
+static void amiga_heartbeat(int on)
+{
+ if (on)
+ ciaa.pra &= ~2;
+ else
+ ciaa.pra |= 2;
+}
+#endif
+
+ /*
+ * Amiga specific parts of /proc
+ */
+
+static void amiga_get_model(char *model)
+{
+ strcpy(model, "Amiga ");
+ if (amiga_model >= AMI_500 && amiga_model <= AMI_DRACO)
+ strcat(model, amiga_models[amiga_model-AMI_500]);
+}
+
+
+static int amiga_get_hardware_list(char *buffer)
+{
+ int len = 0;
+
+ if (AMIGAHW_PRESENT(CHIP_RAM))
+ len += sprintf(buffer+len, "Chip RAM:\t%ldK\n", amiga_chip_size>>10);
+ len += sprintf(buffer+len, "PS Freq:\t%dHz\nEClock Freq:\t%ldHz\n",
+ amiga_psfreq, amiga_eclock);
+ if (AMIGAHW_PRESENT(AMI_VIDEO)) {
+ char *type;
+ switch(amiga_chipset) {
+ case CS_OCS:
+ type = "OCS";
+ break;
+ case CS_ECS:
+ type = "ECS";
+ break;
+ case CS_AGA:
+ type = "AGA";
+ break;
+ default:
+ type = "Old or Unknown";
+ break;
+ }
+ len += sprintf(buffer+len, "Graphics:\t%s\n", type);
+ }
+
+#define AMIGAHW_ANNOUNCE(name, str) \
+ if (AMIGAHW_PRESENT(name)) \
+ len += sprintf (buffer+len, "\t%s\n", str)
+
+ len += sprintf (buffer + len, "Detected hardware:\n");
+
+ AMIGAHW_ANNOUNCE(AMI_VIDEO, "Amiga Video");
+ AMIGAHW_ANNOUNCE(AMI_BLITTER, "Blitter");
+ AMIGAHW_ANNOUNCE(AMBER_FF, "Amber Flicker Fixer");
+ AMIGAHW_ANNOUNCE(AMI_AUDIO, "Amiga Audio");
+ AMIGAHW_ANNOUNCE(AMI_FLOPPY, "Floppy Controller");
+ AMIGAHW_ANNOUNCE(A3000_SCSI, "SCSI Controller WD33C93 (A3000 style)");
+ AMIGAHW_ANNOUNCE(A4000_SCSI, "SCSI Controller NCR53C710 (A4000T style)");
+ AMIGAHW_ANNOUNCE(A1200_IDE, "IDE Interface (A1200 style)");
+ AMIGAHW_ANNOUNCE(A4000_IDE, "IDE Interface (A4000 style)");
+ AMIGAHW_ANNOUNCE(CD_ROM, "Internal CD ROM drive");
+ AMIGAHW_ANNOUNCE(AMI_KEYBOARD, "Keyboard");
+ AMIGAHW_ANNOUNCE(AMI_MOUSE, "Mouse Port");
+ AMIGAHW_ANNOUNCE(AMI_SERIAL, "Serial Port");
+ AMIGAHW_ANNOUNCE(AMI_PARALLEL, "Parallel Port");
+ AMIGAHW_ANNOUNCE(A2000_CLK, "Hardware Clock (A2000 style)");
+ AMIGAHW_ANNOUNCE(A3000_CLK, "Hardware Clock (A3000 style)");
+ AMIGAHW_ANNOUNCE(CHIP_RAM, "Chip RAM");
+ AMIGAHW_ANNOUNCE(PAULA, "Paula 8364");
+ AMIGAHW_ANNOUNCE(DENISE, "Denise 8362");
+ AMIGAHW_ANNOUNCE(DENISE_HR, "Denise 8373");
+ AMIGAHW_ANNOUNCE(LISA, "Lisa 8375");
+ AMIGAHW_ANNOUNCE(AGNUS_PAL, "Normal/Fat PAL Agnus 8367/8371");
+ AMIGAHW_ANNOUNCE(AGNUS_NTSC, "Normal/Fat NTSC Agnus 8361/8370");
+ AMIGAHW_ANNOUNCE(AGNUS_HR_PAL, "Fat Hires PAL Agnus 8372");
+ AMIGAHW_ANNOUNCE(AGNUS_HR_NTSC, "Fat Hires NTSC Agnus 8372");
+ AMIGAHW_ANNOUNCE(ALICE_PAL, "PAL Alice 8374");
+ AMIGAHW_ANNOUNCE(ALICE_NTSC, "NTSC Alice 8374");
+ AMIGAHW_ANNOUNCE(MAGIC_REKICK, "Magic Hard Rekick");
+ AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA Slot");
+ if (AMIGAHW_PRESENT(ZORRO))
+ len += sprintf(buffer+len, "\tZorro%s AutoConfig: %d Expansion Device%s\n",
+ AMIGAHW_PRESENT(ZORRO3) ? " III" : "",
+ zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s");
+
+#undef AMIGAHW_ANNOUNCE
+
+ return(len);
+}
+#include <linux/config.h> /* CONFIG_HEARTBEAT */
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
CONFIG_EXPERIMENTAL=y
# CONFIG_MODULES is not set
# CONFIG_PCI is not set
+# CONFIG_PCI_QUIRKS is not set
# CONFIG_PCI_OLD_PROC is not set
CONFIG_NET=y
# CONFIG_SYSCTL is not set
# CONFIG_BINFMT_MISC is not set
# CONFIG_BINFMT_JAVA is not set
# CONFIG_PARPORT is not set
-CONFIG_ABSTRACT_CONSOLE=y
CONFIG_FB=y
-# CONFIG_VGA_CONSOLE is not set
# CONFIG_FB_COMPAT_XPMAC is not set
+# CONFIG_PMAC_PBOOK is not set
# CONFIG_MAC_KEYBOARD is not set
# CONFIG_MAC_FLOPPY is not set
+# CONFIG_MAC_SERIAL is not set
# CONFIG_MACMOUSE is not set
# CONFIG_PROC_DEVICETREE is not set
# CONFIG_KGDB is not set
CONFIG_AMIGAMOUSE=y
CONFIG_ABSTRACT_CONSOLE=y
CONFIG_FB=y
-CONFIG_AMIGA_FLOPPY=y
CONFIG_AMIGA_BUILTIN_SERIAL=y
CONFIG_GVPIOEXT=y
# CONFIG_GVPIOEXT_LP is not set
# CONFIG_PNP is not set
#
-# Floppy, IDE, and other block devices
+# Block devices
#
# CONFIG_BLK_DEV_FD is not set
+CONFIG_AMIGA_FLOPPY=y
CONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
-CONFIG_BLK_DEV_GAYLE=y
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_BLK_DEV_PCIDE is not set
+CONFIG_BLK_DEV_GAYLE=y
+# CONFIG_BLK_DEV_IDEDOUBLER is not set
+CONFIG_BLK_DEV_BUDDHA=y
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_IDE_CHIPSETS is not set
+# CONFIG_AMIGA_Z2RAM is not set
#
# Additional Block Devices
#
# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_BOOTP=y
-CONFIG_IP_PNP_RARP=y
-# CONFIG_IP_ACCT is not set
+# CONFIG_IP_PNP is not set
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
# CONFIG_CPU_IS_SLOW is not set
# CONFIG_NET_SCHED is not set
-# CONFIG_NET_PROFILE is not set
#
# SCSI support
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
# CONFIG_SCSI_DEBUG is not set
-# CONFIG_SCSI_MESH is not set
CONFIG_A3000_SCSI=y
CONFIG_A2091_SCSI=y
CONFIG_GVP11_SCSI=y
CONFIG_FASTLANE_SCSI=y
-# CONFIG_A4000T_SCSI is not set
-# CONFIG_A4091_SCSI is not set
-# CONFIG_SCSI_MAC53C94 is not set
+CONFIG_A4000T_SCSI=y
+CONFIG_A4091_SCSI=y
+CONFIG_BLZ603EPLUS_SCSI=y
#
# Network device support
# CONFIG_DUMMY is not set
# CONFIG_EQUALIZER is not set
CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
CONFIG_ARIADNE=y
CONFIG_A2065=y
CONFIG_HYDRA=y
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_RTL8139 is not set
+# CONFIG_YELLOWFIN is not set
# CONFIG_NET_ISA is not set
# CONFIG_NET_EISA is not set
# CONFIG_NET_POCKET is not set
#
# CONFIG_CD_NO_IDESCSI is not set
+#
+# Console drivers
+#
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FB_AMIGA=y
+CONFIG_FB_AMIGA_OCS=y
+CONFIG_FB_AMIGA_ECS=y
+CONFIG_FB_AMIGA_AGA=y
+CONFIG_FB_CYBER=y
+CONFIG_FB_VIRGE=y
+CONFIG_FB_RETINAZ3=y
+CONFIG_FB_CLGEN=y
+# CONFIG_FB_OF is not set
+# CONFIG_FB_VGA is not set
+CONFIG_FB_VIRTUAL=y
+# CONFIG_FBCON_ADVANCED is not set
+CONFIG_FBCON_MFB=y
+CONFIG_FBCON_CFB2=y
+CONFIG_FBCON_CFB4=y
+CONFIG_FBCON_CFB8=y
+CONFIG_FBCON_CFB16=y
+CONFIG_FBCON_CFB24=y
+CONFIG_FBCON_CFB32=y
+CONFIG_FBCON_AFB=y
+CONFIG_FBCON_ILBM=y
+CONFIG_FBCON_MAC=y
+# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
+# CONFIG_FBCON_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_PEARL_8x8=y
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_SERIAL=y
+# CONFIG_SERIAL_CONSOLE is not set
+# CONFIG_SERIAL_EXTENDED is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_UNIX98_PTYS is not set
+# CONFIG_MOUSE is not set
+# CONFIG_QIC02_TAPE is not set
+# CONFIG_APM is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_RTC is not set
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_NVRAM is not set
+# CONFIG_JOYSTICK is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+
#
# Filesystems
#
CONFIG_VFAT_FS=y
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
-# CONFIG_ROOT_NFS is not set
# CONFIG_NFSD is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# Partition Tables
#
CONFIG_AMIGA_PARTITION=y
-# CONFIG_FOREIGN_PARTITIONS is not set
+CONFIG_FOREIGN_PARTITIONS=y
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_ADFS_FS is not set
-# CONFIG_DEVPTS_FS is not set
CONFIG_NLS=y
#
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_KOI8_R is not set
-#
-# Frame buffer devices
-#
-CONFIG_FB_AMIGA=y
-CONFIG_FB_AMIGA_OCS=y
-CONFIG_FB_AMIGA_ECS=y
-CONFIG_FB_AMIGA_AGA=y
-CONFIG_FB_CYBER=y
-CONFIG_FB_VIRGE=y
-CONFIG_FB_RETINAZ3=y
-# CONFIG_FB_OF is not set
-# CONFIG_FB_S3TRIO is not set
-CONFIG_FB_VIRTUAL=y
-# CONFIG_FBCON_ADVANCED is not set
-CONFIG_FBCON_MFB=y
-CONFIG_FBCON_ILBM=y
-CONFIG_FBCON_AFB=y
-CONFIG_FBCON_MAC=y
-CONFIG_FBCON_CFB2=y
-CONFIG_FBCON_CFB4=y
-CONFIG_FBCON_CFB8=y
-CONFIG_FBCON_CFB16=y
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_CFB32=y
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=y
-# CONFIG_SERIAL_CONSOLE is not set
-# CONFIG_SERIAL_EXTENDED is not set
-# CONFIG_SERIAL_NONSTANDARD is not set
-# CONFIG_MOUSE is not set
-# CONFIG_QIC02_TAPE is not set
-# CONFIG_APM is not set
-# CONFIG_WATCHDOG is not set
-# CONFIG_RTC is not set
-# CONFIG_VIDEO_DEV is not set
-# CONFIG_NVRAM is not set
-# CONFIG_JOYSTICK is not set
-# CONFIG_MISC_RADIO is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-
#
# Sound
#
.S.o:
$(CC) -D__ASSEMBLY__ -traditional -c -o $*.o $<
-
ZOFF = 0
ZSZ = 0
IOFF = 0
--add-section=initrd=ramdisk.image.gz \
--add-section=image=../coffboot/vmlinux.gz \
zvmlinux.initrd.tmp zvmlinux.initrd
- $(CC) $(CFLAGS) -DINITRD_OFFSET=`sh offset zvmlinux.initrd initrd` \
- -DINITRD_SIZE=`sh size zvmlinux.initrd initrd` \
- -DZIMAGE_OFFSET=`sh offset zvmlinux.initrd image` \
- -DZIMAGE_SIZE=`sh size zvmlinux.initrd image` \
+ $(CC) $(CFLAGS) -DINITRD_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd initrd` \
+ -DINITRD_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd initrd` \
+ -DZIMAGE_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd image` \
+ -DZIMAGE_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd image` \
-DKERNELBASE=$(KERNELBASE) -c -o misc.o misc.c
$(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS)
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section=initrd=ramdisk.image.gz \
--add-section=image=../coffboot/vmlinux.gz \
zvmlinux.initrd.tmp zvmlinux.initrd
- $(CC) $(CFLAGS) -DINITRD_OFFSET=`sh offset zvmlinux.initrd initrd` \
- -DINITRD_SIZE=`sh size zvmlinux.initrd initrd` \
- -DZIMAGE_OFFSET=`sh offset zvmlinux.initrd image` \
- -DZIMAGE_SIZE=`sh size zvmlinux.initrd image` \
+ $(CC) $(CFLAGS) -DINITRD_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd initrd` \
+ -DINITRD_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd initrd` \
+ -DZIMAGE_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd image` \
+ -DZIMAGE_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd image` \
-DKERNELBASE=$(KERNELBASE) -c -o misc.o misc.c
$(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS)
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
rm zvmlinux.initrd.tmp
endif
-zImage: zvmlinux mkprep
ifeq ($(CONFIG_PREP),y)
+zImage: zvmlinux mkprep
./mkprep -pbp zvmlinux zImage
-endif
+else
+
ifeq ($(CONFIG_MBX),y)
+zImage: zvmlinux
ln -sf zvmlinux zImage
+else
+zImage:
+endif
+
endif
-zImage.initrd: zvmlinux.initrd mkprep
ifeq ($(CONFIG_PREP),y)
+zImage.initrd: zvmlinux.initrd mkprep
./mkprep -pbp zvmlinux.initrd zImage.initrd
endif
ifeq ($(CONFIG_MBX),y)
+zImage.initrd: zvmlinux.initrd
ln -sf zvmlinux.initrd zImage.initrd
endif
# then with the offset rebuild the bootloader so we know where the kernel is
#
$(CC) $(CFLAGS) -DINITRD_OFFSET=0 -DINITRD_SIZE=0 \
- -DZIMAGE_OFFSET=`sh offset zvmlinux image` \
- -DZIMAGE_SIZE=`sh size zvmlinux image` -DKERNELBASE=$(KERNELBASE) \
+ -DZIMAGE_OFFSET=`sh offset $(OBJDUMP) zvmlinux image` \
+ -DZIMAGE_SIZE=`sh size $(OBJDUMP) zvmlinux image` -DKERNELBASE=$(KERNELBASE) \
-c -o misc.o misc.c
$(LD) $(ZLINKFLAGS) -o zvmlinux.tmp $(OBJECTS)
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment --add-section=image=../coffboot/vmlinux.gz \
dd if=zImage of=/dev/fd0H1440 bs=64b
endif
-mkprep : mkprep.c
ifeq ($(CONFIG_PREP),y)
+mkprep : mkprep.c
$(HOSTCC) -DKERNELBASE=$(KERNELBASE) -o mkprep mkprep.c
endif
-znetboot : zImage
ifeq ($(CONFIG_PREP),y)
+znetboot : zImage
cp zImage /tftpboot/zImage.prep
-endif
+else
ifeq ($(CONFIG_MBX),y)
+znetboot : zImage
cp zImage /tftpboot/zImage.mbx
+else
+znetboot :
+endif
endif
znetboot.initrd : zImage.initrd
.text
/*
- * $Id: head.S,v 1.24 1998/07/21 02:43:50 cort Exp $
+ * $Id: head.S,v 1.26 1998/09/19 01:21:20 cort Exp $
*
* This code is loaded by the ROM loader at some arbitrary location.
* Move it to high memory so that it can load the kernel at 0x0000.
mr r3, r11
mr r21, r11
bl serial_init /* Init MBX serial port */
+
+ lis r8, 0xfa200000@h /* Disable Ethernet SCC */
+ li r0, 0
+ stw r0, 0x0a00(r8)
+
mr r11, r21
lis r8,start@h
ori r8,r8,start@l
as ptr to residual -- Cort*/
lis r6,cmd_line@h
ori r6,r6,cmd_line@l
+ lwz r6, 0(r6)
subi r7,r6,1
00: lbzu r2,1(r7)
cmpi 0,r2,0
* use SMC1, but gave up and decided to fix it here.
*/
#include <linux/types.h>
+#ifdef CONFIG_MBX
#include <asm/mbx.h>
+#endif
+#ifdef CONFIG_FADS
+#include <asm/fads.h>
+#endif
#include "../8xx_io/commproc.h"
+#ifdef CONFIG_MBX
#define MBX_CSR1 ((volatile u_char *)0xfa100000)
#define CSR1_COMEN (u_char)0x02
+#endif
-static cpm8xx_t *cpmp = (cpm8xx_t *)&(((immap_t *)MBX_IMAP_ADDR)->im_cpm);
+static cpm8xx_t *cpmp = (cpm8xx_t *)&(((immap_t *)IMAP_ADDR)->im_cpm);
void
serial_init(bd_t *bd)
*/
sp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
+#ifdef CONFIG_MBX
if (*MBX_CSR1 & CSR1_COMEN) {
/* COM1 is enabled. Initialize SMC1 and use it for
* the console port.
/* Enable SDMA.
*/
- ((immap_t *)MBX_IMAP_ADDR)->im_siu_conf.sc_sdcr = 1;
+ ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_sdcr = 1;
/* Use Port B for SMCs instead of other functions.
*/
*MBX_CSR1 &= ~CSR1_COMEN;
}
else {
+#endif
/* SMC1 is used as console port.
*/
tbdf = (cbd_t *)&cp->cp_dpmem[up->smc_tbase];
cp->cp_cpcr = mk_cr_cmd(CPM_CR_CH_SMC1,
CPM_CR_STOP_TX) | CPM_CR_FLG;
while (cp->cp_cpcr & CPM_CR_FLG);
+#ifdef CONFIG_MBX
}
+#endif
/* Make the first buffer the only buffer.
*/
/*
* misc.c
*
- * $Id: misc.c,v 1.49 1998/07/26 21:29:15 geert Exp $
+ * $Id: misc.c,v 1.52 1998/09/19 01:21:24 cort Exp $
*
* Adapted for PowerPC by Gary Thomas
*
* One day to be replaced by a single bootloader for chrp/prep/pmac. -- Cort
*/
+#include <linux/types.h>
#include "../coffboot/zlib.h"
#include "asm/residual.h"
#include <elf.h>
#include <asm/mmu.h>
#ifdef CONFIG_MBX
#include <asm/mbx.h>
-bd_t hold_board_info;
+#endif
+#ifdef CONFIG_FADS
+#include <asm/fads.h>
#endif
/*
char *avail_ram;
char *end_avail;
-char cmd_line[256];
-RESIDUAL hold_residual;
+/* Because of the limited amount of memory on the MBX, it presents
+ * loading problems. The biggest is that we load this boot program
+ * into a relatively low memory address, and the Linux kernel Bss often
+ * extends into this space when it get loaded. When the kernel starts
+ * and zeros the BSS space, it also writes over the information we
+ * save here and pass to the kernel (command line and board info).
+ * On the MBX we grab some known memory holes to hold this information.
+ */
+char cmd_buf[256];
+char *cmd_line = cmd_buf;
+
+#if defined(CONFIG_MBX) || defined(CONFIG_FADS)
+char *root_string = "root=/dev/nfs";
+char *nfsaddrs_string = "nfsaddrs=";
+char *nfsroot_string = "nfsroot=";
+char *defroot_string = "/sys/mbxroot";
+int do_ipaddrs(char **cmd_cp, int echo);
+void do_nfsroot(char **cmd_cp, char *dp);
+int strncmp(const char * cs,const char * ct,size_t count);
+char *strrchr(const char * s, int c);
+#endif
+
+RESIDUAL hold_resid_buf;
+RESIDUAL *hold_residual = &hold_resid_buf;
unsigned long initrd_start = 0, initrd_end = 0;
char *zimage_start;
int zimage_size;
while(1);
}
-#ifndef CONFIG_MBX
+#if !defined(CONFIG_MBX) && !defined(CONFIG_FADS)
static void clear_screen()
{
int i, j;
unsigned long i;
BATU *u;
BATL *l;
+#if defined(CONFIG_MBX) || defined(CONFIG_KB)
+ char *dp;
+#endif
lines = 25;
cols = 80;
orig_y = 24;
-#ifndef CONFIG_MBX
+#if !defined(CONFIG_MBX) && !defined(CONFIG_FADS)
/*
* IBM's have the MMU on, so we have to disable it or
* things get really unhappy in the kernel when
vga_init(0xC0000000);
if (residual)
- memcpy(&hold_residual,residual,sizeof(RESIDUAL));
+ memcpy(hold_residual,residual,sizeof(RESIDUAL));
#else /* CONFIG_MBX */
+
+ /* Grab some space for the command line and board info. Since
+ * we no longer use the ELF header, but it was loaded, grab
+ * that space.
+ */
+ cmd_line = (char *)(load_addr - 0x10000);
+ hold_residual = (RESIDUAL *)(cmd_line + sizeof(cmd_buf));
/* copy board data */
if (residual)
- _bcopy((char *)residual, (char *)&hold_board_info,
- sizeof(hold_board_info));
+ memcpy(hold_residual,residual,sizeof(bd_t));
#endif /* CONFIG_MBX */
/* MBX/prep sometimes put the residual/board info at the end of mem
* assume 16M for now -- Cort
+ * To boot on standard MBX boards with 4M, we can't use initrd,
+ * and we have to assume less memory. -- Dan
*/
- end_avail = (char *)0x01000000;
+ if ( INITRD_OFFSET )
+ end_avail = (char *)0x01000000;
+ else
+ end_avail = (char *)0x00400000;
+
/* let residual data tell us it's higher */
if ( (unsigned long)residual > 0x00800000 )
end_avail = (char *)PAGE_ALIGN((unsigned long)residual);
{
puts("board data at: "); puthex((unsigned long)residual);
puts(" ");
-#ifdef CONFIG_MBX
+#if defined(CONFIG_MBX) || defined(CONFIG_FADS)
puthex((unsigned long)((unsigned long)residual + sizeof(bd_t)));
#else
puthex((unsigned long)((unsigned long)residual + sizeof(RESIDUAL)));
#endif
puts("\n");
puts("relocated to: ");
-#ifdef CONFIG_MBX
- puthex((unsigned long)&hold_board_info);
-#else
- puthex((unsigned long)&hold_residual);
-#endif
+ puthex((unsigned long)hold_residual);
puts(" ");
-#ifdef CONFIG_MBX
- puthex((unsigned long)((unsigned long)&hold_board_info + sizeof(bd_t)));
+#if defined(CONFIG_MBX) || defined(CONFIG_FADS)
+ puthex((unsigned long)((unsigned long)hold_residual + sizeof(bd_t)));
#else
- puthex((unsigned long)((unsigned long)&hold_residual + sizeof(RESIDUAL)));
+ puthex((unsigned long)((unsigned long)hold_residual + sizeof(RESIDUAL)));
#endif
puts("\n");
}
/*
* don't relocate the zimage if it was loaded above 16M since
* things get weird if we try to relocate -- Cort
+ * We don't relocate zimage on a base MBX board because of
+ * insufficient memory. In this case we don't have initrd either,
+ * so use that as an indicator. -- Dan
*/
- if ( (unsigned long)zimage_start <= 0x01000000 )
+ if (( (unsigned long)zimage_start <= 0x01000000 ) && initrd_start)
{
memcpy ((void *)PAGE_ALIGN(-PAGE_SIZE+(unsigned long)end_avail-zimage_size),
(void *)zimage_start, zimage_size );
* max ram is.
* -- Cort
*/
+#if 0
memcpy ((void *)PAGE_ALIGN(-PAGE_SIZE+(unsigned long)end_avail-INITRD_SIZE),
(void *)initrd_start,
INITRD_SIZE );
end_avail = (char *)initrd_start;
puts("relocated to: "); puthex(initrd_start);
puts(" "); puthex(initrd_end); puts("\n");
+#endif
}
+#ifndef CONFIG_MBX
/* this is safe, just use it */
+ /* I don't know why it didn't work for me on the MBX with 20 MB
+ * memory. I guess something was saved up there, but I can't
+ * figure it out......we are running on luck. -- Dan.
+ */
avail_ram = (char *)0x00400000;
end_avail = (char *)0x00600000;
+#endif
puts("avail ram: "); puthex((unsigned long)avail_ram); puts(" ");
puthex((unsigned long)end_avail); puts("\n");
-#ifndef CONFIG_MBX
+#if !defined(CONFIG_MBX) && !defined(CONFIG_FADS)
CRT_tstc(); /* Forces keyboard to be initialized */
#endif
-#ifdef CONFIG_PREP
-/* I need to fix this for mbx -- Cort */
+
puts("\nLinux/PPC load: ");
timer = 0;
cp = cmd_line;
cp--;
puts("\b \b");
}
+#ifdef CONFIG_MBX
+ } else if (ch == '?') {
+ if (!do_ipaddrs(&cp, 1)) {
+ *cp++ = ch;
+ putc(ch);
+ }
+#endif
} else {
*cp++ = ch;
putc(ch);
udelay(1000); /* 1 msec */
}
*cp = 0;
+#ifdef CONFIG_MBX
+ /* The MBX does not currently have any default boot strategy.
+ * If the command line is not filled in, we will automatically
+ * create the default network boot.
+ */
+ if (cmd_line[0] == 0) {
+ dp = root_string;
+ while (*dp != 0)
+ *cp++ = *dp++;
+ *cp++ = ' ';
+
+ dp = nfsaddrs_string;
+ while (*dp != 0)
+ *cp++ = *dp++;
+ dp = cp;
+ do_ipaddrs(&cp, 0);
+ *cp++ = ' ';
+
+ /* Add the server address to the root file system path.
+ */
+ dp = strrchr(dp, ':');
+ dp++;
+ do_nfsroot(&cp, dp);
+ *cp = 0;
+ }
+#endif
puts("\n");
-#endif /* CONFIG_PREP */
+
/* mappings on early boot can only handle 16M */
- if ( (int)(&cmd_line[0]) > (16<<20))
+ if ( (int)(cmd_line[0]) > (16<<20))
puts("cmd_line located > 16M\n");
- if ( (int)&hold_residual > (16<<20))
+ if ( (int)hold_residual > (16<<20))
puts("hold_residual located > 16M\n");
if ( initrd_start > (16<<20))
puts("initrd_start located > 16M\n");
gunzip(0, 0x400000, zimage_start, &zimage_size);
puts("done.\n");
puts("Now booting the kernel\n");
-#ifndef CONFIG_MBX
- return (unsigned long)&hold_residual;
-#else
- return (unsigned long)&hold_board_info;
-#endif
+ return (unsigned long)hold_residual;
+}
+
+#ifdef CONFIG_MBX
+int
+do_ipaddrs(char **cmd_cp, int echo)
+{
+ char *cp, *ip, ch;
+ unsigned char ipd;
+ int i, j, retval;
+
+ /* We need to create the string:
+ * <my_ip>:<serv_ip>
+ */
+ cp = *cmd_cp;
+ retval = 0;
+
+ if ((cp - 9) >= cmd_line) {
+ if (strncmp(cp - 9, "nfsaddrs=", 9) == 0) {
+ ip = (char *)0xfa000060;
+ retval = 1;
+ for (j=0; j<2; j++) {
+ for (i=0; i<4; i++) {
+ ipd = *ip++;
+
+ ch = ipd/100;
+ if (ch) {
+ ch += '0';
+ if (echo)
+ putc(ch);
+ *cp++ = ch;
+ ipd -= 100 * (ch - '0');
+ }
+
+ ch = ipd/10;
+ if (ch) {
+ ch += '0';
+ if (echo)
+ putc(ch);
+ *cp++ = ch;
+ ipd -= 10 * (ch - '0');
+ }
+
+ ch = ipd + '0';
+ if (echo)
+ putc(ch);
+ *cp++ = ch;
+
+ ch = '.';
+ if (echo)
+ putc(ch);
+ *cp++ = ch;
+ }
+
+ /* At the end of the string, remove the
+ * '.' and replace it with a ':'.
+ */
+ *(cp - 1) = ':';
+ if (echo) {
+ putc('\b'); putc(':');
+ }
+ }
+
+ /* At the end of the second string, remove the
+ * '.' from both the command line and the
+ * screen.
+ */
+ --cp;
+ putc('\b'); putc(' '); putc('\b');
+ }
+ }
+ *cmd_cp = cp;
+ return(retval);
}
+void
+do_nfsroot(char **cmd_cp, char *dp)
+{
+ char *cp, *rp, *ep;
+
+ /* The boot argument (i.e /sys/mbxroot/zImage) is stored
+ * at offset 0x0078 in NVRAM. We use this path name to
+ * construct the root file system path.
+ */
+ cp = *cmd_cp;
+
+ /* build command string.
+ */
+ rp = nfsroot_string;
+ while (*rp != 0)
+ *cp++ = *rp++;
+
+ /* Add the server address to the path.
+ */
+ while (*dp != ' ')
+ *cp++ = *dp++;
+ *cp++ = ':';
+
+ rp = (char *)0xfa000078;
+ ep = strrchr(rp, '/');
+
+ if (ep != 0) {
+ while (rp < ep)
+ *cp++ = *rp++;
+ }
+ else {
+ rp = defroot_string;
+ while (*rp != 0)
+ *cp++ = *rp++;
+ }
+
+ *cmd_cp = cp;
+}
+
+size_t strlen(const char * s)
+{
+ const char *sc;
+
+ for (sc = s; *sc != '\0'; ++sc)
+ /* nothing */;
+ return sc - s;
+}
+
+int strncmp(const char * cs,const char * ct,size_t count)
+{
+ register signed char __res = 0;
+
+ while (count) {
+ if ((__res = *cs - *ct++) != 0 || !*cs++)
+ break;
+ count--;
+ }
+
+ return __res;
+}
+
+char * strrchr(const char * s, int c)
+{
+ const char *p = s + strlen(s);
+ do {
+ if (*p == (char)c)
+ return (char *)p;
+ } while (--p >= s);
+ return NULL;
+}
+#endif
+
void puthex(unsigned long val)
{
unsigned char buf[10];
* 3) -asm - strips elf header and writes out as asm data
* useful for generating data for a compressed image
* -- Cort
+ *
+ * Modified for x86 hosted builds by Matt Porter <porter@neta.com>
*/
#ifdef linux
#include <linux/types.h>
-#include <asm/stat.h>
+/*#include <asm/stat.h>*/
/*#include <asm/byteorder.h>*/ /* the byte swap funcs don't work here -- Cort */
#else
#include <unistd.h>
-#include <sys/stat.h>
#endif
+#include <sys/stat.h>
#include <stdio.h>
#include <errno.h>
bzero( block, sizeof block );
/* set entry point and boot image size skipping over elf header */
+#ifdef __i386__
+ *entry = 0x400/*+65536*/;
+ *length = info.st_size+0x400;
+#else
*entry = cpu_to_le32(0x400/*+65536*/);
*length = cpu_to_le32(info.st_size+0x400);
+#endif /* __i386__ */
/* sets magic number for msdos partition (used by linux) */
block[510] = 0x55;
pe->beginning_sector = cpu_to_le32(1);
#else
/* This has to be 0 on the PowerStack? */
+#ifdef __i386__
+ pe->beginning_sector = 0;
+#else
pe->beginning_sector = cpu_to_le32(0);
+#endif /* __i386__ */
#endif
+
+#ifdef __i386__
+ pe->number_of_sectors = 2*18*80-1;
+#else
pe->number_of_sectors = cpu_to_le32(2*18*80-1);
+#endif /* __i386__ */
write( out, block, sizeof(block) );
write( out, entry, sizeof(*entry) );
#!/bin/bash
-OFFSET=`objdump -h $1 | grep $2 | grep -v zvmlinux| awk '{print $6}'`
+OFFSET=`$1 -h $2 | grep $3 | grep -v zvmlinux| awk '{print $6}'`
echo "0x"$OFFSET
#!/bin/bash
-OFFSET=`objdump -h $1 | grep $2 | grep -v zvmlinux | awk '{print $3}'`
+OFFSET=`$1 -h $2 | grep $3 | grep -v zvmlinux | awk '{print $3}'`
echo "0x"$OFFSET
CONFIG_MAC_KEYBOARD=y
# CONFIG_MAC_FLOPPY is not set
# CONFIG_MAC_SERIAL is not set
-CONFIG_MACMOUSE=y
+# CONFIG_ADBMOUSE is not set
CONFIG_PROC_DEVICETREE=y
# CONFIG_KGDB is not set
# CONFIG_XMON is not set
+# CONFIG_TOTALMP is not set
#
# Plug and Play support
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_NCR53C7xx is not set
CONFIG_SCSI_NCR53C8XX=y
-# CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT is not set
-# CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE is not set
-# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
+CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
CONFIG_SCSI_NCR53C8XX_MAX_TAGS=4
CONFIG_SCSI_NCR53C8XX_SYNC=5
-# CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT is not set
+# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
+# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_EEXPRESS_PRO100 is not set
# CONFIG_LNE390 is not set
# CONFIG_NE2K_PCI is not set
+# CONFIG_TLAN is not set
# CONFIG_ES3210 is not set
# CONFIG_EPIC100 is not set
-# CONFIG_TLAN is not set
# CONFIG_ZNET is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
#
# CONFIG_CD_NO_IDESCSI is not set
-#
-# Filesystems
-#
-# CONFIG_QUOTA is not set
-# CONFIG_MINIX_FS is not set
-CONFIG_EXT2_FS=y
-CONFIG_ISO9660_FS=y
-# CONFIG_JOLIET is not set
-# CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-CONFIG_PROC_FS=y
-CONFIG_NFS_FS=y
-# CONFIG_NFSD is not set
-CONFIG_SUNRPC=y
-CONFIG_LOCKD=y
-# CONFIG_CODA_FS is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_NTFS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=y
-# CONFIG_ROMFS_FS is not set
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_UFS_FS is not set
-# CONFIG_ADFS_FS is not set
-# CONFIG_DEVPTS_FS is not set
-CONFIG_MAC_PARTITION=y
-# CONFIG_NLS is not set
-
#
# Console drivers
#
+CONFIG_DUMMY_CONSOLE=y
CONFIG_FB_OF=y
-CONFIG_FB_S3TRIO=y
+# CONFIG_FB_CONTROL is not set
+# CONFIG_FB_PLATINUM is not set
+# CONFIG_FB_VALKYRIE is not set
CONFIG_FB_ATY=y
+CONFIG_FB_IMSTT=y
+# CONFIG_FB_CT65550 is not set
+# CONFIG_FB_S3TRIO is not set
CONFIG_FB_VGA=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FBCON_ADVANCED is not set
CONFIG_FBCON_CFB8=y
CONFIG_FBCON_CFB16=y
+CONFIG_FBCON_CFB24=y
CONFIG_FBCON_CFB32=y
CONFIG_FBCON_VGA=y
+# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
+# CONFIG_FBCON_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
#
# Character devices
# CONFIG_SERIAL_CONSOLE is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_UNIX98_PTYS is not set
# CONFIG_MOUSE is not set
# CONFIG_UMISC is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_VIDEO_DEV is not set
CONFIG_NVRAM=y
# CONFIG_JOYSTICK is not set
-# CONFIG_MISC_RADIO is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
+#
+# Filesystems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_MINIX_FS is not set
+CONFIG_EXT2_FS=y
+CONFIG_ISO9660_FS=y
+# CONFIG_JOLIET is not set
+# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_UMSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+CONFIG_PROC_FS=y
+CONFIG_NFS_FS=y
+# CONFIG_NFSD is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_CODA_FS is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_AFFS_FS is not set
+CONFIG_HFS_FS=y
+# CONFIG_ROMFS_FS is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_ADFS_FS is not set
+CONFIG_MAC_PARTITION=y
+# CONFIG_NLS is not set
+
#
# Sound
#
CONFIG_SOUND=y
+# CONFIG_SOUND_ES1370 is not set
+# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
# CONFIG_SOUND_OSS is not set
LD_ARGS = -T ../vmlinux.lds -Ttext 0x00800000
OBJCOPY = $(CROSS_COMPILE)objcopy
-OBJS = crt0.o start.o main.o misc.o string.o zlib.o image.o # initrd.o
+OBJS = crt0.o start.o main.o misc.o ../coffboot/string.o ../coffboot/zlib.o image.o # initrd.o
LIBS = $(TOPDIR)/lib/lib.a
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
-#include "nonstdio.h"
-#include "zlib.h"
+#include "../coffboot/nonstdio.h"
+#include "../coffboot/zlib.h"
extern void *finddevice(const char *);
extern int getprop(void *, const char *, void *, int);
+++ /dev/null
-/*
- * Copyright (C) Paul Mackerras 1997.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-typedef int FILE;
-extern FILE *stdin, *stdout;
-#define NULL ((void *)0)
-#define EOF (-1)
-#define fopen(n, m) NULL
-#define fflush(f) 0
-#define fclose(f) 0
-extern char *fgets();
-
-#define perror(s) printf("%s: no files!\n", (s))
+++ /dev/null
-/*
- * This file is derived from various .h and .c files from the zlib-0.95
- * distribution by Jean-loup Gailly and Mark Adler, with some additions
- * by Paul Mackerras to aid in implementing Deflate compression and
- * decompression for PPP packets. See zlib.h for conditions of
- * distribution and use.
- *
- * Changes that have been made include:
- * - changed functions not used outside this file to "local"
- * - added minCompression parameter to deflateInit2
- * - added Z_PACKET_FLUSH (see zlib.h for details)
- * - added inflateIncomp
- *
- * $Id: zlib.c,v 1.1 1997/09/19 07:03:44 paulus Exp $
- */
-
-/*+++++*/
-/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* From: zutil.h,v 1.9 1995/05/03 17:27:12 jloup Exp */
-
-#define _Z_UTIL_H
-
-#include "zlib.h"
-
-#ifndef local
-# define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-#define FAR
-
-typedef unsigned char uch;
-typedef uch FAR uchf;
-typedef unsigned short ush;
-typedef ush FAR ushf;
-typedef unsigned long ulg;
-
-extern char *z_errmsg[]; /* indexed by 1-zlib_error */
-
-#define ERR_RETURN(strm,err) return (strm->msg=z_errmsg[1-err], err)
-/* To be used only when the state is known to be valid */
-
-#ifndef NULL
-#define NULL ((void *) 0)
-#endif
-
- /* common constants */
-
-#define DEFLATED 8
-
-#ifndef DEF_WBITS
-# define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#if MAX_MEM_LEVEL >= 8
-# define DEF_MEM_LEVEL 8
-#else
-# define DEF_MEM_LEVEL MAX_MEM_LEVEL
-#endif
-/* default memLevel */
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES 2
-/* The three kinds of block type */
-
-#define MIN_MATCH 3
-#define MAX_MATCH 258
-/* The minimum and maximum match lengths */
-
- /* functions */
-
-#include <string.h>
-#define zmemcpy memcpy
-#define zmemzero(dest, len) memset(dest, 0, len)
-
-/* Diagnostic functions */
-#ifdef DEBUG_ZLIB
-# include <stdio.h>
-# ifndef verbose
-# define verbose 0
-# endif
-# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
-# define Trace(x) fprintf x
-# define Tracev(x) {if (verbose) fprintf x ;}
-# define Tracevv(x) {if (verbose>1) fprintf x ;}
-# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
-# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
-#else
-# define Assert(cond,msg)
-# define Trace(x)
-# define Tracev(x)
-# define Tracevv(x)
-# define Tracec(c,x)
-# define Tracecv(c,x)
-#endif
-
-
-typedef uLong (*check_func) OF((uLong check, Bytef *buf, uInt len));
-
-/* voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); */
-/* void zcfree OF((voidpf opaque, voidpf ptr)); */
-
-#define ZALLOC(strm, items, size) \
- (*((strm)->zalloc))((strm)->opaque, (items), (size))
-#define ZFREE(strm, addr, size) \
- (*((strm)->zfree))((strm)->opaque, (voidpf)(addr), (size))
-#define TRY_FREE(s, p, n) {if (p) ZFREE(s, p, n);}
-
-/* deflate.h -- internal compression state
- * Copyright (C) 1995 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/*+++++*/
-/* infblock.h -- header to use infblock.c
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-struct inflate_blocks_state;
-typedef struct inflate_blocks_state FAR inflate_blocks_statef;
-
-local inflate_blocks_statef * inflate_blocks_new OF((
- z_stream *z,
- check_func c, /* check function */
- uInt w)); /* window size */
-
-local int inflate_blocks OF((
- inflate_blocks_statef *,
- z_stream *,
- int)); /* initial return code */
-
-local void inflate_blocks_reset OF((
- inflate_blocks_statef *,
- z_stream *,
- uLongf *)); /* check value on output */
-
-local int inflate_blocks_free OF((
- inflate_blocks_statef *,
- z_stream *,
- uLongf *)); /* check value on output */
-
-local int inflate_addhistory OF((
- inflate_blocks_statef *,
- z_stream *));
-
-local int inflate_packet_flush OF((
- inflate_blocks_statef *));
-
-/*+++++*/
-/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* Huffman code lookup table entry--this entry is four bytes for machines
- that have 16-bit pointers (e.g. PC's in the small or medium model). */
-
-typedef struct inflate_huft_s FAR inflate_huft;
-
-struct inflate_huft_s {
- union {
- struct {
- Byte Exop; /* number of extra bits or operation */
- Byte Bits; /* number of bits in this code or subcode */
- } what;
- uInt Nalloc; /* number of these allocated here */
- Bytef *pad; /* pad structure to a power of 2 (4 bytes for */
- } word; /* 16-bit, 8 bytes for 32-bit machines) */
- union {
- uInt Base; /* literal, length base, or distance base */
- inflate_huft *Next; /* pointer to next level of table */
- } more;
-};
-
-#ifdef DEBUG_ZLIB
- local uInt inflate_hufts;
-#endif
-
-local int inflate_trees_bits OF((
- uIntf *, /* 19 code lengths */
- uIntf *, /* bits tree desired/actual depth */
- inflate_huft * FAR *, /* bits tree result */
- z_stream *)); /* for zalloc, zfree functions */
-
-local int inflate_trees_dynamic OF((
- uInt, /* number of literal/length codes */
- uInt, /* number of distance codes */
- uIntf *, /* that many (total) code lengths */
- uIntf *, /* literal desired/actual bit depth */
- uIntf *, /* distance desired/actual bit depth */
- inflate_huft * FAR *, /* literal/length tree result */
- inflate_huft * FAR *, /* distance tree result */
- z_stream *)); /* for zalloc, zfree functions */
-
-local int inflate_trees_fixed OF((
- uIntf *, /* literal desired/actual bit depth */
- uIntf *, /* distance desired/actual bit depth */
- inflate_huft * FAR *, /* literal/length tree result */
- inflate_huft * FAR *)); /* distance tree result */
-
-local int inflate_trees_free OF((
- inflate_huft *, /* tables to free */
- z_stream *)); /* for zfree function */
-
-
-/*+++++*/
-/* infcodes.h -- header to use infcodes.c
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-struct inflate_codes_state;
-typedef struct inflate_codes_state FAR inflate_codes_statef;
-
-local inflate_codes_statef *inflate_codes_new OF((
- uInt, uInt,
- inflate_huft *, inflate_huft *,
- z_stream *));
-
-local int inflate_codes OF((
- inflate_blocks_statef *,
- z_stream *,
- int));
-
-local void inflate_codes_free OF((
- inflate_codes_statef *,
- z_stream *));
-
-
-/*+++++*/
-/* inflate.c -- zlib interface to inflate modules
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* inflate private state */
-struct internal_state {
-
- /* mode */
- enum {
- METHOD, /* waiting for method byte */
- FLAG, /* waiting for flag byte */
- BLOCKS, /* decompressing blocks */
- CHECK4, /* four check bytes to go */
- CHECK3, /* three check bytes to go */
- CHECK2, /* two check bytes to go */
- CHECK1, /* one check byte to go */
- DONE, /* finished check, done */
- BAD} /* got an error--stay here */
- mode; /* current inflate mode */
-
- /* mode dependent information */
- union {
- uInt method; /* if FLAGS, method byte */
- struct {
- uLong was; /* computed check value */
- uLong need; /* stream check value */
- } check; /* if CHECK, check values to compare */
- uInt marker; /* if BAD, inflateSync's marker bytes count */
- } sub; /* submode */
-
- /* mode independent information */
- int nowrap; /* flag for no wrapper */
- uInt wbits; /* log2(window size) (8..15, defaults to 15) */
- inflate_blocks_statef
- *blocks; /* current inflate_blocks state */
-
-};
-
-
-int inflateReset(z)
-z_stream *z;
-{
- uLong c;
-
- if (z == Z_NULL || z->state == Z_NULL)
- return Z_STREAM_ERROR;
- z->total_in = z->total_out = 0;
- z->msg = Z_NULL;
- z->state->mode = z->state->nowrap ? BLOCKS : METHOD;
- inflate_blocks_reset(z->state->blocks, z, &c);
- Trace((stderr, "inflate: reset\n"));
- return Z_OK;
-}
-
-
-int inflateEnd(z)
-z_stream *z;
-{
- uLong c;
-
- if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL)
- return Z_STREAM_ERROR;
- if (z->state->blocks != Z_NULL)
- inflate_blocks_free(z->state->blocks, z, &c);
- ZFREE(z, z->state, sizeof(struct internal_state));
- z->state = Z_NULL;
- Trace((stderr, "inflate: end\n"));
- return Z_OK;
-}
-
-
-int inflateInit2(z, w)
-z_stream *z;
-int w;
-{
- /* initialize state */
- if (z == Z_NULL)
- return Z_STREAM_ERROR;
-/* if (z->zalloc == Z_NULL) z->zalloc = zcalloc; */
-/* if (z->zfree == Z_NULL) z->zfree = zcfree; */
- if ((z->state = (struct internal_state FAR *)
- ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL)
- return Z_MEM_ERROR;
- z->state->blocks = Z_NULL;
-
- /* handle undocumented nowrap option (no zlib header or check) */
- z->state->nowrap = 0;
- if (w < 0)
- {
- w = - w;
- z->state->nowrap = 1;
- }
-
- /* set window size */
- if (w < 8 || w > 15)
- {
- inflateEnd(z);
- return Z_STREAM_ERROR;
- }
- z->state->wbits = (uInt)w;
-
- /* create inflate_blocks state */
- if ((z->state->blocks =
- inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, 1 << w))
- == Z_NULL)
- {
- inflateEnd(z);
- return Z_MEM_ERROR;
- }
- Trace((stderr, "inflate: allocated\n"));
-
- /* reset state */
- inflateReset(z);
- return Z_OK;
-}
-
-
-int inflateInit(z)
-z_stream *z;
-{
- return inflateInit2(z, DEF_WBITS);
-}
-
-
-#define NEEDBYTE {if(z->avail_in==0)goto empty;r=Z_OK;}
-#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)
-
-int inflate(z, f)
-z_stream *z;
-int f;
-{
- int r;
- uInt b;
-
- if (z == Z_NULL || z->next_in == Z_NULL)
- return Z_STREAM_ERROR;
- r = Z_BUF_ERROR;
- while (1) switch (z->state->mode)
- {
- case METHOD:
- NEEDBYTE
- if (((z->state->sub.method = NEXTBYTE) & 0xf) != DEFLATED)
- {
- z->state->mode = BAD;
- z->msg = "unknown compression method";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- if ((z->state->sub.method >> 4) + 8 > z->state->wbits)
- {
- z->state->mode = BAD;
- z->msg = "invalid window size";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- z->state->mode = FLAG;
- case FLAG:
- NEEDBYTE
- if ((b = NEXTBYTE) & 0x20)
- {
- z->state->mode = BAD;
- z->msg = "invalid reserved bit";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- if (((z->state->sub.method << 8) + b) % 31)
- {
- z->state->mode = BAD;
- z->msg = "incorrect header check";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- Trace((stderr, "inflate: zlib header ok\n"));
- z->state->mode = BLOCKS;
- case BLOCKS:
- r = inflate_blocks(z->state->blocks, z, r);
- if (f == Z_PACKET_FLUSH && z->avail_in == 0 && z->avail_out != 0)
- r = inflate_packet_flush(z->state->blocks);
- if (r == Z_DATA_ERROR)
- {
- z->state->mode = BAD;
- z->state->sub.marker = 0; /* can try inflateSync */
- break;
- }
- if (r != Z_STREAM_END)
- return r;
- r = Z_OK;
- inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was);
- if (z->state->nowrap)
- {
- z->state->mode = DONE;
- break;
- }
- z->state->mode = CHECK4;
- case CHECK4:
- NEEDBYTE
- z->state->sub.check.need = (uLong)NEXTBYTE << 24;
- z->state->mode = CHECK3;
- case CHECK3:
- NEEDBYTE
- z->state->sub.check.need += (uLong)NEXTBYTE << 16;
- z->state->mode = CHECK2;
- case CHECK2:
- NEEDBYTE
- z->state->sub.check.need += (uLong)NEXTBYTE << 8;
- z->state->mode = CHECK1;
- case CHECK1:
- NEEDBYTE
- z->state->sub.check.need += (uLong)NEXTBYTE;
-
- if (z->state->sub.check.was != z->state->sub.check.need)
- {
- z->state->mode = BAD;
- z->msg = "incorrect data check";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- Trace((stderr, "inflate: zlib check ok\n"));
- z->state->mode = DONE;
- case DONE:
- return Z_STREAM_END;
- case BAD:
- return Z_DATA_ERROR;
- default:
- return Z_STREAM_ERROR;
- }
-
- empty:
- if (f != Z_PACKET_FLUSH)
- return r;
- z->state->mode = BAD;
- z->state->sub.marker = 0; /* can try inflateSync */
- return Z_DATA_ERROR;
-}
-
-/*
- * This subroutine adds the data at next_in/avail_in to the output history
- * without performing any output. The output buffer must be "caught up";
- * i.e. no pending output (hence s->read equals s->write), and the state must
- * be BLOCKS (i.e. we should be willing to see the start of a series of
- * BLOCKS). On exit, the output will also be caught up, and the checksum
- * will have been updated if need be.
- */
-
-int inflateIncomp(z)
-z_stream *z;
-{
- if (z->state->mode != BLOCKS)
- return Z_DATA_ERROR;
- return inflate_addhistory(z->state->blocks, z);
-}
-
-
-int inflateSync(z)
-z_stream *z;
-{
- uInt n; /* number of bytes to look at */
- Bytef *p; /* pointer to bytes */
- uInt m; /* number of marker bytes found in a row */
- uLong r, w; /* temporaries to save total_in and total_out */
-
- /* set up */
- if (z == Z_NULL || z->state == Z_NULL)
- return Z_STREAM_ERROR;
- if (z->state->mode != BAD)
- {
- z->state->mode = BAD;
- z->state->sub.marker = 0;
- }
- if ((n = z->avail_in) == 0)
- return Z_BUF_ERROR;
- p = z->next_in;
- m = z->state->sub.marker;
-
- /* search */
- while (n && m < 4)
- {
- if (*p == (Byte)(m < 2 ? 0 : 0xff))
- m++;
- else if (*p)
- m = 0;
- else
- m = 4 - m;
- p++, n--;
- }
-
- /* restore */
- z->total_in += p - z->next_in;
- z->next_in = p;
- z->avail_in = n;
- z->state->sub.marker = m;
-
- /* return no joy or set up to restart on a new block */
- if (m != 4)
- return Z_DATA_ERROR;
- r = z->total_in; w = z->total_out;
- inflateReset(z);
- z->total_in = r; z->total_out = w;
- z->state->mode = BLOCKS;
- return Z_OK;
-}
-
-#undef NEEDBYTE
-#undef NEXTBYTE
-
-/*+++++*/
-/* infutil.h -- types and macros common to blocks and codes
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* inflate blocks semi-private state */
-struct inflate_blocks_state {
-
- /* mode */
- enum {
- TYPE, /* get type bits (3, including end bit) */
- LENS, /* get lengths for stored */
- STORED, /* processing stored block */
- TABLE, /* get table lengths */
- BTREE, /* get bit lengths tree for a dynamic block */
- DTREE, /* get length, distance trees for a dynamic block */
- CODES, /* processing fixed or dynamic block */
- DRY, /* output remaining window bytes */
- DONEB, /* finished last block, done */
- BADB} /* got a data error--stuck here */
- mode; /* current inflate_block mode */
-
- /* mode dependent information */
- union {
- uInt left; /* if STORED, bytes left to copy */
- struct {
- uInt table; /* table lengths (14 bits) */
- uInt index; /* index into blens (or border) */
- uIntf *blens; /* bit lengths of codes */
- uInt bb; /* bit length tree depth */
- inflate_huft *tb; /* bit length decoding tree */
- int nblens; /* # elements allocated at blens */
- } trees; /* if DTREE, decoding info for trees */
- struct {
- inflate_huft *tl, *td; /* trees to free */
- inflate_codes_statef
- *codes;
- } decode; /* if CODES, current state */
- } sub; /* submode */
- uInt last; /* true if this block is the last block */
-
- /* mode independent information */
- uInt bitk; /* bits in bit buffer */
- uLong bitb; /* bit buffer */
- Bytef *window; /* sliding window */
- Bytef *end; /* one byte after sliding window */
- Bytef *read; /* window read pointer */
- Bytef *write; /* window write pointer */
- check_func checkfn; /* check function */
- uLong check; /* check on output */
-
-};
-
-
-/* defines for inflate input/output */
-/* update pointers and return */
-#define UPDBITS {s->bitb=b;s->bitk=k;}
-#define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;}
-#define UPDOUT {s->write=q;}
-#define UPDATE {UPDBITS UPDIN UPDOUT}
-#define LEAVE {UPDATE return inflate_flush(s,z,r);}
-/* get bytes and bits */
-#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}
-#define NEEDBYTE {if(n)r=Z_OK;else LEAVE}
-#define NEXTBYTE (n--,*p++)
-#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}}
-#define DUMPBITS(j) {b>>=(j);k-=(j);}
-/* output bytes */
-#define WAVAIL (q<s->read?s->read-q-1:s->end-q)
-#define LOADOUT {q=s->write;m=WAVAIL;}
-#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=WAVAIL;}}
-#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT}
-#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;}
-#define OUTBYTE(a) {*q++=(Byte)(a);m--;}
-/* load local pointers */
-#define LOAD {LOADIN LOADOUT}
-
-/* And'ing with mask[n] masks the lower n bits */
-local uInt inflate_mask[] = {
- 0x0000,
- 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
- 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
-};
-
-/* copy as much as possible from the sliding window to the output area */
-local int inflate_flush OF((
- inflate_blocks_statef *,
- z_stream *,
- int));
-
-/*+++++*/
-/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-local int inflate_fast OF((
- uInt,
- uInt,
- inflate_huft *,
- inflate_huft *,
- inflate_blocks_statef *,
- z_stream *));
-
-
-/*+++++*/
-/* infblock.c -- interpret and process block types to last block
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* Table for deflate from PKZIP's appnote.txt. */
-local uInt border[] = { /* Order of the bit length code lengths */
- 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-/*
- Notes beyond the 1.93a appnote.txt:
-
- 1. Distance pointers never point before the beginning of the output
- stream.
- 2. Distance pointers can point back across blocks, up to 32k away.
- 3. There is an implied maximum of 7 bits for the bit length table and
- 15 bits for the actual data.
- 4. If only one code exists, then it is encoded using one bit. (Zero
- would be more efficient, but perhaps a little confusing.) If two
- codes exist, they are coded using one bit each (0 and 1).
- 5. There is no way of sending zero distance codes--a dummy must be
- sent if there are none. (History: a pre 2.0 version of PKZIP would
- store blocks with no distance codes, but this was discovered to be
- too harsh a criterion.) Valid only for 1.93a. 2.04c does allow
- zero distance codes, which is sent as one code of zero bits in
- length.
- 6. There are up to 286 literal/length codes. Code 256 represents the
- end-of-block. Note however that the static length tree defines
- 288 codes just to fill out the Huffman codes. Codes 286 and 287
- cannot be used though, since there is no length base or extra bits
- defined for them. Similarily, there are up to 30 distance codes.
- However, static trees define 32 codes (all 5 bits) to fill out the
- Huffman codes, but the last two had better not show up in the data.
- 7. Unzip can check dynamic Huffman blocks for complete code sets.
- The exception is that a single code would not be complete (see #4).
- 8. The five bits following the block type is really the number of
- literal codes sent minus 257.
- 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
- (1+6+6). Therefore, to output three times the length, you output
- three codes (1+1+1), whereas to output four times the same length,
- you only need two codes (1+3). Hmm.
- 10. In the tree reconstruction algorithm, Code = Code + Increment
- only if BitLength(i) is not zero. (Pretty obvious.)
- 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19)
- 12. Note: length code 284 can represent 227-258, but length code 285
- really is 258. The last length deserves its own, short code
- since it gets used a lot in very redundant files. The length
- 258 is special since 258 - 3 (the min match length) is 255.
- 13. The literal/length and distance code bit lengths are read as a
- single stream of lengths. It is possible (and advantageous) for
- a repeat code (16, 17, or 18) to go across the boundary between
- the two sets of lengths.
- */
-
-
-local void inflate_blocks_reset(s, z, c)
-inflate_blocks_statef *s;
-z_stream *z;
-uLongf *c;
-{
- if (s->checkfn != Z_NULL)
- *c = s->check;
- if (s->mode == BTREE || s->mode == DTREE)
- ZFREE(z, s->sub.trees.blens, s->sub.trees.nblens * sizeof(uInt));
- if (s->mode == CODES)
- {
- inflate_codes_free(s->sub.decode.codes, z);
- inflate_trees_free(s->sub.decode.td, z);
- inflate_trees_free(s->sub.decode.tl, z);
- }
- s->mode = TYPE;
- s->bitk = 0;
- s->bitb = 0;
- s->read = s->write = s->window;
- if (s->checkfn != Z_NULL)
- s->check = (*s->checkfn)(0L, Z_NULL, 0);
- Trace((stderr, "inflate: blocks reset\n"));
-}
-
-
-local inflate_blocks_statef *inflate_blocks_new(z, c, w)
-z_stream *z;
-check_func c;
-uInt w;
-{
- inflate_blocks_statef *s;
-
- if ((s = (inflate_blocks_statef *)ZALLOC
- (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL)
- return s;
- if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL)
- {
- ZFREE(z, s, sizeof(struct inflate_blocks_state));
- return Z_NULL;
- }
- s->end = s->window + w;
- s->checkfn = c;
- s->mode = TYPE;
- Trace((stderr, "inflate: blocks allocated\n"));
- inflate_blocks_reset(s, z, &s->check);
- return s;
-}
-
-
-local int inflate_blocks(s, z, r)
-inflate_blocks_statef *s;
-z_stream *z;
-int r;
-{
- uInt t; /* temporary storage */
- uLong b; /* bit buffer */
- uInt k; /* bits in bit buffer */
- Bytef *p; /* input data pointer */
- uInt n; /* bytes available there */
- Bytef *q; /* output window write pointer */
- uInt m; /* bytes to end of window or read pointer */
-
- /* copy input/output information to locals (UPDATE macro restores) */
- LOAD
-
- /* process input based on current state */
- while (1) switch (s->mode)
- {
- case TYPE:
- NEEDBITS(3)
- t = (uInt)b & 7;
- s->last = t & 1;
- switch (t >> 1)
- {
- case 0: /* stored */
- Trace((stderr, "inflate: stored block%s\n",
- s->last ? " (last)" : ""));
- DUMPBITS(3)
- t = k & 7; /* go to byte boundary */
- DUMPBITS(t)
- s->mode = LENS; /* get length of stored block */
- break;
- case 1: /* fixed */
- Trace((stderr, "inflate: fixed codes block%s\n",
- s->last ? " (last)" : ""));
- {
- uInt bl, bd;
- inflate_huft *tl, *td;
-
- inflate_trees_fixed(&bl, &bd, &tl, &td);
- s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);
- if (s->sub.decode.codes == Z_NULL)
- {
- r = Z_MEM_ERROR;
- LEAVE
- }
- s->sub.decode.tl = Z_NULL; /* don't try to free these */
- s->sub.decode.td = Z_NULL;
- }
- DUMPBITS(3)
- s->mode = CODES;
- break;
- case 2: /* dynamic */
- Trace((stderr, "inflate: dynamic codes block%s\n",
- s->last ? " (last)" : ""));
- DUMPBITS(3)
- s->mode = TABLE;
- break;
- case 3: /* illegal */
- DUMPBITS(3)
- s->mode = BADB;
- z->msg = "invalid block type";
- r = Z_DATA_ERROR;
- LEAVE
- }
- break;
- case LENS:
- NEEDBITS(32)
- if (((~b) >> 16) != (b & 0xffff))
- {
- s->mode = BADB;
- z->msg = "invalid stored block lengths";
- r = Z_DATA_ERROR;
- LEAVE
- }
- s->sub.left = (uInt)b & 0xffff;
- b = k = 0; /* dump bits */
- Tracev((stderr, "inflate: stored length %u\n", s->sub.left));
- s->mode = s->sub.left ? STORED : TYPE;
- break;
- case STORED:
- if (n == 0)
- LEAVE
- NEEDOUT
- t = s->sub.left;
- if (t > n) t = n;
- if (t > m) t = m;
- zmemcpy(q, p, t);
- p += t; n -= t;
- q += t; m -= t;
- if ((s->sub.left -= t) != 0)
- break;
- Tracev((stderr, "inflate: stored end, %lu total out\n",
- z->total_out + (q >= s->read ? q - s->read :
- (s->end - s->read) + (q - s->window))));
- s->mode = s->last ? DRY : TYPE;
- break;
- case TABLE:
- NEEDBITS(14)
- s->sub.trees.table = t = (uInt)b & 0x3fff;
-#ifndef PKZIP_BUG_WORKAROUND
- if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29)
- {
- s->mode = BADB;
- z->msg = "too many length or distance symbols";
- r = Z_DATA_ERROR;
- LEAVE
- }
-#endif
- t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);
- if (t < 19)
- t = 19;
- if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)
- {
- r = Z_MEM_ERROR;
- LEAVE
- }
- s->sub.trees.nblens = t;
- DUMPBITS(14)
- s->sub.trees.index = 0;
- Tracev((stderr, "inflate: table sizes ok\n"));
- s->mode = BTREE;
- case BTREE:
- while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))
- {
- NEEDBITS(3)
- s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7;
- DUMPBITS(3)
- }
- while (s->sub.trees.index < 19)
- s->sub.trees.blens[border[s->sub.trees.index++]] = 0;
- s->sub.trees.bb = 7;
- t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb,
- &s->sub.trees.tb, z);
- if (t != Z_OK)
- {
- r = t;
- if (r == Z_DATA_ERROR)
- s->mode = BADB;
- LEAVE
- }
- s->sub.trees.index = 0;
- Tracev((stderr, "inflate: bits tree ok\n"));
- s->mode = DTREE;
- case DTREE:
- while (t = s->sub.trees.table,
- s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))
- {
- inflate_huft *h;
- uInt i, j, c;
-
- t = s->sub.trees.bb;
- NEEDBITS(t)
- h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]);
- t = h->word.what.Bits;
- c = h->more.Base;
- if (c < 16)
- {
- DUMPBITS(t)
- s->sub.trees.blens[s->sub.trees.index++] = c;
- }
- else /* c == 16..18 */
- {
- i = c == 18 ? 7 : c - 14;
- j = c == 18 ? 11 : 3;
- NEEDBITS(t + i)
- DUMPBITS(t)
- j += (uInt)b & inflate_mask[i];
- DUMPBITS(i)
- i = s->sub.trees.index;
- t = s->sub.trees.table;
- if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||
- (c == 16 && i < 1))
- {
- s->mode = BADB;
- z->msg = "invalid bit length repeat";
- r = Z_DATA_ERROR;
- LEAVE
- }
- c = c == 16 ? s->sub.trees.blens[i - 1] : 0;
- do {
- s->sub.trees.blens[i++] = c;
- } while (--j);
- s->sub.trees.index = i;
- }
- }
- inflate_trees_free(s->sub.trees.tb, z);
- s->sub.trees.tb = Z_NULL;
- {
- uInt bl, bd;
- inflate_huft *tl, *td;
- inflate_codes_statef *c;
-
- bl = 9; /* must be <= 9 for lookahead assumptions */
- bd = 6; /* must be <= 9 for lookahead assumptions */
- t = s->sub.trees.table;
- t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
- s->sub.trees.blens, &bl, &bd, &tl, &td, z);
- if (t != Z_OK)
- {
- if (t == (uInt)Z_DATA_ERROR)
- s->mode = BADB;
- r = t;
- LEAVE
- }
- Tracev((stderr, "inflate: trees ok\n"));
- if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)
- {
- inflate_trees_free(td, z);
- inflate_trees_free(tl, z);
- r = Z_MEM_ERROR;
- LEAVE
- }
- ZFREE(z, s->sub.trees.blens, s->sub.trees.nblens * sizeof(uInt));
- s->sub.decode.codes = c;
- s->sub.decode.tl = tl;
- s->sub.decode.td = td;
- }
- s->mode = CODES;
- case CODES:
- UPDATE
- if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)
- return inflate_flush(s, z, r);
- r = Z_OK;
- inflate_codes_free(s->sub.decode.codes, z);
- inflate_trees_free(s->sub.decode.td, z);
- inflate_trees_free(s->sub.decode.tl, z);
- LOAD
- Tracev((stderr, "inflate: codes end, %lu total out\n",
- z->total_out + (q >= s->read ? q - s->read :
- (s->end - s->read) + (q - s->window))));
- if (!s->last)
- {
- s->mode = TYPE;
- break;
- }
- if (k > 7) /* return unused byte, if any */
- {
- Assert(k < 16, "inflate_codes grabbed too many bytes")
- k -= 8;
- n++;
- p--; /* can always return one */
- }
- s->mode = DRY;
- case DRY:
- FLUSH
- if (s->read != s->write)
- LEAVE
- s->mode = DONEB;
- case DONEB:
- r = Z_STREAM_END;
- LEAVE
- case BADB:
- r = Z_DATA_ERROR;
- LEAVE
- default:
- r = Z_STREAM_ERROR;
- LEAVE
- }
-}
-
-
-local int inflate_blocks_free(s, z, c)
-inflate_blocks_statef *s;
-z_stream *z;
-uLongf *c;
-{
- inflate_blocks_reset(s, z, c);
- ZFREE(z, s->window, s->end - s->window);
- ZFREE(z, s, sizeof(struct inflate_blocks_state));
- Trace((stderr, "inflate: blocks freed\n"));
- return Z_OK;
-}
-
-/*
- * This subroutine adds the data at next_in/avail_in to the output history
- * without performing any output. The output buffer must be "caught up";
- * i.e. no pending output (hence s->read equals s->write), and the state must
- * be BLOCKS (i.e. we should be willing to see the start of a series of
- * BLOCKS). On exit, the output will also be caught up, and the checksum
- * will have been updated if need be.
- */
-local int inflate_addhistory(s, z)
-inflate_blocks_statef *s;
-z_stream *z;
-{
- uLong b; /* bit buffer */ /* NOT USED HERE */
- uInt k; /* bits in bit buffer */ /* NOT USED HERE */
- uInt t; /* temporary storage */
- Bytef *p; /* input data pointer */
- uInt n; /* bytes available there */
- Bytef *q; /* output window write pointer */
- uInt m; /* bytes to end of window or read pointer */
-
- if (s->read != s->write)
- return Z_STREAM_ERROR;
- if (s->mode != TYPE)
- return Z_DATA_ERROR;
-
- /* we're ready to rock */
- LOAD
- /* while there is input ready, copy to output buffer, moving
- * pointers as needed.
- */
- while (n) {
- t = n; /* how many to do */
- /* is there room until end of buffer? */
- if (t > m) t = m;
- /* update check information */
- if (s->checkfn != Z_NULL)
- s->check = (*s->checkfn)(s->check, q, t);
- zmemcpy(q, p, t);
- q += t;
- p += t;
- n -= t;
- z->total_out += t;
- s->read = q; /* drag read pointer forward */
-/* WRAP */ /* expand WRAP macro by hand to handle s->read */
- if (q == s->end) {
- s->read = q = s->window;
- m = WAVAIL;
- }
- }
- UPDATE
- return Z_OK;
-}
-
-
-/*
- * At the end of a Deflate-compressed PPP packet, we expect to have seen
- * a `stored' block type value but not the (zero) length bytes.
- */
-local int inflate_packet_flush(s)
- inflate_blocks_statef *s;
-{
- if (s->mode != LENS)
- return Z_DATA_ERROR;
- s->mode = TYPE;
- return Z_OK;
-}
-
-
-/*+++++*/
-/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* simplify the use of the inflate_huft type with some defines */
-#define base more.Base
-#define next more.Next
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-
-local int huft_build OF((
- uIntf *, /* code lengths in bits */
- uInt, /* number of codes */
- uInt, /* number of "simple" codes */
- uIntf *, /* list of base values for non-simple codes */
- uIntf *, /* list of extra bits for non-simple codes */
- inflate_huft * FAR*,/* result: starting table */
- uIntf *, /* maximum lookup bits (returns actual) */
- z_stream *)); /* for zalloc function */
-
-local voidpf falloc OF((
- voidpf, /* opaque pointer (not used) */
- uInt, /* number of items */
- uInt)); /* size of item */
-
-local void ffree OF((
- voidpf q, /* opaque pointer (not used) */
- voidpf p, /* what to free (not used) */
- uInt n)); /* number of bytes (not used) */
-
-/* Tables for deflate from PKZIP's appnote.txt. */
-local uInt cplens[] = { /* Copy lengths for literal codes 257..285 */
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
- 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
- /* actually lengths - 2; also see note #13 above about 258 */
-local uInt cplext[] = { /* Extra bits for literal codes 257..285 */
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
- 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 192, 192}; /* 192==invalid */
-local uInt cpdist[] = { /* Copy offsets for distance codes 0..29 */
- 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
- 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
- 8193, 12289, 16385, 24577};
-local uInt cpdext[] = { /* Extra bits for distance codes */
- 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
- 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
- 12, 12, 13, 13};
-
-/*
- Huffman code decoding is performed using a multi-level table lookup.
- The fastest way to decode is to simply build a lookup table whose
- size is determined by the longest code. However, the time it takes
- to build this table can also be a factor if the data being decoded
- is not very long. The most common codes are necessarily the
- shortest codes, so those codes dominate the decoding time, and hence
- the speed. The idea is you can have a shorter table that decodes the
- shorter, more probable codes, and then point to subsidiary tables for
- the longer codes. The time it costs to decode the longer codes is
- then traded against the time it takes to make longer tables.
-
- This results of this trade are in the variables lbits and dbits
- below. lbits is the number of bits the first level table for literal/
- length codes can decode in one step, and dbits is the same thing for
- the distance codes. Subsequent tables are also less than or equal to
- those sizes. These values may be adjusted either when all of the
- codes are shorter than that, in which case the longest code length in
- bits is used, or when the shortest code is *longer* than the requested
- table size, in which case the length of the shortest code in bits is
- used.
-
- There are two different values for the two tables, since they code a
- different number of possibilities each. The literal/length table
- codes 286 possible values, or in a flat code, a little over eight
- bits. The distance table codes 30 possible values, or a little less
- than five bits, flat. The optimum values for speed end up being
- about one bit more than those, so lbits is 8+1 and dbits is 5+1.
- The optimum values may differ though from machine to machine, and
- possibly even between compilers. Your mileage may vary.
- */
-
-
-/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */
-#define BMAX 15 /* maximum bit length of any code */
-#define N_MAX 288 /* maximum number of codes in any set */
-
-#ifdef DEBUG_ZLIB
- uInt inflate_hufts;
-#endif
-
-local int huft_build(b, n, s, d, e, t, m, zs)
-uIntf *b; /* code lengths in bits (all assumed <= BMAX) */
-uInt n; /* number of codes (assumed <= N_MAX) */
-uInt s; /* number of simple-valued codes (0..s-1) */
-uIntf *d; /* list of base values for non-simple codes */
-uIntf *e; /* list of extra bits for non-simple codes */
-inflate_huft * FAR *t; /* result: starting table */
-uIntf *m; /* maximum lookup bits, returns actual */
-z_stream *zs; /* for zalloc function */
-/* Given a list of code lengths and a maximum table size, make a set of
- tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR
- if the given code set is incomplete (the tables are still built in this
- case), Z_DATA_ERROR if the input is invalid (all zero length codes or an
- over-subscribed set of lengths), or Z_MEM_ERROR if not enough memory. */
-{
-
- uInt a; /* counter for codes of length k */
- uInt c[BMAX+1]; /* bit length count table */
- uInt f; /* i repeats in table every f entries */
- int g; /* maximum code length */
- int h; /* table level */
- register uInt i; /* counter, current code */
- register uInt j; /* counter */
- register int k; /* number of bits in current code */
- int l; /* bits per table (returned in m) */
- register uIntf *p; /* pointer into c[], b[], or v[] */
- inflate_huft *q; /* points to current table */
- struct inflate_huft_s r; /* table entry for structure assignment */
- inflate_huft *u[BMAX]; /* table stack */
- uInt v[N_MAX]; /* values in order of bit length */
- register int w; /* bits before this table == (l * h) */
- uInt x[BMAX+1]; /* bit offsets, then code stack */
- uIntf *xp; /* pointer into x */
- int y; /* number of dummy codes added */
- uInt z; /* number of entries in current table */
-
-
- /* Generate counts for each bit length */
- p = c;
-#define C0 *p++ = 0;
-#define C2 C0 C0 C0 C0
-#define C4 C2 C2 C2 C2
- C4 /* clear c[]--assume BMAX+1 is 16 */
- p = b; i = n;
- do {
- c[*p++]++; /* assume all entries <= BMAX */
- } while (--i);
- if (c[0] == n) /* null input--all zero length codes */
- {
- *t = (inflate_huft *)Z_NULL;
- *m = 0;
- return Z_OK;
- }
-
-
- /* Find minimum and maximum length, bound *m by those */
- l = *m;
- for (j = 1; j <= BMAX; j++)
- if (c[j])
- break;
- k = j; /* minimum code length */
- if ((uInt)l < j)
- l = j;
- for (i = BMAX; i; i--)
- if (c[i])
- break;
- g = i; /* maximum code length */
- if ((uInt)l > i)
- l = i;
- *m = l;
-
-
- /* Adjust last length count to fill out codes, if needed */
- for (y = 1 << j; j < i; j++, y <<= 1)
- if ((y -= c[j]) < 0)
- return Z_DATA_ERROR;
- if ((y -= c[i]) < 0)
- return Z_DATA_ERROR;
- c[i] += y;
-
-
- /* Generate starting offsets into the value table for each length */
- x[1] = j = 0;
- p = c + 1; xp = x + 2;
- while (--i) { /* note that i == g from above */
- *xp++ = (j += *p++);
- }
-
-
- /* Make a table of values in order of bit lengths */
- p = b; i = 0;
- do {
- if ((j = *p++) != 0)
- v[x[j]++] = i;
- } while (++i < n);
-
-
- /* Generate the Huffman codes and for each, make the table entries */
- x[0] = i = 0; /* first Huffman code is zero */
- p = v; /* grab values in bit order */
- h = -1; /* no tables yet--level -1 */
- w = -l; /* bits decoded == (l * h) */
- u[0] = (inflate_huft *)Z_NULL; /* just to keep compilers happy */
- q = (inflate_huft *)Z_NULL; /* ditto */
- z = 0; /* ditto */
-
- /* go through the bit lengths (k already is bits in shortest code) */
- for (; k <= g; k++)
- {
- a = c[k];
- while (a--)
- {
- /* here i is the Huffman code of length k bits for value *p */
- /* make tables up to required level */
- while (k > w + l)
- {
- h++;
- w += l; /* previous table always l bits */
-
- /* compute minimum size table less than or equal to l bits */
- z = (z = g - w) > (uInt)l ? l : z; /* table size upper limit */
- if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */
- { /* too few codes for k-w bit table */
- f -= a + 1; /* deduct codes from patterns left */
- xp = c + k;
- if (j < z)
- while (++j < z) /* try smaller tables up to z bits */
- {
- if ((f <<= 1) <= *++xp)
- break; /* enough codes to use up j bits */
- f -= *xp; /* else deduct codes from patterns */
- }
- }
- z = 1 << j; /* table entries for j-bit table */
-
- /* allocate and link in new table */
- if ((q = (inflate_huft *)ZALLOC
- (zs,z + 1,sizeof(inflate_huft))) == Z_NULL)
- {
- if (h)
- inflate_trees_free(u[0], zs);
- return Z_MEM_ERROR; /* not enough memory */
- }
- q->word.Nalloc = z + 1;
-#ifdef DEBUG_ZLIB
- inflate_hufts += z + 1;
-#endif
- *t = q + 1; /* link to list for huft_free() */
- *(t = &(q->next)) = Z_NULL;
- u[h] = ++q; /* table starts after link */
-
- /* connect to last table, if there is one */
- if (h)
- {
- x[h] = i; /* save pattern for backing up */
- r.bits = (Byte)l; /* bits to dump before this table */
- r.exop = (Byte)j; /* bits in this table */
- r.next = q; /* pointer to this table */
- j = i >> (w - l); /* (get around Turbo C bug) */
- u[h-1][j] = r; /* connect to last table */
- }
- }
-
- /* set up table entry in r */
- r.bits = (Byte)(k - w);
- if (p >= v + n)
- r.exop = 128 + 64; /* out of values--invalid code */
- else if (*p < s)
- {
- r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); /* 256 is end-of-block */
- r.base = *p++; /* simple code is just the value */
- }
- else
- {
- r.exop = (Byte)e[*p - s] + 16 + 64; /* non-simple--look up in lists */
- r.base = d[*p++ - s];
- }
-
- /* fill code-like entries with r */
- f = 1 << (k - w);
- for (j = i >> w; j < z; j += f)
- q[j] = r;
-
- /* backwards increment the k-bit code i */
- for (j = 1 << (k - 1); i & j; j >>= 1)
- i ^= j;
- i ^= j;
-
- /* backup over finished tables */
- while ((i & ((1 << w) - 1)) != x[h])
- {
- h--; /* don't need to update q */
- w -= l;
- }
- }
- }
-
-
- /* Return Z_BUF_ERROR if we were given an incomplete table */
- return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK;
-}
-
-
-local int inflate_trees_bits(c, bb, tb, z)
-uIntf *c; /* 19 code lengths */
-uIntf *bb; /* bits tree desired/actual depth */
-inflate_huft * FAR *tb; /* bits tree result */
-z_stream *z; /* for zfree function */
-{
- int r;
-
- r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL, tb, bb, z);
- if (r == Z_DATA_ERROR)
- z->msg = "oversubscribed dynamic bit lengths tree";
- else if (r == Z_BUF_ERROR)
- {
- inflate_trees_free(*tb, z);
- z->msg = "incomplete dynamic bit lengths tree";
- r = Z_DATA_ERROR;
- }
- return r;
-}
-
-
-local int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, z)
-uInt nl; /* number of literal/length codes */
-uInt nd; /* number of distance codes */
-uIntf *c; /* that many (total) code lengths */
-uIntf *bl; /* literal desired/actual bit depth */
-uIntf *bd; /* distance desired/actual bit depth */
-inflate_huft * FAR *tl; /* literal/length tree result */
-inflate_huft * FAR *td; /* distance tree result */
-z_stream *z; /* for zfree function */
-{
- int r;
-
- /* build literal/length tree */
- if ((r = huft_build(c, nl, 257, cplens, cplext, tl, bl, z)) != Z_OK)
- {
- if (r == Z_DATA_ERROR)
- z->msg = "oversubscribed literal/length tree";
- else if (r == Z_BUF_ERROR)
- {
- inflate_trees_free(*tl, z);
- z->msg = "incomplete literal/length tree";
- r = Z_DATA_ERROR;
- }
- return r;
- }
-
- /* build distance tree */
- if ((r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, z)) != Z_OK)
- {
- if (r == Z_DATA_ERROR)
- z->msg = "oversubscribed literal/length tree";
- else if (r == Z_BUF_ERROR) {
-#ifdef PKZIP_BUG_WORKAROUND
- r = Z_OK;
- }
-#else
- inflate_trees_free(*td, z);
- z->msg = "incomplete literal/length tree";
- r = Z_DATA_ERROR;
- }
- inflate_trees_free(*tl, z);
- return r;
-#endif
- }
-
- /* done */
- return Z_OK;
-}
-
-
-/* build fixed tables only once--keep them here */
-local int fixed_lock = 0;
-local int fixed_built = 0;
-#define FIXEDH 530 /* number of hufts used by fixed tables */
-local uInt fixed_left = FIXEDH;
-local inflate_huft fixed_mem[FIXEDH];
-local uInt fixed_bl;
-local uInt fixed_bd;
-local inflate_huft *fixed_tl;
-local inflate_huft *fixed_td;
-
-
-local voidpf falloc(q, n, s)
-voidpf q; /* opaque pointer (not used) */
-uInt n; /* number of items */
-uInt s; /* size of item */
-{
- Assert(s == sizeof(inflate_huft) && n <= fixed_left,
- "inflate_trees falloc overflow");
- if (q) s++; /* to make some compilers happy */
- fixed_left -= n;
- return (voidpf)(fixed_mem + fixed_left);
-}
-
-
-local void ffree(q, p, n)
-voidpf q;
-voidpf p;
-uInt n;
-{
- Assert(0, "inflate_trees ffree called!");
- if (q) q = p; /* to make some compilers happy */
-}
-
-
-local int inflate_trees_fixed(bl, bd, tl, td)
-uIntf *bl; /* literal desired/actual bit depth */
-uIntf *bd; /* distance desired/actual bit depth */
-inflate_huft * FAR *tl; /* literal/length tree result */
-inflate_huft * FAR *td; /* distance tree result */
-{
- /* build fixed tables if not built already--lock out other instances */
- while (++fixed_lock > 1)
- fixed_lock--;
- if (!fixed_built)
- {
- int k; /* temporary variable */
- unsigned c[288]; /* length list for huft_build */
- z_stream z; /* for falloc function */
-
- /* set up fake z_stream for memory routines */
- z.zalloc = falloc;
- z.zfree = ffree;
- z.opaque = Z_NULL;
-
- /* literal table */
- for (k = 0; k < 144; k++)
- c[k] = 8;
- for (; k < 256; k++)
- c[k] = 9;
- for (; k < 280; k++)
- c[k] = 7;
- for (; k < 288; k++)
- c[k] = 8;
- fixed_bl = 7;
- huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl, &z);
-
- /* distance table */
- for (k = 0; k < 30; k++)
- c[k] = 5;
- fixed_bd = 5;
- huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd, &z);
-
- /* done */
- fixed_built = 1;
- }
- fixed_lock--;
- *bl = fixed_bl;
- *bd = fixed_bd;
- *tl = fixed_tl;
- *td = fixed_td;
- return Z_OK;
-}
-
-
-local int inflate_trees_free(t, z)
-inflate_huft *t; /* table to free */
-z_stream *z; /* for zfree function */
-/* Free the malloc'ed tables built by huft_build(), which makes a linked
- list of the tables it made, with the links in a dummy first entry of
- each table. */
-{
- register inflate_huft *p, *q;
-
- /* Go through linked list, freeing from the malloced (t[-1]) address. */
- p = t;
- while (p != Z_NULL)
- {
- q = (--p)->next;
- ZFREE(z, p, p->word.Nalloc * sizeof(inflate_huft));
- p = q;
- }
- return Z_OK;
-}
-
-/*+++++*/
-/* infcodes.c -- process literals and length/distance pairs
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* simplify the use of the inflate_huft type with some defines */
-#define base more.Base
-#define next more.Next
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-/* inflate codes private state */
-struct inflate_codes_state {
-
- /* mode */
- enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */
- START, /* x: set up for LEN */
- LEN, /* i: get length/literal/eob next */
- LENEXT, /* i: getting length extra (have base) */
- DIST, /* i: get distance next */
- DISTEXT, /* i: getting distance extra */
- COPY, /* o: copying bytes in window, waiting for space */
- LIT, /* o: got literal, waiting for output space */
- WASH, /* o: got eob, possibly still output waiting */
- END, /* x: got eob and all data flushed */
- BADCODE} /* x: got error */
- mode; /* current inflate_codes mode */
-
- /* mode dependent information */
- uInt len;
- union {
- struct {
- inflate_huft *tree; /* pointer into tree */
- uInt need; /* bits needed */
- } code; /* if LEN or DIST, where in tree */
- uInt lit; /* if LIT, literal */
- struct {
- uInt get; /* bits to get for extra */
- uInt dist; /* distance back to copy from */
- } copy; /* if EXT or COPY, where and how much */
- } sub; /* submode */
-
- /* mode independent information */
- Byte lbits; /* ltree bits decoded per branch */
- Byte dbits; /* dtree bits decoder per branch */
- inflate_huft *ltree; /* literal/length/eob tree */
- inflate_huft *dtree; /* distance tree */
-
-};
-
-
-local inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z)
-uInt bl, bd;
-inflate_huft *tl, *td;
-z_stream *z;
-{
- inflate_codes_statef *c;
-
- if ((c = (inflate_codes_statef *)
- ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL)
- {
- c->mode = START;
- c->lbits = (Byte)bl;
- c->dbits = (Byte)bd;
- c->ltree = tl;
- c->dtree = td;
- Tracev((stderr, "inflate: codes new\n"));
- }
- return c;
-}
-
-
-local int inflate_codes(s, z, r)
-inflate_blocks_statef *s;
-z_stream *z;
-int r;
-{
- uInt j; /* temporary storage */
- inflate_huft *t; /* temporary pointer */
- uInt e; /* extra bits or operation */
- uLong b; /* bit buffer */
- uInt k; /* bits in bit buffer */
- Bytef *p; /* input data pointer */
- uInt n; /* bytes available there */
- Bytef *q; /* output window write pointer */
- uInt m; /* bytes to end of window or read pointer */
- Bytef *f; /* pointer to copy strings from */
- inflate_codes_statef *c = s->sub.decode.codes; /* codes state */
-
- /* copy input/output information to locals (UPDATE macro restores) */
- LOAD
-
- /* process input and output based on current state */
- while (1) switch (c->mode)
- { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */
- case START: /* x: set up for LEN */
-#ifndef SLOW
- if (m >= 258 && n >= 10)
- {
- UPDATE
- r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z);
- LOAD
- if (r != Z_OK)
- {
- c->mode = r == Z_STREAM_END ? WASH : BADCODE;
- break;
- }
- }
-#endif /* !SLOW */
- c->sub.code.need = c->lbits;
- c->sub.code.tree = c->ltree;
- c->mode = LEN;
- case LEN: /* i: get length/literal/eob next */
- j = c->sub.code.need;
- NEEDBITS(j)
- t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);
- DUMPBITS(t->bits)
- e = (uInt)(t->exop);
- if (e == 0) /* literal */
- {
- c->sub.lit = t->base;
- Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?
- "inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", t->base));
- c->mode = LIT;
- break;
- }
- if (e & 16) /* length */
- {
- c->sub.copy.get = e & 15;
- c->len = t->base;
- c->mode = LENEXT;
- break;
- }
- if ((e & 64) == 0) /* next table */
- {
- c->sub.code.need = e;
- c->sub.code.tree = t->next;
- break;
- }
- if (e & 32) /* end of block */
- {
- Tracevv((stderr, "inflate: end of block\n"));
- c->mode = WASH;
- break;
- }
- c->mode = BADCODE; /* invalid code */
- z->msg = "invalid literal/length code";
- r = Z_DATA_ERROR;
- LEAVE
- case LENEXT: /* i: getting length extra (have base) */
- j = c->sub.copy.get;
- NEEDBITS(j)
- c->len += (uInt)b & inflate_mask[j];
- DUMPBITS(j)
- c->sub.code.need = c->dbits;
- c->sub.code.tree = c->dtree;
- Tracevv((stderr, "inflate: length %u\n", c->len));
- c->mode = DIST;
- case DIST: /* i: get distance next */
- j = c->sub.code.need;
- NEEDBITS(j)
- t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);
- DUMPBITS(t->bits)
- e = (uInt)(t->exop);
- if (e & 16) /* distance */
- {
- c->sub.copy.get = e & 15;
- c->sub.copy.dist = t->base;
- c->mode = DISTEXT;
- break;
- }
- if ((e & 64) == 0) /* next table */
- {
- c->sub.code.need = e;
- c->sub.code.tree = t->next;
- break;
- }
- c->mode = BADCODE; /* invalid code */
- z->msg = "invalid distance code";
- r = Z_DATA_ERROR;
- LEAVE
- case DISTEXT: /* i: getting distance extra */
- j = c->sub.copy.get;
- NEEDBITS(j)
- c->sub.copy.dist += (uInt)b & inflate_mask[j];
- DUMPBITS(j)
- Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist));
- c->mode = COPY;
- case COPY: /* o: copying bytes in window, waiting for space */
-#ifndef __TURBOC__ /* Turbo C bug for following expression */
- f = (uInt)(q - s->window) < c->sub.copy.dist ?
- s->end - (c->sub.copy.dist - (q - s->window)) :
- q - c->sub.copy.dist;
-#else
- f = q - c->sub.copy.dist;
- if ((uInt)(q - s->window) < c->sub.copy.dist)
- f = s->end - (c->sub.copy.dist - (q - s->window));
-#endif
- while (c->len)
- {
- NEEDOUT
- OUTBYTE(*f++)
- if (f == s->end)
- f = s->window;
- c->len--;
- }
- c->mode = START;
- break;
- case LIT: /* o: got literal, waiting for output space */
- NEEDOUT
- OUTBYTE(c->sub.lit)
- c->mode = START;
- break;
- case WASH: /* o: got eob, possibly more output */
- FLUSH
- if (s->read != s->write)
- LEAVE
- c->mode = END;
- case END:
- r = Z_STREAM_END;
- LEAVE
- case BADCODE: /* x: got error */
- r = Z_DATA_ERROR;
- LEAVE
- default:
- r = Z_STREAM_ERROR;
- LEAVE
- }
-}
-
-
-local void inflate_codes_free(c, z)
-inflate_codes_statef *c;
-z_stream *z;
-{
- ZFREE(z, c, sizeof(struct inflate_codes_state));
- Tracev((stderr, "inflate: codes free\n"));
-}
-
-/*+++++*/
-/* inflate_util.c -- data and routines common to blocks and codes
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* copy as much as possible from the sliding window to the output area */
-local int inflate_flush(s, z, r)
-inflate_blocks_statef *s;
-z_stream *z;
-int r;
-{
- uInt n;
- Bytef *p, *q;
-
- /* local copies of source and destination pointers */
- p = z->next_out;
- q = s->read;
-
- /* compute number of bytes to copy as far as end of window */
- n = (uInt)((q <= s->write ? s->write : s->end) - q);
- if (n > z->avail_out) n = z->avail_out;
- if (n && r == Z_BUF_ERROR) r = Z_OK;
-
- /* update counters */
- z->avail_out -= n;
- z->total_out += n;
-
- /* update check information */
- if (s->checkfn != Z_NULL)
- s->check = (*s->checkfn)(s->check, q, n);
-
- /* copy as far as end of window */
- zmemcpy(p, q, n);
- p += n;
- q += n;
-
- /* see if more to copy at beginning of window */
- if (q == s->end)
- {
- /* wrap pointers */
- q = s->window;
- if (s->write == s->end)
- s->write = s->window;
-
- /* compute bytes to copy */
- n = (uInt)(s->write - q);
- if (n > z->avail_out) n = z->avail_out;
- if (n && r == Z_BUF_ERROR) r = Z_OK;
-
- /* update counters */
- z->avail_out -= n;
- z->total_out += n;
-
- /* update check information */
- if (s->checkfn != Z_NULL)
- s->check = (*s->checkfn)(s->check, q, n);
-
- /* copy */
- zmemcpy(p, q, n);
- p += n;
- q += n;
- }
-
- /* update pointers */
- z->next_out = p;
- s->read = q;
-
- /* done */
- return r;
-}
-
-
-/*+++++*/
-/* inffast.c -- process literals and length/distance pairs fast
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* simplify the use of the inflate_huft type with some defines */
-#define base more.Base
-#define next more.Next
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-/* macros for bit input with no checking and for returning unused bytes */
-#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<<k;k+=8;}}
-#define UNGRAB {n+=(c=k>>3);p-=c;k&=7;}
-
-/* Called with number of bytes left to write in window at least 258
- (the maximum string length) and number of input bytes available
- at least ten. The ten bytes are six bytes for the longest length/
- distance pair plus four bytes for overloading the bit buffer. */
-
-local int inflate_fast(bl, bd, tl, td, s, z)
-uInt bl, bd;
-inflate_huft *tl, *td;
-inflate_blocks_statef *s;
-z_stream *z;
-{
- inflate_huft *t; /* temporary pointer */
- uInt e; /* extra bits or operation */
- uLong b; /* bit buffer */
- uInt k; /* bits in bit buffer */
- Bytef *p; /* input data pointer */
- uInt n; /* bytes available there */
- Bytef *q; /* output window write pointer */
- uInt m; /* bytes to end of window or read pointer */
- uInt ml; /* mask for literal/length tree */
- uInt md; /* mask for distance tree */
- uInt c; /* bytes to copy */
- uInt d; /* distance back to copy from */
- Bytef *r; /* copy source pointer */
-
- /* load input, output, bit values */
- LOAD
-
- /* initialize masks */
- ml = inflate_mask[bl];
- md = inflate_mask[bd];
-
- /* do until not enough input or output space for fast loop */
- do { /* assume called with m >= 258 && n >= 10 */
- /* get literal/length code */
- GRABBITS(20) /* max bits for literal/length code */
- if ((e = (t = tl + ((uInt)b & ml))->exop) == 0)
- {
- DUMPBITS(t->bits)
- Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?
- "inflate: * literal '%c'\n" :
- "inflate: * literal 0x%02x\n", t->base));
- *q++ = (Byte)t->base;
- m--;
- continue;
- }
- do {
- DUMPBITS(t->bits)
- if (e & 16)
- {
- /* get extra bits for length */
- e &= 15;
- c = t->base + ((uInt)b & inflate_mask[e]);
- DUMPBITS(e)
- Tracevv((stderr, "inflate: * length %u\n", c));
-
- /* decode distance base of block to copy */
- GRABBITS(15); /* max bits for distance code */
- e = (t = td + ((uInt)b & md))->exop;
- do {
- DUMPBITS(t->bits)
- if (e & 16)
- {
- /* get extra bits to add to distance base */
- e &= 15;
- GRABBITS(e) /* get extra bits (up to 13) */
- d = t->base + ((uInt)b & inflate_mask[e]);
- DUMPBITS(e)
- Tracevv((stderr, "inflate: * distance %u\n", d));
-
- /* do the copy */
- m -= c;
- if ((uInt)(q - s->window) >= d) /* offset before dest */
- { /* just copy */
- r = q - d;
- *q++ = *r++; c--; /* minimum count is three, */
- *q++ = *r++; c--; /* so unroll loop a little */
- }
- else /* else offset after destination */
- {
- e = d - (q - s->window); /* bytes from offset to end */
- r = s->end - e; /* pointer to offset */
- if (c > e) /* if source crosses, */
- {
- c -= e; /* copy to end of window */
- do {
- *q++ = *r++;
- } while (--e);
- r = s->window; /* copy rest from start of window */
- }
- }
- do { /* copy all or what's left */
- *q++ = *r++;
- } while (--c);
- break;
- }
- else if ((e & 64) == 0)
- e = (t = t->next + ((uInt)b & inflate_mask[e]))->exop;
- else
- {
- z->msg = "invalid distance code";
- UNGRAB
- UPDATE
- return Z_DATA_ERROR;
- }
- } while (1);
- break;
- }
- if ((e & 64) == 0)
- {
- if ((e = (t = t->next + ((uInt)b & inflate_mask[e]))->exop) == 0)
- {
- DUMPBITS(t->bits)
- Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?
- "inflate: * literal '%c'\n" :
- "inflate: * literal 0x%02x\n", t->base));
- *q++ = (Byte)t->base;
- m--;
- break;
- }
- }
- else if (e & 32)
- {
- Tracevv((stderr, "inflate: * end of block\n"));
- UNGRAB
- UPDATE
- return Z_STREAM_END;
- }
- else
- {
- z->msg = "invalid literal/length code";
- UNGRAB
- UPDATE
- return Z_DATA_ERROR;
- }
- } while (1);
- } while (m >= 258 && n >= 10);
-
- /* not enough input or output--restore pointers and return */
- UNGRAB
- UPDATE
- return Z_OK;
-}
-
-
-/*+++++*/
-/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* From: zutil.c,v 1.8 1995/05/03 17:27:12 jloup Exp */
-
-char *zlib_version = ZLIB_VERSION;
-
-char *z_errmsg[] = {
-"stream end", /* Z_STREAM_END 1 */
-"", /* Z_OK 0 */
-"file error", /* Z_ERRNO (-1) */
-"stream error", /* Z_STREAM_ERROR (-2) */
-"data error", /* Z_DATA_ERROR (-3) */
-"insufficient memory", /* Z_MEM_ERROR (-4) */
-"buffer error", /* Z_BUF_ERROR (-5) */
-""};
-
-
-/*+++++*/
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* From: adler32.c,v 1.6 1995/05/03 17:27:08 jloup Exp */
-
-#define BASE 65521L /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#define DO1(buf) {s1 += *buf++; s2 += s1;}
-#define DO2(buf) DO1(buf); DO1(buf);
-#define DO4(buf) DO2(buf); DO2(buf);
-#define DO8(buf) DO4(buf); DO4(buf);
-#define DO16(buf) DO8(buf); DO8(buf);
-
-/* ========================================================================= */
-uLong adler32(adler, buf, len)
- uLong adler;
- Bytef *buf;
- uInt len;
-{
- unsigned long s1 = adler & 0xffff;
- unsigned long s2 = (adler >> 16) & 0xffff;
- int k;
-
- if (buf == Z_NULL) return 1L;
-
- while (len > 0) {
- k = len < NMAX ? len : NMAX;
- len -= k;
- while (k >= 16) {
- DO16(buf);
- k -= 16;
- }
- if (k != 0) do {
- DO1(buf);
- } while (--k);
- s1 %= BASE;
- s2 %= BASE;
- }
- return (s2 << 16) | s1;
-}
+++ /dev/null
-/* $Id: zlib.h,v 1.1 1997/09/19 07:03:47 paulus Exp $ */
-
-/*
- * This file is derived from zlib.h and zconf.h from the zlib-0.95
- * distribution by Jean-loup Gailly and Mark Adler, with some additions
- * by Paul Mackerras to aid in implementing Deflate compression and
- * decompression for PPP packets.
- */
-
-/*
- * ==FILEVERSION 960122==
- *
- * This marker is used by the Linux installation script to determine
- * whether an up-to-date version of this file is already installed.
- */
-
-/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 0.95, Aug 16th, 1995.
-
- Copyright (C) 1995 Jean-loup Gailly and Mark Adler
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jean-loup Gailly Mark Adler
- gzip@prep.ai.mit.edu madler@alumni.caltech.edu
- */
-
-#ifndef _ZLIB_H
-#define _ZLIB_H
-
-/* #include "zconf.h" */ /* included directly here */
-
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* From: zconf.h,v 1.12 1995/05/03 17:27:12 jloup Exp */
-
-/*
- The library does not install any signal handler. It is recommended to
- add at least a handler for SIGSEGV when decompressing; the library checks
- the consistency of the input data whenever possible but may go nuts
- for some forms of corrupted input.
- */
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- * Compile with -DUNALIGNED_OK if it is OK to access shorts or ints
- * at addresses which are not a multiple of their size.
- * Under DOS, -DFAR=far or -DFAR=__far may be needed.
- */
-
-#ifndef STDC
-# if defined(MSDOS) || defined(__STDC__) || defined(__cplusplus)
-# define STDC
-# endif
-#endif
-
-#ifdef __MWERKS__ /* Metrowerks CodeWarrior declares fileno() in unix.h */
-# include <unix.h>
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-# ifdef MAXSEG_64K
-# define MAX_MEM_LEVEL 8
-# else
-# define MAX_MEM_LEVEL 9
-# endif
-#endif
-
-#ifndef FAR
-# define FAR
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2 */
-#ifndef MAX_WBITS
-# define MAX_WBITS 15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
- 1 << (windowBits+2) + 1 << (memLevel+9)
- that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
- make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
- The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
- /* Type declarations */
-
-#ifndef OF /* function prototypes */
-# ifdef STDC
-# define OF(args) args
-# else
-# define OF(args) ()
-# endif
-#endif
-
-typedef unsigned char Byte; /* 8 bits */
-typedef unsigned int uInt; /* 16 bits or more */
-typedef unsigned long uLong; /* 32 bits or more */
-
-typedef Byte FAR Bytef;
-typedef char FAR charf;
-typedef int FAR intf;
-typedef uInt FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
- typedef void FAR *voidpf;
- typedef void *voidp;
-#else
- typedef Byte FAR *voidpf;
- typedef Byte *voidp;
-#endif
-
-/* end of original zconf.h */
-
-#define ZLIB_VERSION "0.95P"
-
-/*
- The 'zlib' compression library provides in-memory compression and
- decompression functions, including integrity checks of the uncompressed
- data. This version of the library supports only one compression method
- (deflation) but other algorithms may be added later and will have the same
- stream interface.
-
- For compression the application must provide the output buffer and
- may optionally provide the input buffer for optimization. For decompression,
- the application must provide the input buffer and may optionally provide
- the output buffer for optimization.
-
- Compression can be done in a single step if the buffers are large
- enough (for example if an input file is mmap'ed), or can be done by
- repeated calls of the compression function. In the latter case, the
- application must provide more input and/or consume the output
- (providing more output space) before each call.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void (*free_func) OF((voidpf opaque, voidpf address, uInt nbytes));
-
-struct internal_state;
-
-typedef struct z_stream_s {
- Bytef *next_in; /* next input byte */
- uInt avail_in; /* number of bytes available at next_in */
- uLong total_in; /* total nb of input bytes read so far */
-
- Bytef *next_out; /* next output byte should be put there */
- uInt avail_out; /* remaining free space at next_out */
- uLong total_out; /* total nb of bytes output so far */
-
- char *msg; /* last error message, NULL if no error */
- struct internal_state FAR *state; /* not visible by applications */
-
- alloc_func zalloc; /* used to allocate the internal state */
- free_func zfree; /* used to free the internal state */
- voidp opaque; /* private data object passed to zalloc and zfree */
-
- Byte data_type; /* best guess about the data type: ascii or binary */
-
-} z_stream;
-
-/*
- The application must update next_in and avail_in when avail_in has
- dropped to zero. It must update next_out and avail_out when avail_out
- has dropped to zero. The application must initialize zalloc, zfree and
- opaque before calling the init function. All other fields are set by the
- compression library and must not be updated by the application.
-
- The opaque value provided by the application will be passed as the first
- parameter for calls of zalloc and zfree. This can be useful for custom
- memory management. The compression library attaches no meaning to the
- opaque value.
-
- zalloc must return Z_NULL if there is not enough memory for the object.
- On 16-bit systems, the functions zalloc and zfree must be able to allocate
- exactly 65536 bytes, but will not be required to allocate more than this
- if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
- pointers returned by zalloc for objects of exactly 65536 bytes *must*
- have their offset normalized to zero. The default allocation function
- provided by this library ensures this (see zutil.c). To reduce memory
- requirements and avoid any allocation of 64K objects, at the expense of
- compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
- The fields total_in and total_out can be used for statistics or
- progress reports. After compression, total_in holds the total size of
- the uncompressed data and may be saved for use in the decompressor
- (particularly if the decompressor wants to decompress everything in
- a single step).
-*/
-
- /* constants */
-
-#define Z_NO_FLUSH 0
-#define Z_PARTIAL_FLUSH 1
-#define Z_FULL_FLUSH 2
-#define Z_SYNC_FLUSH 3 /* experimental: partial_flush + byte align */
-#define Z_FINISH 4
-#define Z_PACKET_FLUSH 5
-/* See deflate() below for the usage of these constants */
-
-#define Z_OK 0
-#define Z_STREAM_END 1
-#define Z_ERRNO (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR (-3)
-#define Z_MEM_ERROR (-4)
-#define Z_BUF_ERROR (-5)
-/* error codes for the compression/decompression functions */
-
-#define Z_BEST_SPEED 1
-#define Z_BEST_COMPRESSION 9
-#define Z_DEFAULT_COMPRESSION (-1)
-/* compression levels */
-
-#define Z_FILTERED 1
-#define Z_HUFFMAN_ONLY 2
-#define Z_DEFAULT_STRATEGY 0
-
-#define Z_BINARY 0
-#define Z_ASCII 1
-#define Z_UNKNOWN 2
-/* Used to set the data_type field */
-
-#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
-
-extern char *zlib_version;
-/* The application can compare zlib_version and ZLIB_VERSION for consistency.
- If the first character differs, the library code actually used is
- not compatible with the zlib.h header file used by the application.
- */
-
- /* basic functions */
-
-extern int inflateInit OF((z_stream *strm));
-/*
- Initializes the internal stream state for decompression. The fields
- zalloc and zfree must be initialized before by the caller. If zalloc and
- zfree are set to Z_NULL, inflateInit updates them to use default allocation
- functions.
-
- inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory. msg is set to null if there is no error message.
- inflateInit does not perform any decompression: this will be done by
- inflate().
-*/
-
-
-extern int inflate OF((z_stream *strm, int flush));
-/*
- Performs one or both of the following actions:
-
- - Decompress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in is updated and processing
- will resume at this point for the next call of inflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. inflate() always provides as much output as possible
- (until there is no more input data or no more space in the output buffer).
-
- Before the call of inflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating the next_* and avail_* values accordingly.
- The application can consume the uncompressed output when it wants, for
- example when the output buffer is full (avail_out == 0), or after each
- call of inflate().
-
- If the parameter flush is set to Z_PARTIAL_FLUSH or Z_PACKET_FLUSH,
- inflate flushes as much output as possible to the output buffer. The
- flushing behavior of inflate is not specified for values of the flush
- parameter other than Z_PARTIAL_FLUSH, Z_PACKET_FLUSH or Z_FINISH, but the
- current implementation actually flushes as much output as possible
- anyway. For Z_PACKET_FLUSH, inflate checks that once all the input data
- has been consumed, it is expecting to see the length field of a stored
- block; if not, it returns Z_DATA_ERROR.
-
- inflate() should normally be called until it returns Z_STREAM_END or an
- error. However if all decompression is to be performed in a single step
- (a single call of inflate), the parameter flush should be set to
- Z_FINISH. In this case all pending input is processed and all pending
- output is flushed; avail_out must be large enough to hold all the
- uncompressed data. (The size of the uncompressed data may have been saved
- by the compressor for this purpose.) The next operation on this stream must
- be inflateEnd to deallocate the decompression state. The use of Z_FINISH
- is never required, but can be used to inform inflate that a faster routine
- may be used for the single inflate() call.
-
- inflate() returns Z_OK if some progress has been made (more input
- processed or more output produced), Z_STREAM_END if the end of the
- compressed data has been reached and all uncompressed output has been
- produced, Z_DATA_ERROR if the input data was corrupted, Z_STREAM_ERROR if
- the stream structure was inconsistent (for example if next_in or next_out
- was NULL), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if no
- progress is possible or if there was not enough room in the output buffer
- when Z_FINISH is used. In the Z_DATA_ERROR case, the application may then
- call inflateSync to look for a good compression block. */
-
-
-extern int inflateEnd OF((z_stream *strm));
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
- was inconsistent. In the error case, msg may be set but then points to a
- static string (which must not be deallocated).
-*/
-
- /* advanced functions */
-
-extern int inflateInit2 OF((z_stream *strm,
- int windowBits));
-/*
- This is another version of inflateInit with more compression options. The
- fields next_out, zalloc and zfree must be initialized before by the caller.
-
- The windowBits parameter is the base two logarithm of the maximum window
- size (the size of the history buffer). It should be in the range 8..15 for
- this version of the library (the value 16 will be allowed soon). The
- default value is 15 if inflateInit is used instead. If a compressed stream
- with a larger window size is given as input, inflate() will return with
- the error code Z_DATA_ERROR instead of trying to allocate a larger window.
-
- If next_out is not null, the library will use this buffer for the history
- buffer; the buffer must either be large enough to hold the entire output
- data, or have at least 1<<windowBits bytes. If next_out is null, the
- library will allocate its own buffer (and leave next_out null). next_in
- need not be provided here but must be provided by the application for the
- next call of inflate().
-
- If the history buffer is provided by the application, next_out must
- never be changed by the application since the decompressor maintains
- history information inside this buffer from call to call; the application
- can only reset next_out to the beginning of the history buffer when
- avail_out is zero and all output has been consumed.
-
- inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was
- not enough memory, Z_STREAM_ERROR if a parameter is invalid (such as
- windowBits < 8). msg is set to null if there is no error message.
- inflateInit2 does not perform any decompression: this will be done by
- inflate().
-*/
-
-extern int inflateSync OF((z_stream *strm));
-/*
- Skips invalid compressed data until the special marker (see deflate()
- above) can be found, or until all available input is skipped. No output
- is provided.
-
- inflateSync returns Z_OK if the special marker has been found, Z_BUF_ERROR
- if no more input was provided, Z_DATA_ERROR if no marker has been found,
- or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
- case, the application may save the current current value of total_in which
- indicates where valid compressed data was found. In the error case, the
- application may repeatedly call inflateSync, providing more input each time,
- until success or end of the input data.
-*/
-
-extern int inflateReset OF((z_stream *strm));
-/*
- This function is equivalent to inflateEnd followed by inflateInit,
- but does not free and reallocate all the internal decompression state.
- The stream will keep attributes that may have been set by inflateInit2.
-
- inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-extern int inflateIncomp OF((z_stream *strm));
-/*
- This function adds the data at next_in (avail_in bytes) to the output
- history without performing any output. There must be no pending output,
- and the decompressor must be expecting to see the start of a block.
- Calling this function is equivalent to decompressing a stored block
- containing the data at next_in (except that the data is not output).
-*/
-
- /* checksum functions */
-
-/*
- This function is not related to compression but is exported
- anyway because it might be useful in applications using the
- compression library.
-*/
-
-extern uLong adler32 OF((uLong adler, Bytef *buf, uInt len));
-
-/*
- Update a running Adler-32 checksum with the bytes buf[0..len-1] and
- return the updated checksum. If buf is NULL, this function returns
- the required initial value for the checksum.
- An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
- much faster. Usage example:
-
- uLong adler = adler32(0L, Z_NULL, 0);
-
- while (read_buffer(buffer, length) != EOF) {
- adler = adler32(adler, buffer, length);
- }
- if (adler != original_adler) error();
-*/
-
-#ifndef _Z_UTIL_H
- struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-#endif /* _ZLIB_H */
endif
+# PowerPC (cross) tools
+ifneq ($(shell uname -m),ppc)
+#CROSS_COMPILE =powerpc-eabi-
+CROSS_COMPILE =ppc-linux-elf-
+endif
+
+
HOSTCC = gcc
HOSTCFLAGS = -O -I$(TOPDIR)/include
bne 4f
ori 4,4,4 /* set up BAT registers for 601 */
li 5,0x7f
- b 5f
-4: ori 4,4,0xff /* set up BAT registers for 604 */
+ mtibatu 3,4
+ mtibatl 3,5
+ isync
+ blr
+4: ori 4,4,0xfe /* set up BAT registers for 604 */
li 5,2
- mtdbatu 3,4
mtdbatl 3,5
-5: mtibatu 3,4
+ mtdbatu 3,4
mtibatl 3,5
+ mtibatu 3,4
isync
blr
* - added Z_PACKET_FLUSH (see zlib.h for details)
* - added inflateIncomp
*
- * $Id: zlib.c,v 1.1 1997/07/31 07:16:14 paulus Exp $
+ * $Id: zlib.c,v 1.2 1998/09/03 17:40:53 cort Exp $
*/
/*+++++*/
/* functions */
-#include <string.h>
+#include <linux/string.h>
#define zmemcpy memcpy
#define zmemzero(dest, len) memset(dest, 0, len)
-# $Id: config.in,v 1.65 1998/07/20 18:42:27 geert Exp $
+# $Id: config.in,v 1.71 1998/09/18 13:25:17 cort Exp $
# For a description of the syntax of this configuration file,
# see the Configure script.
#
+mainmenu_option next_comment
+comment 'Cross development support'
+ bool 'Build using cross development tools' CONFIG_CROSSCOMPILE
+if [ "$CONFIG_CROSSCOMPILE" = "y" ]; then
+ string ' Prefix for cross devel tools' CROSS_COMPILE "ppc-linux-elf-"
+fi
+endmenu
+
mainmenu_option next_comment
comment 'Platform support'
define_bool CONFIG_PPC y
-#if [ "`uname`" != "Linux" -o "`uname -m`" != "ppc" ]; then
-# define_bool CONFIG_CROSSCOMPILE y
-#else
-# define_bool CONFIG_NATIVE y
-#fi
-
choice 'Processor type' \
"6xx/7xx CONFIG_6xx \
860/821 CONFIG_8xx" 6xx/7xx
choice 'Machine Type' \
"PowerMac CONFIG_PMAC \
- PReP CONFIG_PREP \
+ PReP/MTX CONFIG_PREP \
CHRP CONFIG_CHRP \
PowerMac/PReP/CHRP CONFIG_ALL_PPC \
APUS CONFIG_APUS \
bool 'Support for PowerMac keyboard' CONFIG_MAC_KEYBOARD
bool 'Support for PowerMac floppy' CONFIG_MAC_FLOPPY
bool 'Support for PowerMac serial ports' CONFIG_MAC_SERIAL
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- bool 'Support for PowerMac mouse (EXPERIMENTAL)' CONFIG_MACMOUSE
-fi
+bool 'Support for PowerMac ADB mouse' CONFIG_ADBMOUSE
bool 'Support for Open Firmware device tree in /proc' CONFIG_PROC_DEVICETREE
bool 'Include kgdb kernel debugger' CONFIG_KGDB
bool 'Include xmon kernel debugger' CONFIG_XMON
+bool 'Support for TotalImpact TotalMP' CONFIG_TOTALMP
if [ "$CONFIG_APUS" = "y" ]; then
define_bool CONFIG_FB_CONSOLE y
define_bool CONFIG_AMIGAMOUSE y
define_bool CONFIG_ABSTRACT_CONSOLE y
define_bool CONFIG_FB y
- tristate 'Amiga floppy support' CONFIG_AMIGA_FLOPPY
- bool 'Amiga Gayle IDE interface support' CONFIG_BLK_DEV_GAYLE
tristate 'Amiga builtin serial support' CONFIG_AMIGA_BUILTIN_SERIAL
tristate 'GVP IO-Extender support' CONFIG_GVPIOEXT
dep_tristate 'GVP IO-Extender parallel printer support' CONFIG_GVPIOEXT_LP $CONFIG_GVPIOEXT
CONFIG_BINFMT_MISC=m
# CONFIG_BINFMT_JAVA is not set
# CONFIG_PARPORT is not set
-# CONFIG_FB is not set
-# CONFIG_VGA_CONSOLE is not set
-# CONFIG_PMAC_PBOOK is not set
+CONFIG_FB=y
+CONFIG_FB_COMPAT_XPMAC=y
+CONFIG_PMAC_PBOOK=y
CONFIG_MAC_KEYBOARD=y
CONFIG_MAC_FLOPPY=y
CONFIG_MAC_SERIAL=y
CONFIG_MACMOUSE=y
CONFIG_PROC_DEVICETREE=y
# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+CONFIG_XMON=y
#
# Plug and Play support
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
+CONFIG_BLK_DEV_IDEFLOPPY=y
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
#
# Console drivers
#
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FB_OF=y
+CONFIG_FB_CONTROL=y
+CONFIG_FB_PLATINUM=y
+CONFIG_FB_ATY=y
+CONFIG_FB_IMSTT=y
+CONFIG_FB_CT65550=y
+# CONFIG_FB_S3TRIO is not set
+# CONFIG_FB_VGA is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FBCON_ADVANCED is not set
+CONFIG_FBCON_CFB8=y
+CONFIG_FBCON_CFB16=y
+CONFIG_FBCON_CFB24=y
+CONFIG_FBCON_CFB32=y
+# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
+CONFIG_FBCON_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+CONFIG_FONT_SUN8x16=y
+CONFIG_FONT_SUN12x22=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
-# CONFIG_SERIAL is not set
+CONFIG_SERIAL=m
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
-CONFIG_UNIX98_PTYS=y
-CONFIG_UNIX98_PTY_COUNT=256
# CONFIG_MOUSE is not set
# CONFIG_UMISC is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_ROMFS_FS is not set
CONFIG_AUTOFS_FS=y
# CONFIG_UFS_FS is not set
-CONFIG_DEVPTS_FS=y
# CONFIG_ADFS_FS is not set
+CONFIG_DEVPTS_FS=y
CONFIG_MAC_PARTITION=y
CONFIG_NLS=y
#
# Sound
#
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+CONFIG_DMASOUND=y
$(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $*.o
O_TARGET := kernel.o
-OX_OBJS := ppc_ksyms.o
+OX_OBJS := ppc_ksyms.o setup.o
O_OBJS := traps.o irq.o idle.o time.o process.o signal.o syscalls.o misc.o \
- bitops.o setup.o ptrace.o align.o ppc_htab.o
+ bitops.o ptrace.o align.o ppc_htab.o
ifdef CONFIG_PCI
O_OBJS += pci.o
ifdef CONFIG_KGDB
O_OBJS += ppc-stub.o
endif
+ifdef CONFIG_TOTALMP
+O_OBJS += totalmp.o
+endif
ifeq ($(CONFIG_MBX),y)
O_OBJS += mbx_setup.o mbx_pci.o softemu8xx.o
O_OBJS += apus_setup.o prom.o openpic.o
else
O_OBJS += prep_time.o pmac_time.o chrp_time.o \
- pmac_setup.o pmac_support.o chrp_setup.o \
+ pmac_setup.o pmac_support.o \
prep_pci.o pmac_pci.o chrp_pci.o \
residual.o prom.o openpic.o
-OX_OBJS += prep_setup.o
+OX_OBJS += chrp_setup.o prep_setup.o
endif
endif
#else
giveup_fpu();
#endif
- cvt_fd(&data.f, ¤t->tss.fpr[reg]);
+ cvt_fd(&data.f, ¤t->tss.fpr[reg], ¤t->tss.fpscr);
/* current->tss.fpr[reg] = data.f; */
break;
case ST+F+S:
#else
giveup_fpu();
#endif
- cvt_df(¤t->tss.fpr[reg], &data.f);
+ cvt_df(¤t->tss.fpr[reg], &data.f, ¤t->tss.fpscr);
/* data.f = current->tss.fpr[reg]; */
break;
default:
#include <asm/amigahw.h>
#include <asm/amigappc.h>
#include <asm/pgtable.h>
+#include <asm/io.h>
unsigned long m68k_machtype;
char debug_device[6] = "";
{
int freq, divisor;
unsigned char c = *(unsigned char*)ZTWO_VADDR(0xf00011);
+ printk ("CPU speed ID ('%c') ", c);
switch (c)
{
break;
default:
freq = 0;
- printk (" *Unknown CPU speed ID ('%c')* ", c);
+ printk (" *Unknown* ");
break;
}
case 0:
freq = 15000000;
speed = 60;
-
- /* Use status of left mouse button to select
- RAM speed. */
- if (!(ciaa.pra & 0x40))
- {
- APUS_WRITE (APUS_REG_WAITSTATE,
- REGWAITSTATE_SETRESET
- |REGWAITSTATE_PPCR
- |REGWAITSTATE_PPCW);
- printk (" [RAM R/W waitstate removed. "
- "(expecting 60ns RAM).] ");
- }
break;
+
case 1:
freq = 16500000;
- speed = 66;
+ speed =66;
break;
}
+
+ /* Use status of left mouse button to select
+ RAM speed. */
+ if (!(ciaa.pra & 0x40))
+ {
+ APUS_WRITE (APUS_REG_WAITSTATE,
+ REGWAITSTATE_SETRESET
+ |REGWAITSTATE_PPCR
+ |REGWAITSTATE_PPCW);
+ printk (" [RAM R/W waitstate removed. "
+ "(expecting 60ns RAM).] ");
+ }
+
+
printk ("PowerUp Bus Speed: %dMHz\n", speed);
}
}
return v_ret;
}
-
+
+/* From pgtable.h */
+extern __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 )
+{
+ int mask, flags;
+
+ switch (cmode)
+ {
+ case KERNELMAP_FULL_CACHING:
+ mask = ~(_PAGE_NO_CACHE | _PAGE_GUARDED);
+ flags = 0;
+ break;
+ case KERNELMAP_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_task.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_task.mm,address),address);
+
+ address += PAGE_SIZE;
+ }
+}
+
unsigned long mm_ptov (unsigned long paddr)
{
unsigned long ret;
*/
#include <linux/config.h>
+#include <linux/module.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/blk.h>
#include <linux/ioport.h>
#include <linux/console.h>
+#include <linux/pci.h>
#include <asm/mmu.h>
#include <asm/processor.h>
conswitchp = &dummy_con;
#endif
}
+
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+
+unsigned int chrp_ide_irq = 0;
+int chrp_ide_ports_known = 0;
+ide_ioreg_t chrp_ide_regbase[MAX_HWIFS];
+ide_ioreg_t chrp_idedma_regbase;
+
+void chrp_ide_init_hwif_ports (ide_ioreg_t *p, ide_ioreg_t base, int *irq)
+{
+ ide_ioreg_t port = base;
+ int i = 8;
+
+ while (i--)
+ *p++ = port++;
+ *p++ = port;
+ if (irq != NULL)
+ *irq = chrp_ide_irq;
+}
+
+void chrp_ide_probe(void) {
+
+ struct pci_dev *pdev = pci_find_device(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, NULL);
+
+ chrp_ide_ports_known = 1;
+
+ if(pdev) {
+ chrp_ide_regbase[0]=pdev->base_address[0] &
+ PCI_BASE_ADDRESS_IO_MASK;
+ chrp_ide_regbase[1]=pdev->base_address[2] &
+ PCI_BASE_ADDRESS_IO_MASK;
+ chrp_idedma_regbase=pdev->base_address[4] &
+ PCI_BASE_ADDRESS_IO_MASK;
+ chrp_ide_irq=pdev->irq;
+ }
+}
+
+EXPORT_SYMBOL(chrp_ide_irq);
+EXPORT_SYMBOL(chrp_ide_ports_known);
+EXPORT_SYMBOL(chrp_ide_regbase);
+EXPORT_SYMBOL(chrp_ide_probe);
+
+#endif
if ( argc < 2 )
{
fprintf(stderr, "Usage: %s <address>\n", argv[0]);
- exit(-1);
+ return -1;
}
for ( i = 1 ; argv[i] ; i++ )
strcpy( last, s);
}
- printf( "%s", last);
+ printf( "%s%s", last, s );
}
fclose(f);
return 0;
/*
* arch/ppc/kernel/head.S
*
- * $Id: head.S,v 1.98 1998/07/26 21:28:48 geert Exp $
+ * $Id: head.S,v 1.107 1998/09/25 19:48:52 paulus Exp $
*
* PowerPC version
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
bdnz 0b
#endif
+/* 601 only have IBAT cr0.eq is set on 601 when using this macro */
#define LOAD_BAT(n, offset, reg, RA, RB) \
lwz RA,offset+0(reg); \
lwz RB,offset+4(reg); \
mtspr IBAT##n##U,RA; \
mtspr IBAT##n##L,RB; \
+ beq 1f; \
lwz RA,offset+8(reg); \
lwz RB,offset+12(reg); \
mtspr DBAT##n##U,RA; \
- mtspr DBAT##n##L,RB
+ mtspr DBAT##n##L,RB; \
+1:
#ifndef CONFIG_APUS
#define tophys(rd,rs,rt) addis rd,rs,-KERNELBASE@h
* pointer (r1) points to just below the end of the half-meg region
* from 0x380000 - 0x400000, which is mapped in already.
*
+ * If we are booted from MacOS via BootX, we enter with the kernel
+ * image loaded somewhere, and the following values in registers:
+ * r3: 'BooX' (0x426f6f58)
+ * r4: virtual address of boot_infos_t
+ * r5: 0
+ *
* PREP
* This is jumped to on prep systems right after the kernel is relocated
* to its proper place in memory by the boot loader. The expected layout
lis r11,KERNELBASE@h
bne 4f
ori r11,r11,4 /* set up BAT registers for 601 */
- li r8,0x7f
+ li r8,0x7f /* valid, block length = 8MB */
oris r9,r11,0x800000@h /* set up BAT reg for 2nd 8M */
oris r10,r8,0x800000@h /* set up BAT reg for 2nd 8M */
+ mtspr IBAT0U,r11 /* N.B. 601 has valid bit in */
+ mtspr IBAT0L,r8 /* lower BAT register */
mtspr IBAT1U,r9
mtspr IBAT1L,r10
b 5f
4:
#ifndef CONFIG_APUS
- ori r11,r11,0x1ff /* set up BAT registers for 604 */
- li r8,2
+ ori r11,r11,0x1fe /* set up BAT registers for 604 */
+ li r8,2 /* R/W access */
#else
- ori r11,r11,0xff /* set up an 8MB mapping */
+ ori r11,r11,0xfe /* set up an 8MB mapping */
lis r8,CYBERBASEp@h
lwz r8,0(r8)
addis r8,r8,KERNELBASE@h
addi r8,r8,2
#endif
-5: mtspr DBAT0U,r11
- mtspr DBAT0L,r8
- mtspr IBAT0U,r11
+ mtspr DBAT0L,r8 /* N.B. 6xx (not 601) have valid */
+ mtspr DBAT0U,r11 /* bit in upper BAT register */
mtspr IBAT0L,r8
- isync
+ mtspr IBAT0U,r11
+5: isync
#ifdef CONFIG_APUS
/* Unfortunately the APUS specific instructions bloat the
* code so it cannot fit in the 0x100 bytes available. We have
* to do it the crude way. */
+
+ /* Map 0xfff00000 so we can access VTOP/PTOV constant when
+ MMU is enabled. */
+ lis r8,0xfff0
+ ori r11,r8,0x2 /* r/w */
+ ori r8,r8,0x2 /* 128KB, supervisor */
+ mtspr DBAT3U,r8
+ mtspr DBAT3L,r11
+
+ /* Copy exception code to exception vector base. */
lis r3,KERNELBASE@h
tophys(r4,r3,r5)
lis r3,0xfff0 /* Copy to 0xfff00000 on APUS */
li r3,0
mfmsr r0
andi. r0,r0,MSR_DR /* MMU enabled? */
- beq 7f
+ beq relocate_kernel
lis r3,KERNELBASE@h /* if so, are we */
cmpw 0,r4,r3 /* already running at KERNELBASE? */
- beq 2f
- rlwinm r4,r4,0,8,31 /* translate source address */
- add r4,r4,r3 /* to region mapped with BATs */
-7: addis r9,r26,klimit@ha /* fetch klimit */
- lwz r25,klimit@l(r9)
- addis r25,r25,-KERNELBASE@h
- li r6,0 /* Destination */
- li r5,0x4000 /* # bytes of memory to copy */
- bl copy_and_flush /* copy the first 0x4000 bytes */
- addi r0,r3,4f@l /* jump to the address of 4f */
- mtctr r0 /* in copy and do the rest. */
- bctr /* jump to the copy */
-4: mr r5,r25
- bl copy_and_flush /* copy the rest */
+ bne relocate_kernel
2:
#endif /* CONFIG_APUS */
/*
*/
#endif /* CONFIG_8xx */
+turn_on_mmu:
mfmsr r0
ori r0,r0,MSR_DR|MSR_IR
mtspr SRR1,r0
mtspr SRR0,r0
SYNC
rfi /* enables MMU */
-
+
/*
* GCC sometimes accesses words at negative offsets from the stack
* pointer, although the SysV ABI says it shouldn't. To cope with
li r20,(IPLEMU_SETRESET|IPLEMU_DISABLEINT)
stb r20,APUS_IPL_EMU@l(r3)
- sync
+ eieio
lbz r3,APUS_IPL_EMU@l(r3)
* by a switch_to() call to smp_giveup_fpu() in SMP so
* last_task_used_math is not used.
*
- * We should never be herre on SMP anyway, sinc ethe fpu should
+ * We should never be here on SMP anyway, since the fpu should
* always be on.
* -- Cort
*/
lwz r5,PT_REGS(r4)
add r5,r5,r6
lwz r4,_MSR-STACK_FRAME_OVERHEAD(r5)
- li r20,MSR_FP
+ li r20,MSR_FP|MSR_FE0|MSR_FE1
andc r4,r4,r20 /* disable FP for previous task */
stw r4,_MSR-STACK_FRAME_OVERHEAD(r5)
-1: ori r23,r23,MSR_FP /* enable use of FP after return */
+1: ori r23,r23,MSR_FP|MSR_FE0|MSR_FE1 /* enable use of FP after return */
mfspr r5,SPRG3 /* current task's TSS (phys) */
lfd fr0,TSS_FPSCR-4(r5)
mtfsf 0xff,fr0
stfd fr0,TSS_FPSCR-4(r4)
lwz r5,PT_REGS(r4)
lwz r3,_MSR-STACK_FRAME_OVERHEAD(r5)
- li r4,MSR_FP
+ li r4,MSR_FP|MSR_FE0|MSR_FE1
andc r3,r3,r4 /* disable FP for previous task */
stw r3,_MSR-STACK_FRAME_OVERHEAD(r5)
#else /* CONFIG_8xx */
giveup_fpu:
#endif /* CONFIG_8xx */
blr
-
+
+/*
+ * This code is jumped to from the startup code to copy
+ * the kernel image to physical address 0.
+ */
+relocate_kernel:
+ lis r9,0x426f /* if booted from BootX, don't */
+ addi r9,r9,0x6f58 /* translate source addr */
+ cmpw r31,r9 /* (we have to on chrp) */
+ beq 7f
+ rlwinm r4,r4,0,8,31 /* translate source address */
+ add r4,r4,r3 /* to region mapped with BATs */
+7: addis r9,r26,klimit@ha /* fetch klimit */
+ lwz r25,klimit@l(r9)
+ addis r25,r25,-KERNELBASE@h
+ li r6,0 /* Destination offset */
+ li r5,0x4000 /* # bytes of memory to copy */
+ bl copy_and_flush /* copy the first 0x4000 bytes */
+ addi r0,r3,4f@l /* jump to the address of 4f */
+ mtctr r0 /* in copy and do the rest. */
+ bctr /* jump to the copy */
+4: mr r5,r25
+ bl copy_and_flush /* copy the rest */
+ b turn_on_mmu
+
/*
* Copy routine used to copy the kernel to start at physical address 0
* and flush and invalidate the caches as needed.
bne 3f /* don't invalidate the D-cache */
ori r8,r8,HID0_DCI /* unless it wasn't enabled */
3:
- /* turn on dpm for 603 */
- cmpi 0,r9,3
- bne 10f
- oris r11,r11,HID0_DPM@h
-10:
sync
mtspr HID0,r8 /* enable and invalidate caches */
sync
mr r7,r27
bl identify_machine
bl MMU_init
+
/*
* Go back to running unmapped so we can load up new values
* for SDR1 (hash table pointer) and the segment registers
addi r3,r3,1 /* increment VSID */
addis r4,r4,0x1000 /* address of next segment */
bdnz 3b
-
/* Load the BAT registers with the values set up by MMU_init.
MMU_init takes care of whether we're on a 601 or not. */
+ mfpvr r3
+ srwi r3,r3,16
+ cmpwi r3,1
lis r3,BATS@ha
addi r3,r3,BATS@l
tophys(r3,r3,r4)
li r4,MSR_KERNEL
lis r3,start_kernel@h
ori r3,r3,start_kernel@l
+#ifdef __SMP__
+ /* the second time through here we go to
+ * start_secondary(). -- Cort
+ */
+ lis r5,first_cpu_booted@h
+ ori r5,r5,first_cpu_booted@l
+ tophys(r5,r5,r3)
+ lwz r5,0(r5)
+ cmpi 0,r5,0
+ beq 10f
+ lis r3,start_secondary@h
+ ori r3,r3,start_secondary@l
+10:
+#endif /* __SMP__ */
mtspr SRR0,r3
mtspr SRR1,r4
rfi /* enable MMU and jump to start_kernel */
_GLOBAL(__main)
blr
-#ifdef __SMP__
-/*
- * Secondary processor begins executing here.
- */
- .globl secondary_entry
-secondary_entry:
- /* just like __start() with a few changes -- Cort */
- mfspr r9,PVR
- rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */
- cmpi 0,r9,1
- lis r11,KERNELBASE@h
- bne 4f
- ori r11,r11,4 /* set up BAT registers for 601 */
- li r8,0x7f
- oris r9,r11,0x800000@h /* set up BAT reg for 2nd 8M */
- oris r10,r8,0x800000@h /* set up BAT reg for 2nd 8M */
- mtspr IBAT1U,r9
- mtspr IBAT1L,r10
- b 5f
-4: ori r11,r11,0x1ff /* set up BAT registers for 604 */
- li r8,2
- mtspr DBAT0U,r11
- mtspr DBAT0L,r8
-5: mtspr IBAT0U,r11
- mtspr IBAT0L,r8
- isync
-/*
- * we now have the 1st 16M of ram mapped with the bats.
- * prep needs the mmu to be turned on here, but pmac already has it on.
- * this shouldn't bother the pmac since it just gets turned on again
- * as we jump to our code at KERNELBASE. -- Cort
- */
- mfmsr r0
- ori r0,r0,MSR_DR|MSR_IR
- mtspr SRR1,r0
- lis r0,100f@h
- ori r0,r0,100f@l
- mtspr SRR0,r0
- SYNC
- rfi /* enables MMU */
-100:
- /*
- * Enable caches and 604-specific features if necessary.
- */
- mfspr r9,PVR
- rlwinm r9,r9,16,16,31
- cmpi 0,r9,1
- beq 4f /* not needed for 601 */
- mfspr r11,HID0
- andi. r0,r11,HID0_DCE
- ori r11,r11,HID0_ICE|HID0_DCE
- ori r8,r11,HID0_ICFI
- bne 3f /* don't invalidate the D-cache */
- ori r8,r8,HID0_DCI /* unless it wasn't enabled */
-3:
- /* turn on dpm for 603 */
- cmpi 0,r9,3
- bne 10f
- oris r11,r11,HID0_DPM@h
-10:
- sync
- mtspr HID0,r8 /* enable and invalidate caches */
- sync
- mtspr HID0,r11 /* enable caches */
- sync
- isync
- cmpi 0,r9,4 /* check for 604 */
- cmpi 1,r9,9 /* or 604e */
- cmpi 2,r9,10 /* or mach5 */
- cror 2,2,6
- cror 2,2,10
- bne 4f
- ori r11,r11,HID0_SIED|HID0_BHTE /* for 604[e], enable */
- bne 2,5f
- ori r11,r11,HID0_BTCD
-5: mtspr HID0,r11 /* superscalar exec & br history tbl */
-4:
-/*
- * init_MMU on the first processor has setup the variables
- * for us - all we need to do is load them -- Cort
- */
-
-/*
- * Go back to running unmapped so we can load up new values
- * for SDR1 (hash table pointer) and the segment registers
- * and change to using our exception vectors.
- */
- lis r6,_SDR1@ha
- lwz r6,_SDR1@l(r6)
- lis r4,2f@h
- ori r4,r4,2f@l
- tophys(r4,r4,r3)
- li r3,MSR_KERNEL & ~(MSR_IR|MSR_DR)
- mtspr SRR0,r4
- mtspr SRR1,r3
- rfi
-/* Load up the kernel context */
-2:
- /* get ptr to current */
- lis r2,current_set@h
- ori r2,r2,current_set@l
- /* assume we're second processor for now */
- tophys(r2,r2,r10)
- lwz r2,4(r2)
- /* stack */
- addi r1,r2,TASK_UNION_SIZE
- li r0,0
- tophys(r3,r1,r10)
- stwu r0,-STACK_FRAME_OVERHEAD(r3)
-
- SYNC /* Force all PTE updates to finish */
- tlbia /* Clear all TLB entries */
- mtspr SDR1,r6
- li r0,16 /* load up segment register values */
- mtctr r0 /* for context 0 */
- lis r3,0x2000 /* Ku = 1, VSID = 0 */
- li r4,0
-3: mtsrin r3,r4
- addi r3,r3,1 /* increment VSID */
- addis r4,r4,0x1000 /* address of next segment */
- bdnz 3b
-
-/* Load the BAT registers with the values set up by MMU_init.
- MMU_init takes care of whether we're on a 601 or not. */
- lis r3,BATS@ha
- addi r3,r3,BATS@l
- tophys(r3,r3,r4)
- LOAD_BAT(0,0,r3,r4,r5)
- LOAD_BAT(1,16,r3,r4,r5)
- LOAD_BAT(2,32,r3,r4,r5)
- LOAD_BAT(3,48,r3,r4,r5)
-
-/* Set up for using our exception vectors */
- /* ptr to phys current tss */
- tophys(r4,r2,r4)
- addi r4,r4,TSS /* init task's TSS */
- mtspr SPRG3,r4
- li r3,0
- mtspr SPRG2,r3 /* 0 => r1 has kernel sp */
-
- /* need to flush/invalidate caches too */
- li r3,0x4000/CACHE_LINE_SIZE
- li r4,0
- mtctr r3
-73: dcbst 0,r4
- addi r4,r4,CACHE_LINE_SIZE
- bdnz 73b
- sync
- li r4,0
- mtctr r3
-72: icbi 0,r4
- addi r4,r4,CACHE_LINE_SIZE
- bdnz 72b
- sync
- isync
-77:
-/* Now turn on the MMU for real! */
- li r4,MSR_KERNEL
- lis r3,start_secondary@h
- ori r3,r3,start_secondary@l
- mtspr SRR0,r3
- mtspr SRR1,r4
- rfi /* enable MMU and jump to start_kernel */
-/* should never return */
- .long 0
-#endif /* __SMP__ */
-
/*
* PROM code for specific machines follows. Put it
* here so it's easy to add arch-specific sections later.
/*
- * $Id: idle.c,v 1.48 1998/07/30 11:29:22 davem Exp $
+ * $Id: idle.c,v 1.50 1998/08/18 16:19:25 cort Exp $
*
* Idle daemon for PowerPC. Idle daemon will handle any action
* that needs to be taken when the system becomes idle.
__sti();
/* endless loop with no priority at all */
- current->priority = -100;
- current->counter = -100;
+ current->priority = 0;
+ current->counter = 0;
check_pgt_cache();
#ifndef __SMP__
if ( !current->need_resched ) power_save();
#endif /* __SMP__ */
+ run_task_queue(&tq_scheduler);
schedule();
}
ret = 0;
#include <asm/gg2.h>
#include <asm/cache.h>
#include <asm/prom.h>
+#include <asm/amigaints.h>
+#include <asm/amigahw.h>
+#include <asm/amigappc.h>
#ifdef CONFIG_8xx
#include <asm/8xx_immap.h>
#include <asm/mbx.h>
#endif
-#include <asm/amigaints.h>
-#include <asm/amigahw.h>
-#include <asm/amigappc.h>
-#define VEC_SPUR (24)
extern void process_int(unsigned long vec, struct pt_regs *fp);
extern void apus_init_IRQ(void);
extern void amiga_disable_irq(unsigned int irq);
extern void amiga_enable_irq(unsigned int irq);
+static void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
+static volatile unsigned char *gg2_int_ack_special;
+extern volatile unsigned long ipi_count;
+
#ifdef CONFIG_APUS
/* Rename a few functions. Requires the CONFIG_APUS protection. */
#define request_irq nop_ppc_request_irq
#define free_irq nop_ppc_free_irq
#define get_irq_list nop_get_irq_list
#endif
-
-#undef SHOW_IRQ
-
-#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
-
-int max_irqs;
-unsigned int local_irq_count[NR_CPUS];
-static struct irqaction *irq_action[NR_IRQS];
-static int spurious_interrupts = 0;
-static unsigned int cached_irq_mask[NR_MASK_WORDS];
-unsigned int lost_interrupts[NR_MASK_WORDS];
-atomic_t n_lost_interrupts;
-
-static void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
-
-/*spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED;*/
-#ifdef __SMP__
-atomic_t __ppc_bh_counter = ATOMIC_INIT(0);
-#else
-int __ppc_bh_counter = 0;
-#endif
-static volatile unsigned char *gg2_int_ack_special;
-extern volatile unsigned long ipi_count;
-
-#define cached_21 (((char *)(cached_irq_mask))[3])
-#define cached_A1 (((char *)(cached_irq_mask))[2])
-
-/*
- * These are set to the appropriate functions by init_IRQ()
- */
#ifndef CONFIG_8xx
void (*mask_and_ack_irq)(int irq_nr);
void (*mask_irq)(unsigned int irq_nr);
#define unmask_irq(irq) mbx_unmask_irq(irq)
#endif /* CONFIG_8xx */
-
-/* prep */
+#define VEC_SPUR (24)
+#undef SHOW_IRQ
+#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
+#define cached_21 (((char *)(cached_irq_mask))[3])
+#define cached_A1 (((char *)(cached_irq_mask))[2])
#define PREP_IRQ_MASK (((unsigned int)cached_A1)<<8) | (unsigned int)cached_21
+unsigned int local_bh_count[NR_CPUS];
+unsigned int local_irq_count[NR_CPUS];
+int max_irqs;
+static struct irqaction *irq_action[NR_IRQS];
+static int spurious_interrupts = 0;
+static unsigned int cached_irq_mask[NR_MASK_WORDS];
+unsigned int lost_interrupts[NR_MASK_WORDS];
+atomic_t n_lost_interrupts;
+
/* pmac */
struct pmac_irq_hw {
unsigned int flag;
(struct pmac_irq_hw *) 0xf3000010,
};
-#define KEYBOARD_IRQ 20 /* irq number for command-power interrupt */
-
/* nasty hack for shared irq's since we need to do kmalloc calls but
* can't very very early in the boot when we need to do a request irq.
}
+/*
+ * Global interrupt locks for SMP. Allow interrupts to come in on any
+ * CPU, yet make cli/sti act globally to protect critical regions..
+ */
#ifdef __SMP__
-/* Who has global_irq_lock. */
unsigned char global_irq_holder = NO_PROC_ID;
+unsigned volatile int global_irq_lock;
+atomic_t global_irq_count;
-/* This protects IRQ's. */
-spinlock_t global_irq_lock = SPIN_LOCK_UNLOCKED;
-unsigned long previous_irqholder;
+atomic_t global_bh_count;
+atomic_t global_bh_lock;
-/* This protects BH software state (masks, things like that). */
-spinlock_t global_bh_lock = SPIN_LOCK_UNLOCKED;
+static void show(char * str)
+{
+ int i;
+ unsigned long *stack;
+ int cpu = smp_processor_id();
-/* Global IRQ locking depth. */
-atomic_t global_irq_count = ATOMIC_INIT(0);
+ printk("\n%s, CPU %d:\n", str, cpu);
+ printk("irq: %d [%d %d]\n",
+ atomic_read(&global_irq_count), local_irq_count[0], local_irq_count[1]);
+ printk("bh: %d [%d %d]\n",
+ atomic_read(&global_bh_count), local_bh_count[0], local_bh_count[1]);
+ stack = (unsigned long *) &str;
+ for (i = 40; i ; i--) {
+ unsigned long x = *++stack;
+ if (x > (unsigned long) &init_task_union && x < (unsigned long) &vsprintf) {
+ printk("<[%08lx]> ", x);
+ }
+ }
+}
-#undef INIT_STUCK
-#define INIT_STUCK 100000000
+#define MAXCOUNT 100000000
+static inline void wait_on_bh(void)
+{
+ int count = MAXCOUNT;
+ do {
+ if (!--count) {
+ show("wait_on_bh");
+ count = ~0;
+ }
+ /* nothing .. wait for the other bh's to go away */
+ } while (atomic_read(&global_bh_count) != 0);
+}
-#undef STUCK
-#define STUCK \
-if (!--stuck) {printk("wait_on_irq CPU#%d stuck at %08lx, waiting for %08lx (local=%d, global=%d)\n", cpu, where, previous_irqholder, local_count, atomic_read(&global_irq_count)); stuck = INIT_STUCK; }
-void wait_on_irq(int cpu, unsigned long where)
+#define MAXCOUNT 100000000
+static inline void wait_on_irq(int cpu)
{
- int stuck = INIT_STUCK;
- int local_count = local_irq_count[cpu];
+ int count = MAXCOUNT;
- /* Are we the only one in an interrupt context? */
- while (local_count != atomic_read(&global_irq_count)) {
- /*
- * No such luck. Now we need to release the lock,
- * _and_ release our interrupt context, because
- * otherwise we'd have dead-locks and live-locks
- * and other fun things.
- */
- atomic_sub(local_count, &global_irq_count);
- spin_unlock(&global_irq_lock);
+ for (;;) {
/*
- * Wait for everybody else to go away and release
- * their things before trying to get the lock again.
+ * Wait until all interrupts are gone. Wait
+ * for bottom half handlers unless we're
+ * already executing in one..
*/
+ if (!atomic_read(&global_irq_count)) {
+ if (local_bh_count[cpu] || !atomic_read(&global_bh_count))
+ break;
+ }
+
+ /* Duh, we have to loop. Release the lock to avoid deadlocks */
+ clear_bit(0,&global_irq_lock);
+
for (;;) {
- STUCK;
+ if (!--count) {
+ show("wait_on_irq");
+ count = ~0;
+ }
+ __sti();
+ /* don't worry about the lock race Linus found
+ * on intel here. -- Cort
+ */
+ __cli();
if (atomic_read(&global_irq_count))
continue;
- if (*((unsigned char *)&global_irq_lock))
+ if (global_irq_lock)
continue;
- if (spin_trylock(&global_irq_lock))
+ if (!local_bh_count[cpu] && atomic_read(&global_bh_count))
+ continue;
+ if (!test_and_set_bit(0,&global_irq_lock))
break;
}
- atomic_add(local_count, &global_irq_count);
}
}
-#define irq_active(cpu) \
- (global_irq_count != local_irq_count[cpu])
+/*
+ * This is called when we want to synchronize with
+ * bottom half handlers. We need to wait until
+ * no other CPU is executing any bottom half handler.
+ *
+ * Don't wait if we're already running in an interrupt
+ * context or are inside a bh handler.
+ */
+void synchronize_bh(void)
+{
+ if (atomic_read(&global_bh_count) && !in_interrupt())
+ wait_on_bh();
+}
+
/*
* This is called when we want to synchronize with
* stop sending interrupts: but to make sure there
* are no interrupts that are executing on another
* CPU we need to call this function.
- *
- * On UP this is a no-op.
*/
void synchronize_irq(void)
{
- int cpu = smp_processor_id();
- int local_count = local_irq_count[cpu];
-
- /* Do we need to wait? */
- if (local_count != atomic_read(&global_irq_count)) {
- /* The stupid way to do this */
+ if (atomic_read(&global_irq_count)) {
+ /* Stupid approach */
cli();
sti();
}
}
-#undef INIT_STUCK
-#define INIT_STUCK 10000000
-
-#undef STUCK
-#define STUCK \
-if (!--stuck) {\
-ll_printk("get_irqlock stuck at %08lx, waiting for %08lx\n", where, previous_irqholder); stuck = INIT_STUCK;}
-
-void get_irqlock(int cpu, unsigned long where)
+static inline void get_irqlock(int cpu)
{
- int stuck = INIT_STUCK;
- if (!spin_trylock(&global_irq_lock)) {
+ if (test_and_set_bit(0,&global_irq_lock)) {
/* do we already hold the lock? */
if ((unsigned char) cpu == global_irq_holder)
return;
/* Uhhuh.. Somebody else got it. Wait.. */
do {
do {
- STUCK;
- barrier();
- } while (*((unsigned char *)&global_irq_lock));
- } while (!spin_trylock(&global_irq_lock));
+
+ } while (test_bit(0,&global_irq_lock));
+ } while (test_and_set_bit(0,&global_irq_lock));
}
-
- /*
- * Ok, we got the lock bit.
- * But that's actually just the easy part.. Now
- * we need to make sure that nobody else is running
+ /*
+ * We also to make sure that nobody else is running
* in an interrupt context.
*/
- wait_on_irq(cpu, where);
+ wait_on_irq(cpu);
+
/*
- * Finally.
+ * Ok, finally..
*/
global_irq_holder = cpu;
- previous_irqholder = where;
}
+/*
+ * A global "cli()" while in an interrupt context
+ * turns into just a local cli(). Interrupts
+ * should use spinlocks for the (very unlikely)
+ * case that they ever want to protect against
+ * each other.
+ *
+ * If we already have local interrupts disabled,
+ * this will not turn a local disable into a
+ * global one (problems with spinlocks: this makes
+ * save_flags+cli+sti usable inside a spinlock).
+ */
void __global_cli(void)
{
- int cpu = smp_processor_id();
- unsigned long where;
- __asm__("mr %0,31" : "=r" (where)); /* get lr */
- __cli();
- get_irqlock(cpu, where);
+ unsigned int flags;
+
+ __save_flags(flags);
+ if (flags & (1 << 15)) {
+ int cpu = smp_processor_id();
+ __cli();
+ if (!local_irq_count[cpu])
+ get_irqlock(cpu);
+ }
}
void __global_sti(void)
{
- release_irqlock(smp_processor_id());
+ int cpu = smp_processor_id();
+
+ if (!local_irq_count[cpu])
+ release_irqlock(cpu);
__sti();
}
+/*
+ * SMP flags value to restore to:
+ * 0 - global cli
+ * 1 - global sti
+ * 2 - local cli
+ * 3 - local sti
+ */
unsigned long __global_save_flags(void)
{
- return global_irq_holder == (unsigned char) smp_processor_id();
+ int retval;
+ int local_enabled;
+ unsigned long flags;
+
+ __save_flags(flags);
+ local_enabled = (flags >> 15) & 1;
+ /* default to local */
+ retval = 2 + local_enabled;
+
+ /* check for global flags if we're not in an interrupt */
+ if (!local_irq_count[smp_processor_id()]) {
+ if (local_enabled)
+ retval = 1;
+ if (global_irq_holder == (unsigned char) smp_processor_id())
+ retval = 0;
+ }
+ return retval;
}
void __global_restore_flags(unsigned long flags)
{
switch (flags) {
case 0:
- release_irqlock(smp_processor_id());
- __sti();
+ __global_cli();
break;
case 1:
- __global_cli();
+ __global_sti();
+ break;
+ case 2:
+ __cli();
+ break;
+ case 3:
+ __sti();
break;
default:
printk("global_restore_flags: %08lx (%08lx)\n",
flags, (&flags)[-1]);
}
}
+
#endif /* __SMP__ */
for (i = 0; i * 32 < max_irqs; ++i)
out_le32(&pmac_irq_hw[i]->enable, 0);
#ifdef CONFIG_XMON
- request_irq(KEYBOARD_IRQ, xmon_irq, 0, "NMI", 0);
+ request_irq(20, xmon_irq, 0, "NMI", 0);
#endif /* CONFIG_XMON */
break;
case _MACH_chrp:
unmask_irq = chrp_unmask_irq;
gg2_int_ack_special = (volatile unsigned char *)
ioremap(GG2_INT_ACK_SPECIAL, 1);
- openpic_init();
+ openpic_init(1);
i8259_init();
cached_irq_mask[0] = cached_irq_mask[1] = ~0UL;
#ifdef CONFIG_XMON
_GLOBAL(_get_L2CR)
mfspr r3,L2CR
blr
-
+
+_GLOBAL(_set_L2CR)
+ mtspr L2CR,r3
+ blr
+
_GLOBAL(_get_PVR)
mfspr r3,PVR
blr
+/*
+ * These are used in the alignment trap handler when emulating
+ * single-precision loads and stores.
+ * We restore and save the fpscr so the task gets the same result
+ * and exceptions as if the cpu had performed the load or store.
+ */
_GLOBAL(cvt_fd)
cvt_fd:
+ lfd 0,-4(r5) /* load up fpscr value */
+ mtfsf 0xff,0
lfs 0,0(r3)
stfd 0,0(r4)
+ mffs 0 /* save new fpscr value */
+ stfd 0,-4(r5)
+ blr
+
+_GLOBAL(cvt_df)
+cvt_df:
+ lfd 0,-4(r5) /* load up fpscr value */
+ mtfsf 0xff,0
+ lfd 0,0(r3)
+ stfs 0,0(r4)
+ mffs 0 /* save new fpscr value */
+ stfd 0,-4(r5)
blr
/*
mr r3,r4
blr
-_GLOBAL(cvt_df)
-cvt_df:
- lfd 0,0(r3)
- stfs 0,0(r4)
- blr
-
/*
* Create a kernel thread
* __kernel_thread(flags, fn, arg)
.align 4
.globl sys_call_table
sys_call_table:
- .long sys_setup /* 0 */
+ .long sys_ni_syscall /* 0 - old "setup()" system call */
.long sys_exit
.long sys_fork
.long sys_read
.long sys_pwrite /* 180 */
.long sys_chown
.long sys_getcwd
+ .long sys_capget
+ .long sys_capset
+ .long sys_sigaltstack /* 185 */
+ .long sys_sendfile
+ .long sys_ni_syscall
+ .long sys_ni_syscall
.space (NR_syscalls-183)*4
return val & mask;
}
-static inline void openpic_writefield(volatile u_int *addr, u_int mask,
+inline void openpic_writefield(volatile u_int *addr, u_int mask,
u_int field)
{
u_int val = openpic_read(addr);
* Initialize the OpenPIC
*/
-__initfunc(void openpic_init(void))
+__initfunc(void openpic_init(int main_pic))
{
u_int t, i;
u_int vendorid, devid, stepping, timerfreq;
else
printk("not set\n");
- /* Initialize timer interrupts */
- for (i = 0; i < OPENPIC_NUM_TIMERS; i++) {
- /* Disabled, Priority 0 */
- openpic_inittimer(i, 0, OPENPIC_VEC_TIMER+i);
- /* No processor */
- openpic_maptimer(i, 0);
+ if ( main_pic )
+ {
+ /* Initialize timer interrupts */
+ for (i = 0; i < OPENPIC_NUM_TIMERS; i++) {
+ /* Disabled, Priority 0 */
+ openpic_inittimer(i, 0, OPENPIC_VEC_TIMER+i);
+ /* No processor */
+ openpic_maptimer(i, 0);
+ }
+
+ /* Initialize IPI interrupts */
+ for (i = 0; i < OPENPIC_NUM_IPI; i++) {
+ /* Disabled, Priority 0 */
+ openpic_initipi(i, 0, OPENPIC_VEC_IPI+i);
+ }
+
+ /* Initialize external interrupts */
+ /* SIOint (8259 cascade) is special */
+ openpic_initirq(0, 8, OPENPIC_VEC_SOURCE, 1, 1);
+ /* Processor 0 */
+ openpic_mapirq(0, 1<<0);
+ for (i = 1; i < NumSources; i++) {
+ /* Enabled, Priority 8 */
+ openpic_initirq(i, 8, OPENPIC_VEC_SOURCE+i, 0,
+ i < OpenPIC_NumInitSenses ? OpenPIC_InitSenses[i] : 1);
+ /* Processor 0 */
+ openpic_mapirq(i, 1<<0);
+ }
+
+ /* Initialize the spurious interrupt */
+ openpic_set_spurious(OPENPIC_VEC_SPURIOUS);
+
+ if (request_irq(IRQ_8259_CASCADE, no_action, SA_INTERRUPT,
+ "82c59 cascade", NULL))
+ printk("Unable to get OpenPIC IRQ 0 for cascade\n");
+ openpic_set_priority(0, 0);
+ openpic_disable_8259_pass_through();
}
-
- /* Initialize IPI interrupts */
- for (i = 0; i < OPENPIC_NUM_IPI; i++) {
- /* Disabled, Priority 0 */
- openpic_initipi(i, 0, OPENPIC_VEC_IPI+i);
- }
-
- /* Initialize external interrupts */
- /* SIOint (8259 cascade) is special */
- openpic_initirq(0, 8, OPENPIC_VEC_SOURCE, 1, 1);
- /* Processor 0 */
- openpic_mapirq(0, 1<<0);
- for (i = 1; i < NumSources; i++) {
- /* Enabled, Priority 8 */
- openpic_initirq(i, 8, OPENPIC_VEC_SOURCE+i, 0,
- i < OpenPIC_NumInitSenses ? OpenPIC_InitSenses[i] : 1);
- /* Processor 0 */
- openpic_mapirq(i, 1<<0);
- }
-
- /* Initialize the spurious interrupt */
- openpic_set_spurious(OPENPIC_VEC_SPURIOUS);
-
- if (request_irq(IRQ_8259_CASCADE, no_action, SA_INTERRUPT,
- "82c59 cascade", NULL))
- printk("Unable to get OpenPIC IRQ 0 for cascade\n");
- openpic_set_priority(0, 0);
- openpic_disable_8259_pass_through();
}
OPENPIC_SENSE_LEVEL,
(sense ? OPENPIC_SENSE_LEVEL : 0));
}
-
-
/*
- * $Id: pci.c,v 1.36 1998/08/02 23:22:11 paulus Exp $
+ * $Id: pci.c,v 1.38 1998/08/31 06:28:02 cort Exp $
* Common pmac/prep/chrp pci routines. -- Cort
*/
route_pci_interrupts();
for(dev=pci_devices; dev; dev=dev->next)
{
+ /*
+ * Use our old hard-coded kludge to figure out what
+ * irq this device uses. This is necessary on things
+ * without residual data. -- Cort
+ */
unsigned char d = PCI_SLOT(dev->devfn);
dev->irq = Motherboard_routes[Motherboard_map[d]];
+#if 0
+ /*
+ * If we have residual data and if it knows about this
+ * device ask it what the irq is.
+ * -- Cort
+ */
+ ppcd = residual_find_device_id( ~0L, dev->device,
+ -1,-1,-1, 0);
+#endif
}
break;
case _MACH_chrp:
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/major.h>
+#include <linux/blk.h>
#include <linux/vt_kern.h>
#include <linux/console.h>
#include <asm/prom.h>
#include <asm/mediabay.h>
#include "time.h"
-extern int root_mountflags;
-
unsigned char drive_info;
+extern char saved_command_line[];
+
#define DEFAULT_ROOT_DEVICE 0x0801 /* sda1 - slightly silly choice */
extern void zs_kgdb_hook(int tty_num);
pmac_get_cpuinfo(char *buffer)
{
int len;
- /* should find motherboard type here as well */
- len = sprintf(buffer,"machine\t\t: PowerMac\n");
+ struct device_node *np;
+ char *pp;
+ int plen;
+
+ /* find motherboard type */
+ len = sprintf(buffer, "machine\t\t: ");
+ np = find_devices("device-tree");
+ if (np != NULL) {
+ pp = (char *) get_property(np, "model", NULL);
+ if (pp != NULL)
+ len += sprintf(buffer+len, "%s\n", pp);
+ else
+ len += sprintf(buffer+len, "PowerMac\n");
+ pp = (char *) get_property(np, "compatible", &plen);
+ if (pp != NULL) {
+ len += sprintf(buffer+len, "motherboard\t:");
+ while (plen > 0) {
+ int l = strlen(pp) + 1;
+ len += sprintf(buffer+len, " %s", pp);
+ plen -= l;
+ pp += l;
+ }
+ buffer[len++] = '\n';
+ }
+ } else
+ len += sprintf(buffer+len, "PowerMac\n");
+
+ /* find l2 cache info */
+ np = find_devices("l2-cache");
+ if (np == 0)
+ np = find_type_devices("cache");
+ if (np != 0) {
+ unsigned int *ic = (unsigned int *)
+ get_property(np, "i-cache-size", NULL);
+ unsigned int *dc = (unsigned int *)
+ get_property(np, "d-cache-size", NULL);
+ len += sprintf(buffer+len, "L2 cache\t:");
+ if (get_property(np, "cache-unified", NULL) != 0 && dc) {
+ len += sprintf(buffer+len, " %dK unified", *dc / 1024);
+ } else {
+ if (ic)
+ len += sprintf(buffer+len, " %dK instruction",
+ *ic / 1024);
+ if (dc)
+ len += sprintf(buffer+len, "%s %dK data",
+ (ic? " +": ""), *dc / 1024);
+ }
+ pp = get_property(np, "ram-type", NULL);
+ if (pp)
+ len += sprintf(buffer+len, " %s", pp);
+ buffer[len++] = '\n';
+ }
+
+ /* find ram info */
+ np = find_devices("memory");
+ if (np != 0) {
+ struct reg_property *reg = (struct reg_property *)
+ get_property(np, "reg", NULL);
+ if (reg != 0) {
+ len += sprintf(buffer+len, "memory\t\t: %dMB\n",
+ reg->size >> 20);
+ }
+ }
+
return len;
}
#endif
kd_mksound = pmac_mksound;
+
+#ifdef CONFIG_BLK_DEV_INITRD
+ if (initrd_start)
+ ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
+ else
+#endif
+ ROOT_DEV = to_kdev_t(DEFAULT_ROOT_DEVICE);
}
__initfunc(static void ohare_init(void))
}
}
+#ifdef CONFIG_SCSI
__initfunc(void
note_scsi_host(struct device_node *node, void *host))
{
}
}
}
+#endif
-__initfunc(void find_boot_device(void))
+#ifdef CONFIG_BLK_DEV_IDE_PMAC
+extern int pmac_ide_count;
+extern struct device_node *pmac_ide_node[];
+static int ide_majors[] = { 3, 22, 33, 34, 56, 57 };
+
+__initfunc(kdev_t find_ide_boot(void))
{
- kdev_t dev;
+ char *p;
+ int i, n;
- if (kdev_t_to_nr(ROOT_DEV) != 0)
- return;
- ROOT_DEV = to_kdev_t(DEFAULT_ROOT_DEVICE);
- if (boot_host == NULL)
- return;
+ if (bootdevice == NULL)
+ return 0;
+ p = strrchr(bootdevice, '/');
+ if (p == NULL)
+ return 0;
+ n = p - bootdevice;
+
+ /*
+ * Look through the list of IDE interfaces for this one.
+ */
+ for (i = 0; i < pmac_ide_count; ++i) {
+ char *name = pmac_ide_node[i]->full_name;
+ if (memcmp(name, bootdevice, n) == 0 && name[n] == 0) {
+ /* XXX should cope with the 2nd drive as well... */
+ return MKDEV(ide_majors[i], 0);
+ }
+ }
+
+ return 0;
+}
+#endif /* CONFIG_BLK_DEV_IDE_PMAC */
+
+__initfunc(void find_boot_device(void))
+{
#ifdef CONFIG_SCSI
- dev = sd_find_target(boot_host, boot_target);
- if (dev == 0)
- return;
- boot_dev = MKDEV(MAJOR(dev), MINOR(dev) + boot_part);
+ if (boot_host != NULL) {
+ boot_dev = sd_find_target(boot_host, boot_target);
+ if (boot_dev != 0)
+ return;
+ }
+#endif
+#ifdef CONFIG_BLK_DEV_IDE_PMAC
+ boot_dev = find_ide_boot();
#endif
- /* XXX should cope with booting from IDE also */
}
__initfunc(void note_bootable_part(kdev_t dev, int part))
{
static int found_boot = 0;
+ char *p;
+
+ /* Do nothing if the root has been set already. */
+ if (ROOT_DEV != to_kdev_t(DEFAULT_ROOT_DEVICE))
+ return;
+ p = strstr(saved_command_line, "root=");
+ if (p != NULL && (p == saved_command_line || p[-1] == ' '))
+ return;
if (!found_boot) {
find_boot_device();
--- /dev/null
+/*
+ * WARNING! This file is automatically generated - DO NOT EDIT!
+ */
+#define KERNELBASE -1073741824
+#define STATE 0
+#define NEXT_TASK 48
+#define COUNTER 24
+#define PROCESSOR 36
+#define SIGPENDING 8
+#define TSS 568
+#define MM 872
+#define TASK_STRUCT_SIZE 912
+#define KSP 0
+#define PG_TABLES 4
+#define PGD 8
+#define LAST_SYSCALL 20
+#define PT_REGS 12
+#define PF_TRACESYS 32
+#define TASK_FLAGS 4
+#define NEED_RESCHED 20
+#define TSS_FPR0 24
+#define TSS_FPSCR 284
+#define TSS_SMP_FORK_RET 288
+#define TASK_UNION_SIZE 8192
+#define STACK_FRAME_OVERHEAD 16
+#define INT_FRAME_SIZE 192
+#define GPR0 16
+#define GPR1 20
+#define GPR2 24
+#define GPR3 28
+#define GPR4 32
+#define GPR5 36
+#define GPR6 40
+#define GPR7 44
+#define GPR8 48
+#define GPR9 52
+#define GPR10 56
+#define GPR11 60
+#define GPR12 64
+#define GPR13 68
+#define GPR14 72
+#define GPR15 76
+#define GPR16 80
+#define GPR17 84
+#define GPR18 88
+#define GPR19 92
+#define GPR20 96
+#define GPR21 100
+#define GPR22 104
+#define GPR23 108
+#define GPR24 112
+#define GPR25 116
+#define GPR26 120
+#define GPR27 124
+#define GPR28 128
+#define GPR29 132
+#define GPR30 136
+#define GPR31 140
+#define _NIP 144
+#define _MSR 148
+#define _CTR 156
+#define _LINK 160
+#define _CCR 168
+#define _XER 164
+#define _DAR 180
+#define _DSISR 184
+#define ORIG_GPR3 152
+#define RESULT 188
+#define TRAP 176
/*
- * $Id: ppc_htab.c,v 1.21 1998/05/13 22:34:55 cort Exp $
+ * $Id: ppc_htab.c,v 1.25 1998/08/26 10:28:26 davem Exp $
*
* PowerPC hash table management proc entry. Will show information
* about the current hash table and will allow changes to it.
#include <linux/sched.h>
#include <linux/proc_fs.h>
#include <linux/stat.h>
+#include <linux/sysctl.h>
+#include <linux/ctype.h>
#include <asm/uaccess.h>
#include <asm/bitops.h>
static ssize_t ppc_htab_write(struct file * file, const char * buffer,
size_t count, loff_t *ppos);
static long long ppc_htab_lseek(struct file * file, loff_t offset, int orig);
+int proc_dol2crvec(ctl_table *table, int write, struct file *filp,
+ void *buffer, size_t *lenp);
extern PTE *Hash, *Hash_end;
extern unsigned long Hash_size, Hash_mask;
return(-EINVAL);
}
}
+
+int proc_dol2crvec(ctl_table *table, int write, struct file *filp,
+ void *buffer, size_t *lenp)
+{
+ int vleft, first=1, len, left, val;
+ #define TMPBUFLEN 256
+ char buf[TMPBUFLEN], *p;
+
+ if ( (_get_PVR() >> 16) != 8) return -EFAULT;
+
+ if ( /*!table->maxlen ||*/ (filp->f_pos && !write)) {
+ *lenp = 0;
+ return 0;
+ }
+
+ vleft = table->maxlen / sizeof(int);
+ left = *lenp;
+
+ for (; left /*&& vleft--*/; first=0) {
+ if (write) {
+ while (left) {
+ char c;
+ if(get_user(c,(char *) buffer))
+ return -EFAULT;
+ if (!isspace(c))
+ break;
+ left--;
+ ((char *) buffer)++;
+ }
+ if (!left)
+ break;
+ len = left;
+ if (len > TMPBUFLEN-1)
+ len = TMPBUFLEN-1;
+ if(copy_from_user(buf, buffer, len))
+ return -EFAULT;
+ buf[len] = 0;
+ p = buf;
+ if (*p < '0' || *p > '9')
+ break;
+ val = simple_strtoul(p, &p, 0);
+ len = p-buf;
+ if ((len < left) && *p && !isspace(*p))
+ break;
+ buffer += len;
+ left -= len;
+ _set_L2CR(val);
+ while ( _get_L2CR() & 0x1 )
+ /* wait for invalidate to finish */;
+
+ } else {
+ p = buf;
+ if (!first)
+ *p++ = '\t';
+ val = _get_L2CR();
+ p += sprintf(p, "%08x: ", val);
+ p += sprintf(p, " %s",
+ (val&0x80000000)?"enabled":"disabled");
+ p += sprintf(p,",%sparity",(val&0x40000000)?"":"no ");
+
+ switch( (val >> 28) & 0x3 )
+ {
+ case 1: p += sprintf(p,",256Kb");
+ break;
+ case 2: p += sprintf(p,",512Kb");
+ break;
+ case 3: p += sprintf(p,",1M");
+ break;
+ default: p += sprintf(p,",unknown size");
+ break;
+ }
+
+
+ switch( (val >> 25) & 0x7 )
+ {
+ case 0: p += sprintf(p,",clock disabled");
+ break;
+ case 1: p += sprintf(p,",+1 clock");
+ break;
+ case 2: p += sprintf(p,",+1.5 clock");
+ break;
+ case 7:
+ case 3: p += sprintf(p,",reserved clock");
+ break;
+ case 4: p += sprintf(p,",+2 clock");
+ break;
+ case 5: p += sprintf(p,",+2.5 clock");
+ break;
+ case 6: p += sprintf(p,",+3 clock");
+ break;
+ }
+
+ switch( (val >> 23) & 0x2 )
+ {
+ case 0: p += sprintf(p,",flow-through burst SRAM");
+ break;
+ case 1: p += sprintf(p,",reserved SRAM");
+ break;
+ case 2: p += sprintf(p,",pipelined burst SRAM");
+ break;
+ case 3: p += sprintf(p,",pipelined late-write SRAM");
+ break;
+ }
+
+ p += sprintf(p,"%s",(val>>22)?"":",data only");
+ p += sprintf(p,"%s",(val>>20)?",ZZ enabled":"");
+ p += sprintf(p,",%s",(val>>19)?"write-through":"copy-back");
+ p += sprintf(p,",%sns hold",(val>>16)?"1.0":"0.5");
+
+ p += sprintf(p,"\n");
+
+ len = strlen(buf);
+ if (len > left)
+ len = left;
+ if(copy_to_user(buffer, buf, len))
+ return -EFAULT;
+ left -= len;
+ buffer += len;
+ break;
+ }
+ }
+
+ if (!write && !first && left) {
+ if(put_user('\n', (char *) buffer))
+ return -EFAULT;
+ left--, buffer++;
+ }
+ if (write) {
+ p = (char *) buffer;
+ while (left) {
+ char c;
+ if(get_user(c, p++))
+ return -EFAULT;
+ if (!isspace(c))
+ break;
+ left--;
+ }
+ }
+ if (write && first)
+ return -EINVAL;
+ *lenp -= left;
+ filp->f_pos += *lenp;
+ return 0;
+}
#include <asm/semaphore.h>
#include <asm/processor.h>
#include <asm/uaccess.h>
+#include <asm/ide.h>
#include <asm/io.h>
#include <asm/atomic.h>
#include <asm/bitops.h>
EXPORT_SYMBOL(sys_sigreturn);
EXPORT_SYMBOL(n_lost_interrupts);
EXPORT_SYMBOL(do_lost_interrupts);
-EXPORT_SYMBOL(__ppc_bh_counter);
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(local_irq_count);
+EXPORT_SYMBOL(local_bh_count);
EXPORT_SYMBOL(isa_io_base);
EXPORT_SYMBOL(isa_mem_base);
EXPORT_SYMBOL(strspn);
EXPORT_SYMBOL(strcmp);
EXPORT_SYMBOL(strncmp);
+EXPORT_SYMBOL(strnicmp);
EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap);
+EXPORT_SYMBOL(ide_insw);
+EXPORT_SYMBOL(ide_outsw);
+
EXPORT_SYMBOL(start_thread);
EXPORT_SYMBOL(__kernel_thread);
/*
- * $Id: prep_pci.c,v 1.20 1998/06/19 16:48:45 cort Exp $
+ * $Id: prep_pci.c,v 1.22 1998/08/05 20:11:15 cort Exp $
* PReP pci functions.
* Originally by Gary Thomas
* rewritten and updated by Cort Dougan (cort@cs.nmt.edu)
15, /* Line 4 */
};
+/*
+ * a 6015 ibm board
+ * -- Cort
+ */
+static char ibm6015_pci_IRQ_map[23] __prepdata = {
+ 0, /* Slot 0 - unused */
+ 0, /* Slot 1 - unused */
+ 0, /* Slot 2 - unused */
+ 0, /* Slot 3 - unused */
+ 0, /* Slot 4 - unused */
+ 0, /* Slot 5 - unused */
+ 0, /* Slot 6 - unused */
+ 0, /* Slot 7 - unused */
+ 0, /* Slot 8 - unused */
+ 0, /* Slot 9 - unused */
+ 0, /* Slot 10 - unused */
+ 0, /* Slot 11 - */
+ 1, /* Slot 12 - SCSI */
+ 2, /* Slot 13 - */
+ 2, /* Slot 14 - */
+ 1, /* Slot 15 - */
+ 1, /* Slot 16 - */
+ 0, /* Slot 17 - */
+ 2, /* Slot 18 - */
+ 0, /* Slot 19 - */
+ 0, /* Slot 20 - */
+ 0, /* Slot 21 - */
+ 2, /* Slot 22 - */
+};
+static char ibm6015_pci_IRQ_routes[] __prepdata = {
+ 0, /* Line 0 - unused */
+ 13, /* Line 1 */
+ 10, /* Line 2 */
+ 15, /* Line 3 */
+ 15, /* Line 4 */
+};
+
+
/* IBM Nobis and 850 */
static char Nobis_pci_IRQ_map[23] __prepdata ={
0, /* Slot 0 - unused */
} else if ( _prep_type == _PREP_IBM )
{
unsigned char pl_id;
-
- if (inb(0x0852) == 0xFF) {
+ /*
+ * my carolina is 0xf0
+ * 6015 has 0xfc
+ * -- Cort
+ */
+ printk("IBM ID: %08x\n", inb(0x0852));
+ switch(inb(0x0852))
+ {
+ case 0xff:
Motherboard_map_name = "IBM 850/860 Portable\n";
Motherboard_map = Nobis_pci_IRQ_map;
Motherboard_routes = Nobis_pci_IRQ_routes;
- } else {
+ break;
+ case 0xfc:
+ Motherboard_map_name = "IBM 6015";
+ Motherboard_map = ibm6015_pci_IRQ_map;
+ Motherboard_routes = ibm6015_pci_IRQ_routes;
+ break;
+ default:
Motherboard_map_name = "IBM 8xx (Carolina)";
Motherboard_map = ibm8xx_pci_IRQ_map;
Motherboard_routes = ibm8xx_pci_IRQ_routes;
+ break;
}
+
/*printk("Changing IRQ mode\n");*/
pl_id=inb(0x04d0);
/*printk("Low mask is %#0x\n", pl_id);*/
#endif
len = sprintf(buffer,"machine\t\t: PReP %s\n",Motherboard_map_name);
+
- len += sprintf(buffer+len,"L2\t\t: ");
- switch(*((unsigned char *)CACHECRBA) & L2CACHE_MASK)
+ switch ( _prep_type )
{
- case L2CACHE_512KB:
- len += sprintf(buffer+len,"512Kb\n");
- break;
- case L2CACHE_256KB:
- len += sprintf(buffer+len,"256Kb\n");
- break;
- case L2CACHE_1MB:
- len += sprintf(buffer+len,"1MB\n");
+ case _PREP_IBM:
+ if ((*(unsigned char *)0x8000080c) & (1<<6))
+ len += sprintf(buffer+len,"Upgrade CPU\n");
+ len += sprintf(buffer+len,"L2\t\t: ");
+ if ((*(unsigned char *)0x8000080c) & (1<<7))
+ {
+ len += sprintf(buffer+len,"not present\n");
+ goto no_l2;
+ }
+ len += sprintf(buffer+len,"%sKb,",
+ (((*(unsigned char *)0x8000080d)>>2)&1)?"512":"256");
+ len += sprintf(buffer+len,"%sync\n",
+ ((*(unsigned char *)0x8000080d)>>7) ? "":"a");
break;
- case L2CACHE_NONE:
- len += sprintf(buffer+len,"none\n");
+ case _PREP_Motorola:
+ len += sprintf(buffer+len,"L2\t\t: ");
+ switch(*((unsigned char *)CACHECRBA) & L2CACHE_MASK)
+ {
+ case L2CACHE_512KB:
+ len += sprintf(buffer+len,"512Kb");
+ break;
+ case L2CACHE_256KB:
+ len += sprintf(buffer+len,"256Kb");
+ break;
+ case L2CACHE_1MB:
+ len += sprintf(buffer+len,"1MB");
+ break;
+ case L2CACHE_NONE:
+ len += sprintf(buffer+len,"none\n");
+ goto no_l2;
+ break;
+ default:
+ len += sprintf(buffer+len, "%x\n",
+ *((unsigned char *)CACHECRBA));
+ }
+
+ len += sprintf(buffer+len,",parity %s",
+ (*((unsigned char *)CACHECRBA) & L2CACHE_PARITY) ?
+ "enabled" : "disabled");
+
+ len += sprintf(buffer+len, " SRAM:");
+
+ switch ( ((*((unsigned char *)CACHECRBA) & 0xf0) >> 4) & ~(0x3) )
+ {
+ case 1: len += sprintf(buffer+len,
+ "synchronous,parity,flow-through\n");
+ break;
+ case 2: len += sprintf(buffer+len,"asynchronous,no parity\n");
+ break;
+ case 3: len += sprintf(buffer+len,"asynchronous,parity\n");
+ break;
+ default:len += sprintf(buffer+len,
+ "synchronous,pipelined,no parity\n");
+ break;
+ }
break;
- default:
- len += sprintf(buffer+len,"%x\n", *((unsigned char *)CACHECRBA));
}
-
+
+
+no_l2:
if ( res->ResidualLength == 0 )
return len;
}
len += sprintf(buffer+len,"\n");
-#if 0
- /* L2 */
- if ( (inb(IBM_EQUIP_PRESENT) & 1) == 0) /* l2 present */
- {
- len += sprintf(buffer+len,"l2\t\t: %dkB %s\n",
- ((inb(IBM_L2_STATUS) >> 5) & 1) ? 512 : 256,
- (inb(IBM_SYS_CTL) & 64) ? "enabled" : "disabled");
- }
- else
- {
- len += sprintf(buffer+len,"l2\t\t: not present\n");
- }
-#endif
-
return len;
}
ROOT_DEV = to_kdev_t(0x0801); /* sda1 */
break;
}
+
+ /* Enable L2. Assume we don't need to flush -- Cort*/
+ *(unsigned char *)(0x8000081c) = *(unsigned char *)(0x8000081c)|3;
/* make the serial port the console */
/* strcat(cmd_line,"console=ttyS0,9600n8"); */
regs->gpr[1] = sp;
regs->msr = MSR_USER;
shove_aux_table(sp);
+ if (last_task_used_math == current)
+ last_task_used_math = 0;
+ current->tss.fpscr = 0;
}
asmlinkage int sys_clone(int p1, int p2, int p3, int p4, int p5, int p6,
int i;
va_start(args, fmt);
- i=sprintf(buf,fmt,args);
+ i=vsprintf(buf,fmt,args);
ll_puts(buf);
va_end(args);
return i;
int lines = 24, cols = 80;
int orig_x = 0, orig_y = 0;
+void puthex(unsigned long val)
+{
+ unsigned char buf[10];
+ int i;
+ for (i = 7; i >= 0; i--)
+ {
+ buf[i] = "0123456789ABCDEF"[val & 0x0F];
+ val >>= 4;
+ }
+ buf[8] = '\0';
+ prom_print(buf);
+}
+
__initfunc(void ll_puts(const char *s))
{
int x,y;
/*
- * $Id: prom.c,v 1.32 1998/07/28 20:28:46 geert Exp $
+ * $Id: prom.c,v 1.39 1998/09/18 09:14:52 paulus Exp $
*
* Procedures for interfacing to the Open Firmware PROM on
* Power Macintosh computers.
#include <asm/processor.h>
#include <asm/irq.h>
#include <asm/io.h>
+#include <asm/smp.h>
+#include <asm/bootx.h>
/*
* Properties whose value is longer than this get excluded from our
static interpret_func interpret_macio_props;
static interpret_func interpret_root_props;
+#ifndef FB_MAX /* avoid pulling in all of the fb stuff */
+#define FB_MAX 8
+#endif
char *prom_display_paths[FB_MAX] __initdata = { 0, };
unsigned int prom_num_displays = 0;
+char *of_stdout_device = 0;
prom_entry prom = 0;
ihandle prom_chosen = 0, prom_stdout = 0;
static struct device_node *allnodes = 0;
static void *call_prom(const char *service, int nargs, int nret, ...);
- void prom_print(const char *msg);
static void prom_exit(void);
static unsigned long copy_device_tree(unsigned long, unsigned long);
static unsigned long inspect_node(phandle, struct device_node *, unsigned long,
unsigned long, struct device_node ***);
static unsigned long finish_node(struct device_node *, unsigned long,
interpret_func *);
+static void relocate_nodes(void);
static unsigned long check_display(unsigned long);
static int prom_next_node(phandle *);
extern void enter_rtas(void *);
extern unsigned long reloc_offset(void);
+extern char cmd_line[512]; /* XXX */
+boot_infos_t *boot_infos = 0; /* init it so it's in data segment not bss */
+
/*
* prom_init() is called very early on, before the kernel text
* and data have been mapped to KERNELBASE. At this point the code
unsigned long offset = reloc_offset();
int l;
char *p, *d;
-
- /* check if we're prep, return if we are */
- if ( *(unsigned long *)(0) == 0xdeadc0de )
+#ifdef __SMP__
+ if ( RELOC(first_cpu_booted) )
return;
-
+#endif /* __SMP__ */
+
/* check if we're apus, return if we are */
if ( r3 == 0x61707573 )
return;
+ /* If we came here from BootX, clear the screen,
+ * set up some pointers and return. */
+ if (r3 == 0x426f6f58 && pp == NULL) {
+ boot_infos_t *bi = (boot_infos_t *) r4;
+ unsigned int *screen;
+ int nw, ln;
+ unsigned long space;
+
+ /* first clear the screen */
+ for (ln = 0; ln < bi->dispDeviceRect[3]; ++ln) {
+ screen = (unsigned int *) (bi->dispDeviceBase
+ + ln * bi->dispDeviceRowBytes);
+ nw = bi->dispDeviceRect[2] * bi->dispDeviceDepth / 32;
+ for (; nw > 0; --nw)
+ *screen++ = 0;
+ }
+
+ RELOC(boot_infos) = PTRUNRELOC(bi);
+ space = bi->deviceTreeOffset + bi->deviceTreeSize;
+ if (bi->ramDisk)
+ space = bi->ramDisk + bi->ramDiskSize;
+ RELOC(klimit) = PTRUNRELOC((char *) bi + space);
+ return;
+ }
+
+ /* check if we're prep, return if we are */
+ if ( *(unsigned long *)(0) == 0xdeadc0de )
+ return;
+
/* First get a handle for the stdout device */
RELOC(prom) = pp;
RELOC(prom_chosen) = call_prom(RELOC("finddevice"), 1, 1,
sizeof(prom_stdout)) <= 0)
prom_exit();
- /* Get the boot device and translate it to a full OF pathname. */
+ /* Get the full OF pathname of the stdout device */
mem = (unsigned long) RELOC(klimit) + offset;
p = (char *) mem;
+ memset(p, 0, 256);
+ call_prom(RELOC("instance-to-path"), 3, 1, RELOC(prom_stdout), p, 255);
+ RELOC(of_stdout_device) = PTRUNRELOC(p);
+ mem += strlen(p) + 1;
+
+ /* Get the boot device and translate it to a full OF pathname. */
+ p = (char *) mem;
l = (int) call_prom(RELOC("getprop"), 4, 1, RELOC(prom_chosen),
RELOC("bootpath"), p, 1<<20);
if (l > 0) {
{
phandle node;
ihandle ih;
+ int i;
unsigned long offset = reloc_offset();
- char type[16], name[16], *path;
+ char type[16], *path;
for (node = 0; prom_next_node(&node); ) {
type[0] = 0;
ih = call_prom(RELOC("open"), 1, 1, path);
if (ih == 0 || ih == (ihandle) -1) {
prom_print(RELOC("... failed\n"));
- /* platinum kludge. platinum is a valid display,
- * but not handled by OF. Make sure prom_num_display
- * is incremented anyway
- */
- call_prom(RELOC("getprop"), 4, 1, node, RELOC("name"),
- name, sizeof(name));
- if (strncmp(name, RELOC("platinum"), 8))
- continue;
- } else {
- prom_print(RELOC("... ok\n"));
+ continue;
}
+ prom_print(RELOC("... ok\n"));
+
+ /*
+ * If this display is the device that OF is using for stdout,
+ * move it to the front of the list.
+ */
mem += strlen(path) + 1;
- RELOC(prom_display_paths[RELOC(prom_num_displays)++])
- = PTRUNRELOC(path);
+ i = RELOC(prom_num_displays)++;
+ if (RELOC(of_stdout_device) != 0 && i > 0
+ && strcmp(PTRRELOC(RELOC(of_stdout_device)), path) == 0) {
+ for (; i > 0; --i)
+ RELOC(prom_display_paths[i])
+ = RELOC(prom_display_paths[i-1]);
+ }
+ RELOC(prom_display_paths[i]) = PTRUNRELOC(path);
if (RELOC(prom_num_displays) >= FB_MAX)
break;
}
{
unsigned long mem = (unsigned long) klimit;
+ if (boot_infos)
+ relocate_nodes();
mem = finish_node(allnodes, mem, NULL);
printk(KERN_INFO "device tree used %lu bytes\n",
mem - (unsigned long) allnodes);
else
ifunc = NULL;
+ /* if we were booted from BootX, convert the full name */
+ if (boot_infos
+ && strncmp(np->full_name, "Devices:device-tree", 19) == 0) {
+ if (np->full_name[19] == 0) {
+ strcpy(np->full_name, "/");
+ } else if (np->full_name[19] == ':') {
+ char *p = np->full_name + 19;
+ np->full_name = p;
+ for (; *p; ++p)
+ if (*p == ':')
+ *p = '/';
+ }
+ }
+
for (child = np->child; child != NULL; child = child->sibling)
mem_start = finish_node(child, mem_start, ifunc);
return mem_start;
}
+/*
+ * When BootX makes a copy of the device tree from the MacOS
+ * Name Registry, it is in the format we use but all of the pointers
+ * are offsets from the start of the tree.
+ * This procedure updates the pointers.
+ */
+__openfirmware
+static void relocate_nodes(void)
+{
+ unsigned long base;
+ struct device_node *np;
+ struct property *pp;
+
+#define ADDBASE(x) (x = (x)? ((typeof (x))((unsigned long)(x) + base)): 0)
+
+ base = (unsigned long) boot_infos + boot_infos->deviceTreeOffset;
+ allnodes = (struct device_node *)(base + 4);
+ for (np = allnodes; np != 0; np = np->allnext) {
+ ADDBASE(np->full_name);
+ ADDBASE(np->properties);
+ ADDBASE(np->parent);
+ ADDBASE(np->child);
+ ADDBASE(np->sibling);
+ ADDBASE(np->allnext);
+ for (pp = np->properties; pp != 0; pp = pp->next) {
+ ADDBASE(pp->name);
+ ADDBASE(pp->value);
+ ADDBASE(pp->next);
+ }
+ }
+}
+
__openfirmware
static unsigned long
interpret_pci_props(struct device_node *np, unsigned long mem_start)
/*
- * $Id: residual.c,v 1.10 1998/07/09 22:23:18 cort Exp $
+ * $Id: residual.c,v 1.12 1998/08/27 23:15:56 paulus Exp $
*
* Code to deal with the PReP residual data.
*
*
*/
+#include <linux/config.h>
#include <linux/string.h>
#include <asm/residual.h>
#include <asm/pnp.h>
#include <asm/byteorder.h>
-#if 0
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
}
static void printlargepacket(PnP_TAG_PACKET * pkt, int size) {
- int i;
-
switch (tag_large_item_name(pkt->S1_Pack.Tag)) {
case LargeVendorItem:
printlargevendor(pkt, size);
}
}
static void printpackets(PnP_TAG_PACKET * pkt, const char * cat) {
- PnP_TAG_PACKET tmp;
if (pkt->S1_Pack.Tag== END_TAG) {
printk(" No packets describing %s resources.\n", cat);
return;
void print_residual_device_info(void)
{
int i;
- union _PnP_TAG_PACKET *pkt;
PPC_DEVICE *dev;
#define did dev->DeviceId
-return;
/* make sure we have residual data first */
if ( res->ResidualLength == 0 )
PnP_BASE_TYPES[did.BaseType],
PnP_SUB_TYPE_STR(did.BaseType,did.SubType),
s);
- printpackets( (union _PnP_TAG_PACKET *)
- &res->DevicePnPHeap[dev->AllocatedOffset], "allocated");
- printpackets( (union _PnP_TAG_PACKET *)
- &res->DevicePnPHeap[dev->PossibleOffset], "possible");
- printpackets( (union _PnP_TAG_PACKET *)
- &res->DevicePnPHeap[dev->CompatibleOffset], "compatible");
+ if ( dev->AllocatedOffset )
+ printpackets( (union _PnP_TAG_PACKET *)
+ &res->DevicePnPHeap[dev->AllocatedOffset],
+ "allocated");
+ if ( dev->PossibleOffset )
+ printpackets( (union _PnP_TAG_PACKET *)
+ &res->DevicePnPHeap[dev->PossibleOffset],
+ "possible");
+ if ( dev->CompatibleOffset )
+ printpackets( (union _PnP_TAG_PACKET *)
+ &res->DevicePnPHeap[dev->CompatibleOffset],
+ "compatible");
}
}
}
#endif
-#endif /* 0 */
/* Returns the device index in the residual data,
any of the search items may be set as -1 for wildcard,
DevID number field (second halfword) is big endian !
return 0;
}
+PPC_DEVICE *residual_find_device_id(unsigned long BusMask,
+ unsigned short DevID,
+ int BaseType,
+ int SubType,
+ int Interface,
+ int n)
+{
+ int i;
+ if ( !res->ResidualLength ) return NULL;
+ for (i=0; i<res->ActualNumDevices; i++) {
+#define Dev res->Devices[i].DeviceId
+ if ( (Dev.BusId&BusMask) &&
+ (BaseType==-1 || Dev.BaseType==BaseType) &&
+ (SubType==-1 || Dev.SubType==SubType) &&
+ (Interface==-1 || Dev.Interface==Interface) &&
+ (DevID==0xffff || (Dev.DevId&0xffff) == DevID) &&
+ !(n--) ) return res->Devices+i;
+#undef Dev
+ }
+ return 0;
+}
+
PnP_TAG_PACKET *PnP_find_packet(unsigned char *p,
unsigned packet_tag,
int n)
};
return 0; /* not found */
}
-
/*
- * $Id: setup.c,v 1.95 1998/07/20 19:03:47 geert Exp $
+ * $Id: setup.c,v 1.103 1998/09/18 09:14:56 paulus Exp $
* Common prep/pmac/chrp boot and setup code.
*/
#include <linux/config.h>
+#include <linux/module.h>
#include <linux/string.h>
#include <linux/sched.h>
#include <linux/init.h>
#ifdef CONFIG_MBX
#include <asm/mbx.h>
#endif
+#include <asm/bootx.h>
/* APUS defs */
extern unsigned long m68k_machtype;
-extern struct mem_info ramdisk;
extern int parse_bootinfo(const struct bi_record *);
extern char _end[];
+#ifdef CONFIG_APUS
+struct mem_info ramdisk;
+unsigned long isa_io_base;
+unsigned long isa_mem_base;
+unsigned long pci_dram_offset;
+#endif
/* END APUS defs */
extern char cmd_line[512];
int _prep_type;
+extern boot_infos_t *boot_infos;
+
/*
* Perhaps we can put the pmac screen_info[] here
* on pmac as well so we don't need the ifdef's.
}
-#ifdef CONFIG_BLK_DEV_IDE
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
void ide_init_hwif_ports (ide_ioreg_t *p, ide_ioreg_t base, int *irq)
{
#if !defined(CONFIG_MBX) && !defined(CONFIG_APUS)
}
#endif
}
+EXPORT_SYMBOL(ide_init_hwif_ports);
#endif
unsigned long cpu_temp(void)
unsigned long len = 0;
unsigned long bogosum = 0;
unsigned long i;
- unsigned long cr;
+
#ifdef __SMP__
extern unsigned long cpu_present_map;
extern struct cpuinfo_PPC cpu_data[NR_CPUS];
break;
case 8:
len += sprintf(len+buffer, "750\n");
- cr = _get_L2CR();
- if ( cr & (0x1<<28)) cr = 256;
- else if ( cr & (0x2<<28)) cr = 512;
- else if ( cr & (0x3<<28)) cr = 1024;
- else cr = 0;
- len += sprintf(len+buffer, "on-chip l2\t: "
- "%ld KB (%s)\n",
- cr,(_get_L2CR()&0x80000000) ? "on" : "off");
len += sprintf(len+buffer, "temperature \t: %lu C\n",
cpu_temp());
break;
#else /* CONFIG_MBX */
{
bd_t *bp;
- extern RESIDUAL res;
+ extern RESIDUAL *res;
- bp = (bd_t *)&res;
+ bp = (bd_t *)res;
len += sprintf(len+buffer,"clock\t\t: %dMHz\n"
"bus clock\t: %dMHz\n",
#ifndef CONFIG_MBX
#ifndef CONFIG_MACH_SPECIFIC
char *model;
- /* prep boot loader tells us if we're prep or not */
- if ( *(unsigned long *)(KERNELBASE) == (0xdeadc0de) )
- {
- _machine = _MACH_prep;
- have_of = 0;
- }
/* boot loader will tell us if we're APUS */
- else if ( r3 == 0x61707573 )
+ if ( r3 == 0x61707573 )
{
_machine = _MACH_apus;
have_of = 0;
r3 = 0;
- } else
- {
+ }
+ /* prep boot loader tells us if we're prep or not */
+ else if ( *(unsigned long *)(KERNELBASE) == (0xdeadc0de) ) {
+ _machine = _MACH_prep;
+ have_of = 0;
+ } else {
have_of = 1;
/* ask the OF info if we're a chrp or pmac */
model = get_property(find_path_device("/"), "type", NULL);
if (r3 >= 0x4000 && r3 < 0x800000 && r4 == 0) {
strncpy(cmd_line, (char *)r3 + KERNELBASE,
sizeof(cmd_line));
+ } else if (boot_infos != 0) {
+ /* booted by BootX - check for ramdisk */
+ if (boot_infos->kernelParamsOffset != 0)
+ strncpy(cmd_line, (char *) boot_infos
+ + boot_infos->kernelParamsOffset,
+ sizeof(cmd_line));
+#ifdef CONFIG_BLK_DEV_INITRD
+ if (boot_infos->ramDisk) {
+ initrd_start = (unsigned long) boot_infos
+ + boot_infos->ramDisk;
+ initrd_end = initrd_start + boot_infos->ramDiskSize;
+ initrd_below_start_ok = 1;
+ }
+#endif
} else {
struct device_node *chosen;
char *p;
ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
}
#endif
+ cmd_line[0] = 0;
chosen = find_devices("chosen");
if (chosen != NULL) {
p = get_property(chosen, "bootargs", NULL);
break;
#ifdef CONFIG_APUS
case _MACH_apus:
- setup_pci_ptrs();
/* Parse bootinfo. The bootinfo is located right after
the kernel bss */
parse_bootinfo((const struct bi_record *)&_end);
default:
printk("Unknown machine type in identify_machine!\n");
}
+
#else /* CONFIG_MBX */
if ( r3 )
#ifdef CONFIG_XMON
extern void xmon_map_scc(void);
xmon_map_scc();
+ if (strstr(cmd_line, "xmon"))
+ xmon(0);
#endif /* CONFIG_XMON */
/* reboot on panic */
m68k_machtype = MACH_AMIGA;
apus_setup_arch(memory_start_p,memory_end_p);
break;
-#endif
+#endif
default:
printk("Unknown machine %d in setup_arch()\n", _machine);
}
/*
* linux/arch/ppc/kernel/signal.c
*
- * $Id: signal.c,v 1.16 1998/06/16 23:34:10 cort Exp $
+ * $Id: signal.c,v 1.20 1998/09/28 16:47:09 cort Exp $
*
* PowerPC version
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
do_exit(SIGSEGV);
}
+asmlinkage int
+sys_sigaltstack(const stack_t *uss, stack_t *uoss)
+{
+ struct pt_regs *regs = (struct pt_regs *) &uss;
+ return do_sigaltstack(uss, uoss, regs->gpr[1]);
+}
+
int
sys_sigaction(int sig, const struct old_sigaction *act,
struct old_sigaction *oact)
setup_frame(regs, (struct sigregs *) frame, newsp);
return 1;
}
+
/*
- * $Id: smp.c,v 1.28 1998/08/04 04:47:45 cort Exp $
+ * $Id: smp.c,v 1.33 1998/09/25 04:32:30 cort Exp $
*
* Smp support for ppc.
*
unsigned int prof_multiplier[NR_CPUS];
unsigned int prof_counter[NR_CPUS];
+int first_cpu_booted = 0;
+
int start_secondary(void *);
extern int cpu_idle(void *unused);
/* make sure msg is for us */
if ( msg == -1 ) return;
-printk("recv after msg check\n");
+
switch( msg )
{
case MSG_STOP_CPU:
__initfunc(void smp_boot_cpus(void))
{
- extern unsigned long secondary_entry[];
extern struct task_struct *current_set[NR_CPUS];
- int i, timeout;
+ int i;
struct task_struct *p;
printk("Entering SMP Mode...\n");
+
+ first_cpu_booted = 1;
+ dcbf(&first_cpu_booted);
for (i = 0; i < NR_CPUS; i++) {
cpu_number_map[i] = -1;
p->processor = 1;
current_set[1] = p;
/* need to flush here since secondary bat's aren't setup */
- dcbf((volatile unsigned long *)¤t_set[1]);
+ dcbf((void *)¤t_set[1]);
/* setup entry point of secondary processor */
- *(volatile unsigned long *)(0xf2800000)
- = (unsigned long)secondary_entry-KERNELBASE;
+ /* *(volatile unsigned long *)(0xf2800000)
+ = (unsigned long)secondary_entry-KERNELBASE;*/
+ *(volatile unsigned long *)(0xf2800000) = 0x100;
eieio();
/* interrupt secondary to begin executing code */
*(volatile unsigned long *)(0xf80000c0) = 0L;
* calibrate_delay() so use this value that I found through
* experimentation. -- Cort
*/
- udelay(1);
+ for ( i = 1000; i && !cpu_callin_map[1] ; i-- )
+ udelay(100);
+
if(cpu_callin_map[1]) {
cpu_number_map[1] = 1;
__cpu_logical_map[i] = 1;
#if 0 /* this sync's the decr's, but we don't want this now -- Cort */
set_dec(decrementer_count);
#endif
- /* interrupt secondary to start decr's again */
+ /* interrupt secondary to start decr's on both cpus */
smp_message_pass(1,0xf0f0, 0, 0);
/* interrupt secondary to begin executing code */
/**(volatile unsigned long *)(0xf80000c0) = 0L;
goto out;
}
- /*flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);*/
+ flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
ret = do_mmap(file, addr, len, prot, flags, offset);
out:
unlock_kernel();
--- /dev/null
+/*
+ * $Id: totalmp.c,v 1.5 1998/08/26 13:58:50 cort Exp $
+ *
+ * Support for Total Impact's TotalMP PowerPC accelerator board.
+ *
+ * Written by Cort Dougan (cort@cs.nmt.edu)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/openpic.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/mm.h>
+
+#include <asm/io.h>
+
+extern void totalmp_init(void);
+
+extern inline void openpic_writefield(volatile u_int *addr, u_int mask,
+ u_int field);
+__initfunc(void totalmp_init(void))
+{
+ struct pci_dev *dev;
+ u32 val;
+ unsigned long ctl_area, ctl_area_phys;
+
+ /* it's a pci card */
+ if ( !pci_present() ) return;
+
+ /* search for a MPIC. For now, we assume
+ * only one TotalMP card installed. -- Cort
+ */
+ for(dev=pci_devices; dev; dev=dev->next)
+ {
+ if ( (dev->vendor == PCI_VENDOR_ID_IBM)
+ && ((dev->device == PCI_DEVICE_ID_IBM_MPIC)
+ || (dev->device==PCI_DEVICE_ID_IBM_MPIC_2)) )
+ {
+ break;
+ }
+ }
+
+ if ( !dev ) return;
+
+ OpenPIC = (struct OpenPIC *)bus_to_virt(dev->base_address[0]);
+#if 0
+ if ( (ulong)OpenPIC > 0x10000000 )
+ {
+ printk("TotalMP: relocating base %lx -> %lx\n",
+ (ulong)OpenPIC, ((ulong)OpenPIC & 0x00FFFFFF) | 0x01000000);
+ OpenPIC = (struct OpenPIC *)(((ulong)OpenPIC & 0x00FFFFFF) | 0x01000000);
+ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, (ulong)OpenPIC);
+ }*/
+#endif
+ OpenPIC = (struct OpenPIC *)((ulong)OpenPIC + _IO_BASE);
+
+ openpic_init(0);
+
+ /* put openpic in 8259-cascade mode */
+ openpic_writefield(&OpenPIC->Global.Global_Configuration0, 0, 0x20000000);
+ /* set ipi to highest priority */
+ openpic_writefield(&OpenPIC->Global._IPI_Vector_Priority[0].Reg, 0, 0x000f0000);
+
+ /* allocate and remap the control area to be no-cache */
+ ctl_area = __get_free_pages(GFP_ATOMIC, 3);
+ ctl_area_phys = (unsigned long) virt_to_phys((void *)ctl_area);
+ ctl_area = (unsigned long)ioremap(ctl_area, 0x8000);
+
+ /* soft reset cpu 0 */
+ pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &val);
+ openpic_writefield(&OpenPIC->Global._Processor_Initialization.Reg, 0, 0x1);
+
+ /* wait for base address reg to change, signaling that cpu 0 is done */
+#define wait_for(where) { \
+ udelay(100); \
+ pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &val); \
+ if ( val != 0x77700000 ) \
+ { \
+ printk("TotalMP: CPU0 did not respond: val %x %d\n", val, where); \
+ /*free_pages((ulong)phys_to_virt(ctl_area_phys),1);*/ \
+ return; \
+ } }
+
+ /* tell cpu0 where the control area is */
+ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0,(~val) >> 16);
+ wait_for(0);
+ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0,
+ ((ulong)ctl_area & 0xff000000)>>20);
+ wait_for(1);
+ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0,
+ ((ulong)ctl_area & 0x00ff0000)>>12);
+ wait_for(2);
+ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0,
+ ((ulong)ctl_area & 0x0000ff00)>>4);
+ wait_for(3);
+ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0,
+ ((ulong)ctl_area & 0x000000ff)<<4);
+ wait_for(4);
+#undef wait_for
+ /* wait for cpu0 to "sign-on" */
+}
+
.globl __copy_tofrom_user
__copy_tofrom_user:
- rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */
+ srwi. r7,r5,3
addi r6,r3,-4
addi r4,r4,-4
- li r3,0 /* success return value */
- beq 2f /* if less than 8 bytes to do */
- andi. r0,r6,3 /* get dest word aligned */
+ li r3,0 /* success return value */
+ beq 2f /* if less than 8 bytes to do */
+ andi. r0,r6,3 /* get dest word aligned */
mtctr r7
bne 5f
1: lwz r7,4(r4)
14: lwzu r0,4(r4)
addi r5,r5,-4
15: stwu r0,4(r6)
-3: cmpwi 0,r5,0
+3: cmpwi 0,r5,0 /* do 1 byte at a time for the remainder */
beqlr
mtctr r5
addi r4,r4,3
16: stbu r0,1(r6)
bdnz 4b
blr
-5: subfic r0,r0,4
- mtctr r0
+5: subfic r0,r0,4 /* copy bytes until we have the */
+ mtctr r0 /* destination 4-byte aligned */
+ subf r5,r0,r5
6: lbz r7,4(r4)
addi r4,r4,1
17: stb r7,4(r6)
addi r6,r6,1
bdnz 6b
- subf r5,r0,r5
- rlwinm. r7,r5,32-3,3,31
+ srwi. r7,r5,3
beq 2b
mtctr r7
b 1b
-99: li r3,-EFAULT
+/* we come here on a fault in the 8-byte-at-a-time loop */
+88: subi r4,r4,8 /* compensate for the lwzu */
+98: mfctr r0
+ rlwimi r5,r0,3,0,28 /* use the byte-at-a-time loop to */
+ b 3b /* copy up to the byte at fault */
+/* here on a write fault in the single-word copy */
+96: subi r4,r4,4
+ b 3b
+/* here on a read fault in the initial single-byte copy */
+90: mfctr r3
+ add r3,r3,r5
+ b 70f
+/* here on a read fault in the final single-byte copy */
+99: mfctr r3
+ subi r6,r6,3
+/* clear out the rest of the destination: r3 bytes starting at 4(r6) */
+70: li r0,0
+ mr. r5,r3
+ beq 76f
+71: andi. r4,r6,3
+ beq 72f
+77: stb r0,4(r6)
+ addi r6,r6,1
+ addic. r5,r5,-1
+ bne 71b
+72: srwi. r7,r5,2
+ beq 73f
+ mtctr r7
+74: stwu r0,4(r6)
+ bdnz 74b
+73: andi. r5,r5,3
+ beq 76f
+ mtctr r5
+ addi r6,r6,3
+75: stbu r0,1(r6)
+ bdnz 75b
+76: blr
+/* here on a write fault in the initial single-byte copy */
+80: mfctr r3
+ add r3,r3,r5
blr
+/* here on a write fault in the final single-byte copy */
+81: mfctr r3
+ blr
+
.section __ex_table,"a"
.align 2
- .long 1b,99b
- .long 11b,99b
- .long 12b,99b
- .long 13b,99b
- .long 14b,99b
- .long 15b,99b
+ .long 1b,98b
+ .long 11b,98b
+ .long 12b,88b
+ .long 13b,88b
+ .long 14b,3b
+ .long 15b,96b
.long 4b,99b
- .long 16b,99b
- .long 6b,99b
- .long 17b,99b
+ .long 16b,81b
+ .long 6b,90b
+ .long 17b,80b
+ .long 77b,76b
+ .long 74b,76b
+ .long 75b,76b
.text
#undef CLEAR_USE_DCBZ 1
/*
- * $Id: init.c,v 1.115 1998/08/04 20:48:38 davem Exp $
+ * $Id: init.c,v 1.123 1998/09/19 19:03:55 geert Exp $
*
* PowerPC version
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
#include <linux/stddef.h>
#include <linux/vmalloc.h>
#include <linux/init.h>
+#include <linux/delay.h>
#ifdef CONFIG_BLK_DEV_INITRD
#include <linux/blk.h> /* for initrd_* */
#endif
#include <asm/uaccess.h>
#include <asm/8xx_immap.h>
#include <asm/mbx.h>
+#include <asm/smp.h>
+#include <asm/bootx.h>
/* APUS includes */
#include <asm/setup.h>
#include <asm/amigahw.h>
unsigned long avail_start;
struct pgtable_cache_struct quicklists;
struct mem_info memory[NUM_MEMINFO];
+extern boot_infos_t *boot_infos;
void MMU_init(void);
static void *MMU_get_page(void);
{
printk("%-8.8s %3d %3d %8ld %8ld %8ld %c%08lx %08lx ",
p->comm,p->pid,
- p->mm->count,p->mm->context,
+ atomic_read(&p->mm->count),p->mm->context,
p->mm->context<<4, p->tss.last_syscall,
user_mode(p->tss.regs) ? 'u' : 'k', p->tss.regs->nip,
(ulong)p);
for (bl = 128<<10; bl < 256<<20; bl <<= 1) {
if (bl * 2 > tot)
break;
- /* On some APUS systems, memory grows downwards, i.e.,
- 24MB will be 8MB aligned. Handle that properly by
- mapping first 8MB, then 16MB. */
- if (((bl * 2) - 1) & mem_base)
- break;
}
setbat(2, KERNELBASE, mem_base, bl, RAM_PAGE);
unsigned long a;
unsigned long num_freed_pages = 0, num_prep_pages = 0,
num_pmac_pages = 0, num_openfirmware_pages = 0;
-
#define FREESEC(START,END,CNT) do { \
a = (unsigned long)(&START); \
for (; a < (unsigned long)(&END); a += PAGE_SIZE) { \
*/
__initfunc(void MMU_init(void))
{
+
+#ifdef __SMP__
+ if ( first_cpu_booted ) return;
+#endif /* __SMP__ */
+
#ifndef CONFIG_8xx
if (have_of)
end_of_DRAM = pmac_find_end_of_memory();
break;
case _MACH_apus:
/* Map PPC exception vectors. */
- setbat(0, 0xfff00000, 0xfff00000, 0x00010000, RAM_PAGE);
+ setbat(0, 0xfff00000, 0xfff00000, 0x00020000, RAM_PAGE);
/* Map chip and ZorroII memory */
setbat(1, zTwoBase, 0x00000000, 0x01000000, IO_PAGE);
/* Note: a temporary hack in arch/ppc/amiga/setup.c
/*
* Find some memory for setup_arch to return.
- * We use the last chunk of available memory as the area
+ * We use the largest chunk of available memory as the area
* that setup_arch returns, making sure that there are at
* least 32 pages unused before this for MMU_get_page to use.
*/
__initfunc(unsigned long find_available_memory(void))
{
- int i;
+ int i, rn;
unsigned long a, free;
unsigned long start, end;
- free = 0;
if (_machine == _MACH_mbx) {
/* Return the first, not the last region, because we
* may not yet have properly initialized the additonal
return avail_start;
}
- for (i = 0; i < phys_avail.n_regions - 1; ++i) {
+ rn = 0;
+ for (i = 1; i < phys_avail.n_regions; ++i)
+ if (phys_avail.regions[i].size > phys_avail.regions[rn].size)
+ rn = i;
+ free = 0;
+ for (i = 0; i < rn; ++i) {
start = phys_avail.regions[i].address;
end = start + phys_avail.regions[i].size;
free += (end & PAGE_MASK) - PAGE_ALIGN(start);
}
- a = PAGE_ALIGN(phys_avail.regions[i].address);
+ a = PAGE_ALIGN(phys_avail.regions[rn].address);
if (free < 32 * PAGE_SIZE)
a += 32 * PAGE_SIZE - free;
avail_start = (unsigned long) __va(a);
}
phys_avail.n_regions = 0;
+#ifdef CONFIG_BLK_DEV_INITRD
+ /* if we are booted from BootX with an initial ramdisk,
+ make sure the ramdisk pages aren't reserved. */
+ if (initrd_start) {
+ for (a = initrd_start; a < initrd_end; a += PAGE_SIZE)
+ clear_bit(PG_reserved, &mem_map[MAP_NR(a)].flags);
+ }
+#endif /* CONFIG_BLK_DEV_INITRD */
+
/* free the prom's memory - no-op on prep */
for (i = 0; i < prom_mem.n_regions; ++i) {
a = (unsigned long) __va(prom_mem.regions[i].address);
phys_mem.n_regions = 1;
}
- /* record which bits the prom is using */
- get_mem_prop("available", &phys_avail);
+ if (boot_infos == 0) {
+ /* record which bits the prom is using */
+ get_mem_prop("available", &phys_avail);
+ } else {
+ /* booted from BootX - it's all available (after klimit) */
+ phys_avail = phys_mem;
+ }
prom_mem = phys_mem;
for (i = 0; i < phys_avail.n_regions; ++i)
remove_mem_piece(&prom_mem, phys_avail.regions[i].address,
#define HARDWARE_MAPPED_SIZE (512*1024)
__initfunc(unsigned long *apus_find_end_of_memory(void))
{
- unsigned long kstart, ksize;
+ int shadow = 0;
- /* Add the chunk that ADOS does not see. This may also
- * include a ROM mapping which we reclaim. The top 512KB is
- * removed again below.
- * Do it by aligning the size to the nearest 2MB limit upwards.
- */
- memory[0].size = ((memory[0].size+0x001fffff) & 0xffe00000);
+ /* 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);
+ }
- append_mem_piece(&phys_mem, memory[0].addr, memory[0].size);
+ /* Add the chunk that ADOS does not see. by aligning
+ the size to the nearest 2MB limit upwards. */
+ memory[0].size = ((size+0x001fffff) & 0xffe00000);
+ }
- phys_avail = phys_mem;
- kstart = __pa(_stext);
- ksize = PAGE_ALIGN(klimit - _stext);
- remove_mem_piece(&phys_avail, kstart, ksize, 1);
+ /* Now register the memory block. */
+ {
+ unsigned long kstart, ksize;
- /* Remove the upper HARDWARE_MAPPED_SIZE bytes where the address
- * range 0xfff00000-0xfffx0000 is mapped to.
- * We do it this way to ensure that the memory registered in the
- * system has a power-of-two size.
- */
- remove_mem_piece(&phys_avail,
- (memory[0].addr + memory[0].size
- - HARDWARE_MAPPED_SIZE),
- HARDWARE_MAPPED_SIZE, 1);
+ append_mem_piece(&phys_mem, memory[0].addr, memory[0].size);
+ phys_avail = phys_mem;
+ kstart = __pa(_stext);
+ ksize = PAGE_ALIGN(klimit - _stext);
+ remove_mem_piece(&phys_avail, kstart, ksize, 0);
+ }
+
+ /* Remove the memory chunks that are controlled by special
+ Phase5 hardware. */
+ {
+ unsigned long top = memory[0].addr + memory[0].size;
+
+ /* 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)
+ {
+ top -= HARDWARE_MAPPED_SIZE;
+ remove_mem_piece(&phys_avail, top,
+ HARDWARE_MAPPED_SIZE, 0);
+ }
+
+ /* Remove the upper 512KB where the PPC exception
+ vectors are mapped. */
+ top -= HARDWARE_MAPPED_SIZE;
+ remove_mem_piece(&phys_avail, top,
+ HARDWARE_MAPPED_SIZE, 0);
+ }
/* FIXME:APUS: Only handles one block of memory! Problem is
- * that the VTOP/PTOV code in head.S would be a mess if it had
- * to handle more than one block.
- */
+ that the VTOP/PTOV code in head.S would be a mess if it had
+ to handle more than one block. */
return __va(memory[0].addr + memory[0].size);
}
}
else
Hash_end = 0;
-
}
#endif /* ndef CONFIG_8xx */
#
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
#
#
CONFIG_BINFMT_MISC=m
# CONFIG_BINFMT_JAVA is not set
# CONFIG_PARPORT is not set
-# CONFIG_FB is not set
-# CONFIG_VGA_CONSOLE is not set
-# CONFIG_PMAC_PBOOK is not set
+CONFIG_FB=y
+CONFIG_FB_COMPAT_XPMAC=y
+CONFIG_PMAC_PBOOK=y
CONFIG_MAC_KEYBOARD=y
CONFIG_MAC_FLOPPY=y
CONFIG_MAC_SERIAL=y
CONFIG_MACMOUSE=y
CONFIG_PROC_DEVICETREE=y
# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+CONFIG_XMON=y
#
# Plug and Play support
#
# CONFIG_BLK_DEV_FD is not set
CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
+CONFIG_BLK_DEV_IDEFLOPPY=y
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_BLK_DEV_SL82C105 is not set
# CONFIG_IDE_CHIPSETS is not set
+
+#
+# Additional Block Devices
+#
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not set
# CONFIG_IP_MROUTE is not set
CONFIG_IP_ALIAS=y
# CONFIG_SYN_COOKIES is not set
+
+#
+# (it is safe to leave these untouched)
+#
CONFIG_INET_RARP=y
CONFIG_IP_NOSR=y
CONFIG_SKB_LARGE=y
# CONFIG_IPV6 is not set
+
+#
+#
+#
# CONFIG_IPX is not set
CONFIG_ATALK=m
# CONFIG_X25 is not set
# SCSI support
#
CONFIG_SCSI=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
# CONFIG_CHR_DEV_SG is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
# CONFIG_COPS is not set
# CONFIG_IPDDP is not set
CONFIG_PPP=m
+
+#
+# CCP compressors for PPP are only built as modules.
+#
# CONFIG_SLIP is not set
# CONFIG_NET_RADIO is not set
# CONFIG_TR is not set
#
# CONFIG_CD_NO_IDESCSI is not set
+#
+# Console drivers
+#
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FB_OF=y
+CONFIG_FB_CONTROL=y
+CONFIG_FB_PLATINUM=y
+CONFIG_FB_ATY=y
+CONFIG_FB_IMSTT=y
+CONFIG_FB_CT65550=y
+# CONFIG_FB_S3TRIO is not set
+# CONFIG_FB_VGA is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FBCON_ADVANCED is not set
+CONFIG_FBCON_CFB8=y
+CONFIG_FBCON_CFB16=y
+CONFIG_FBCON_CFB24=y
+CONFIG_FBCON_CFB32=y
+# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
+CONFIG_FBCON_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+CONFIG_FONT_SUN8x16=y
+CONFIG_FONT_SUN12x22=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_SERIAL=m
+# CONFIG_SERIAL_EXTENDED is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_MOUSE is not set
+# CONFIG_UMISC is not set
+# CONFIG_QIC02_TAPE is not set
+# CONFIG_APM is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_RTC is not set
+# CONFIG_VIDEO_DEV is not set
+CONFIG_NVRAM=y
+# CONFIG_JOYSTICK is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+
#
# Filesystems
#
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_KOI8_R is not set
-#
-# Console drivers
-#
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
-# CONFIG_SERIAL_NONSTANDARD is not set
-# CONFIG_MOUSE is not set
-# CONFIG_UMISC is not set
-# CONFIG_QIC02_TAPE is not set
-# CONFIG_APM is not set
-# CONFIG_WATCHDOG is not set
-# CONFIG_RTC is not set
-# CONFIG_VIDEO_DEV is not set
-CONFIG_NVRAM=y
-# CONFIG_JOYSTICK is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-
#
# Sound
#
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+CONFIG_DMASOUND=y
# CONFIG_EEXPRESS_PRO100 is not set
# CONFIG_LNE390 is not set
# CONFIG_NE2K_PCI is not set
+# CONFIG_TLAN is not set
# CONFIG_ES3210 is not set
# CONFIG_EPIC100 is not set
-# CONFIG_TLAN is not set
# CONFIG_ZNET is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
#
# CONFIG_CD_NO_IDESCSI is not set
+#
+# Console drivers
+#
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_SERIAL=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_SERIAL_EXTENDED is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+CONFIG_MOUSE=y
+# CONFIG_ATIXL_BUSMOUSE is not set
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MS_BUSMOUSE is not set
+CONFIG_PSMOUSE=y
+# CONFIG_82C710_MOUSE is not set
+# CONFIG_PC110_PAD is not set
+# CONFIG_UMISC is not set
+# CONFIG_QIC02_TAPE is not set
+# CONFIG_APM is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_RTC is not set
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_NVRAM is not set
+# CONFIG_JOYSTICK is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+
#
# Filesystems
#
# CONFIG_NLS_KOI8_R is not set
#
-# Console drivers
-#
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
-# CONFIG_SERIAL_NONSTANDARD is not set
-CONFIG_MOUSE=y
-# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
-# CONFIG_UMISC is not set
-# CONFIG_QIC02_TAPE is not set
-# CONFIG_APM is not set
-# CONFIG_WATCHDOG is not set
-# CONFIG_RTC is not set
-# CONFIG_VIDEO_DEV is not set
-# CONFIG_NVRAM is not set
-# CONFIG_JOYSTICK is not set
-# CONFIG_MISC_RADIO is not set
-
-#
-# Ftape, the floppy tape device driver
+# Sound
#
-# CONFIG_FTAPE is not set
+CONFIG_SOUND=y
+# CONFIG_SOUND_ES1370 is not set
+# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_OSS=y
+# CONFIG_SOUND_PAS is not set
+# CONFIG_SOUND_SB is not set
+# CONFIG_SOUND_ADLIB is not set
+# CONFIG_SOUND_GUS is not set
+# CONFIG_SOUND_MPU401 is not set
+# CONFIG_SOUND_PSS is not set
+# CONFIG_SOUND_MSS is not set
+# CONFIG_SOUND_SSCAPE is not set
+# CONFIG_SOUND_TRIX is not set
+# CONFIG_SOUND_MAD16 is not set
+# CONFIG_SOUND_WAVEFRONT is not set
+CONFIG_SOUND_CS4232=y
+CONFIG_CS4232_BASE=530
+CONFIG_CS4232_IRQ=11
+CONFIG_CS4232_DMA=0
+CONFIG_CS4232_DMA2=3
+CONFIG_CS4232_MPU_BASE=330
+CONFIG_CS4232_MPU_IRQ=9
+# CONFIG_SOUND_MAUI is not set
+# CONFIG_SOUND_SGALAXY is not set
+# CONFIG_SOUND_OPL3SA1 is not set
+# CONFIG_SOUND_SOFTOSS is not set
+# CONFIG_SOUND_YM3812 is not set
+# CONFIG_SOUND_VMIDI is not set
+# CONFIG_SOUND_UART6850 is not set
#
-# Sound
+# Additional low level sound drivers
#
-# CONFIG_SOUND is not set
+# CONFIG_LOWLEVEL_SOUND is not set
* failures.
*/
+/*
+ * 1998/09/20 -- David Weinehall -- Added slow-down code for buggy PS/2-drives.
+ */
+
#define FLOPPY_SANITY_CHECK
#undef FLOPPY_SILENT_DCL_CLEAR
#include <linux/interrupt.h>
#include <linux/init.h>
+static int slow_floppy = 0;
+
#include <asm/dma.h>
#include <asm/irq.h>
#include <asm/system.h>
/* Convert step rate from microseconds to milliseconds and 4 bits */
srt = 16 - (DP->srt*scale_dtr/1000 + NOMINAL_DTR - 1)/NOMINAL_DTR;
+ if( slow_floppy ) {
+ srt = srt / 4;
+ }
SUPBOUND(srt, 0xf);
INFBOUND(srt, 0);
{
int i;
int param;
- if (str)
+ if (str) {
+ /*
+ * PS/2 floppies have much slower step rates than regular floppies.
+ * It's been recommended that take about 1/4 of the default speed
+ * in some more extreme cases.
+ */
+ if( strcmp(str,"slow") == 0) {
+ slow_floppy = 1;
+ return;
+ }
for (i=0; i< ARRAY_SIZE(config_params); i++){
if (strcmp(str,config_params[i].name) == 0){
if (ints[0])
return;
}
}
+ }
if (str) {
DPRINT("unknown floppy option [%s]\n", str);
goto repeat;
}
- sd_devname(devm, nbuff);
+ sd_devname(devm >> 4, nbuff);
SCSI_LOG_HLQUEUE(2,printk("%s : real dev = /dev/%d, block = %d\n",
nbuff, dev, block));
if [ "$CONFIG_FB_OF" = "y" ]; then
bool 'Apple "control" display support' CONFIG_FB_CONTROL
bool 'Apple "platinum" display support' CONFIG_FB_PLATINUM
-# bool 'Apple "valkyrie" display support' CONFIG_FB_VALKYRIE
+ bool 'Apple "valkyrie" display support' CONFIG_FB_VALKYRIE
bool 'ATI Mach64 display support' CONFIG_FB_ATY
-# bool 'IMS Twin Turbo display support' CONFIG_FB_IMSTT
+ bool 'IMS Twin Turbo display support' CONFIG_FB_IMSTT
bool 'Chips 65550 display support' CONFIG_FB_CT65550
bool 'S3 Trio display support' CONFIG_FB_S3TRIO
fi
if [ "$CONFIG_HP300" = "y" ]; then
define_bool CONFIG_FB_HP300 y
fi
- # I used CONFIG_ARM here because the ARCH construct doesn't seem to work
- # with xconfig. --pb
- if [ "$ARCH" = "i386" -o "$ARCH" = "alpha" -o "$ARCH" = "ppc" -o \
- "$CONFIG_ARM" = "y" ]; then
- if [ "$CONFIG_ARM" != "y" -o "$CONFIG_ARCH_ACORN" != "y" ] ; then
- tristate 'Deprecated almost-VGA support (text only - use normal VGA console instead)' CONFIG_FB_VGA
- fi
- fi
if [ "$ARCH" = "alpha" ]; then
tristate 'TGA framebuffer support' CONFIG_FB_TGA
fi
if [ "$ARCH" = "i386" ]; then
bool 'VESA VGA graphics console' CONFIG_FB_VESA
define_bool CONFIG_VIDEO_SELECT y
- tristate 'MDA dual-headed support' CONFIG_FB_MDA
fi
if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then
bool 'SBUS and UPA framebuffers' CONFIG_FB_SBUS
bool ' CGthree support' CONFIG_FB_CGTHREE
if [ "$ARCH" = "sparc" ]; then
bool ' TCX (SS4/SS5 only) support' CONFIG_FB_TCX
+ bool ' CGfourteen (SX) support' CONFIG_FB_CGFOURTEEN
fi
+ bool ' Leo (ZX) support' CONFIG_FB_LEO
fi
fi
if [ "$ARCH" = "sparc64" ]; then
"$CONFIG_FB_OF" = "y" -o "$CONFIG_FB_TGA" = "y" -o \
"$CONFIG_FB_VESA" = "y" -o "$CONFIG_FB_VIRTUAL" = "y" -o \
"$CONFIG_FB_TCX" = "y" -o "$CONFIG_FB_CGTHREE" = "y" -o \
- "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" ]; then
+ "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
+ "$CONFIG_FB_CGFOURTEEN" = "y" -o "$CONFIG_FB_G364" = "y" -o \
+ "$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" ]; then
define_bool CONFIG_FBCON_CFB8 y
else
if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_ATARI" = "m" -o \
- "$CONFIG_FB_ATY" = "y" -o "$CONFIG_FB_MAC" = "y" -o \
+ "$CONFIG_FB_ATY" = "m" -o "$CONFIG_FB_MAC" = "m" -o \
"$CONFIG_FB_OF" = "m" -o "$CONFIG_FB_TGA" = "m" -o \
"$CONFIG_FB_VESA" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" -o \
"$CONFIG_FB_TCX" = "m" -o "$CONFIG_FB_CGTHREE" = "m" -o \
- "$CONFIG_FB_CONTROL" = "m" ]; then
+ "$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
+ "$CONFIG_FB_CGFOURTEEN" = "m" -o "$CONFIG_FB_G364" = "m" -o \
+ "$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" ]; then
define_bool CONFIG_FBCON_CFB8 m
fi
fi
if [ "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_ATY" = "y" -o \
"$CONFIG_FB_MAC" = "y" -o "$CONFIG_FB_VESA" = "y" -o \
"$CONFIG_FB_VIRTUAL" = "y" -o "$CONFIG_FB_TBOX" = "y" -o \
- "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" ]; then
+ "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
+ "$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" ]; then
define_bool CONFIG_FBCON_CFB16 y
else
if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \
"$CONFIG_FB_MAC" = "m" -o "$CONFIG_FB_VESA" = "m" -o \
"$CONFIG_FB_VIRTUAL" = "m" -o "$CONFIG_FB_TBOX" = "m" -o \
- "$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" ]; then
+ "$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
+ "$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" ]; then
define_bool CONFIG_FBCON_CFB16 m
fi
fi
if [ "$CONFIG_FB_ATY" = "y" -o "$CONFIG_FB_VIRTUAL" = "y" -o \
- "$CONFIG_FB_CLGEN" = "y" ]; then
+ "$CONFIG_FB_CLGEN" = "y" -o "$CONFIG_FB_VESA" = "y" ]; then
define_bool CONFIG_FBCON_CFB24 y
else
if [ "$CONFIG_FB_ATY" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" -o \
- "$CONFIG_FB_CLGEN" = "m" ]; then
+ "$CONFIG_FB_CLGEN" = "m" -o "$CONFIG_FB_VESA" = "m" ]; then
define_bool CONFIG_FBCON_CFB24 m
fi
fi
if [ "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_ATY" = "y" -o \
"$CONFIG_FB_VESA" = "y" -o "$CONFIG_FB_VIRTUAL" = "y" -o \
- "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" ]; then
+ "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
+ "$CONFIG_FB_TGA" = "y" -o "$CONFIG_FB_PLATINUM" = "y" ]; then
define_bool CONFIG_FBCON_CFB32 y
else
if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \
"$CONFIG_FB_VESA" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" -o \
- "$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" ]; then
+ "$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
+ "$CONFIG_FB_TGA" = "m" -o "$CONFIG_FB_PLATINUM" = "m" ]; then
define_bool CONFIG_FBCON_CFB32 m
fi
fi
# parent makes..
#
-GSPA = gspa
-GSPH2C = gspahextoc
-
L_TARGET := video.a
L_OBJS :=
M_OBJS :=
MX_OBJS :=
MOD_LIST_NAME := VIDEO_MODULES
+CONFIG_FBGEN_BUILTIN :=
+CONFIG_FBGEN_MODULE :=
+
# Frame Buffer Console
-# Nasty trick to make sure all wanted stuff is linked in
-O_TARGET = fbdev.o
-L_OBJS += fbdev.o
+ifeq ($(CONFIG_FB),y)
+ # Nasty trick to make sure all wanted stuff is linked in
+ O_TARGET = fbdev.o
+ L_OBJS += fbdev.o
+endif
ifeq ($(CONFIG_DUMMY_CONSOLE),y)
L_OBJS += dummycon.o
ifeq ($(CONFIG_FB),y)
L_OBJS += fonts.o
- OX_OBJS += fbcon.o fbcmap.o
-# fbgen is not compiled by default since nobody uses it yet, except clgenfb
+ OX_OBJS += fbcon.o fbcmap.o fbmem.o
ifeq ($(CONFIG_FONT_8x8),y)
L_OBJS += font_8x8.o
endif
L_OBJS += platinumfb.o
endif
+ifeq ($(CONFIG_FB_VALKYRIE),y)
+L_OBJS += valkyriefb.o
+endif
+
ifeq ($(CONFIG_FB_CT65550),y)
L_OBJS += chipsfb.o
endif
L_OBJS += offb.o macmodes.o
endif
+ifeq ($(CONFIG_FB_IMSTT),y)
+L_OBJS += imsttfb.o
+endif
+
ifeq ($(CONFIG_FB_RETINAZ3),y)
L_OBJS += retz3fb.o
else
ifeq ($(CONFIG_FB_CLGEN),y)
L_OBJS += clgenfb.o
-OX_OBJS += fbgen.o
+CONFIG_FBGEN_BUILTIN = y
else
ifeq ($(CONFIG_FB_CLGEN),m)
M_OBJS += clgenfb.o
- OX_OBJS += fbgen.o
+ CONFIG_FBGEN_MODULE = y
endif
endif
endif
endif
-ifeq ($(CONFIG_FB_VGA),y)
-L_OBJS += vgafb.o
-else
- ifeq ($(CONFIG_FB_VGA),m)
- M_OBJS += vgafb.o
- endif
-endif
-
ifeq ($(CONFIG_FB_VESA),y)
L_OBJS += vesafb.o
endif
-ifeq ($(CONFIG_FB_MDA),y)
-L_OBJS += mdafb.o
-else
- ifeq ($(CONFIG_FB_MDA),m)
- M_OBJS += mdafb.o
- endif
-endif
-
ifeq ($(CONFIG_FB_VIRGE),y)
L_OBJS += virgefb.o
else
endif
endif
+ifdef CONFIG_FB_G364
+L_OBJS := $(L_OBJS) g364fb.o
+endif
+
ifeq ($(CONFIG_FB_SBUS),y)
L_OBJS += sbusfb.o
ifeq ($(CONFIG_FB_CREATOR),y)
M_OBJS += tcxfb.o
endif
endif
+ ifeq ($(CONFIG_FB_CGFOURTEEN),y)
+ L_OBJS += cgfourteenfb.o
+ else
+ ifeq ($(CONFIG_FB_CGFOURTEEN),m)
+ M_OBJS += cgfourteenfb.o
+ endif
+ endif
+ ifeq ($(CONFIG_FB_LEO),y)
+ L_OBJS += leofb.o
+ else
+ ifeq ($(CONFIG_FB_LEO),m)
+ M_OBJS += leofb.o
+ endif
+ endif
else
ifeq ($(CONFIG_FB_SBUS),m)
M_OBJS += sbusfb.o
M_OBJS += tcxfb.o
endif
endif
+ ifeq ($(CONFIG_FB_CGFOURTEEN),y)
+ M_OBJS += cgfourteenfb.o
+ else
+ ifeq ($(CONFIG_FB_CGFOURTEEN),m)
+ M_OBJS += cgfourteenfb.o
+ endif
+ endif
+ ifeq ($(CONFIG_FB_LEO),y)
+ M_OBJS += leofb.o
+ else
+ ifeq ($(CONFIG_FB_LEO),m)
+ M_OBJS += leofb.o
+ endif
+ endif
endif
endif
endif
endif
+ifdef CONFIG_FBGEN_BUILTIN
+OX_OBJS += fbgen.o
+else
+ ifdef CONFIG_FBGEN_MODULE
+ MX_OBJS += fbgen.o
+ endif
+endif
+
# Generic Low Level Drivers
ifeq ($(CONFIG_FBCON_AFB),y)
endif
endif
-# GSP Console
-
-ifdef CONFIG_AMIGA_GSP
-L_OBJS += gspcon.o gspcore.o
-endif
-
# VGA Text Console
ifdef CONFIG_VGA_CONSOLE
L_OBJS += vgacon.o
endif
-include $(TOPDIR)/Rules.make
+# MDA Text Console
-gspcore.c: gspcore.gsp
- $(GSPA) $< > $*.hex
- $(GSPH2C) $*.hex > gspcore.c
+ifeq ($(CONFIG_MDA_CONSOLE),y)
+L_OBJS += mdacon.o
+else
+ ifeq ($(CONFIG_MDA_CONSOLE),m)
+ M_OBJS += mdacon.o
+ endif
+endif
+
+include $(TOPDIR)/Rules.make
promcon_tbl.c: prom.uni
../char/conmakehash prom.uni | \
#include <asm/vc_ioctl.h>
#endif
-#include "fbcon.h"
-#include "fbcon-cfb8.h"
-#include "s3blit.h"
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/s3blit.h>
#define mem_in8(addr) in_8((void *)(addr))
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc, s3trio_getcolreg,
- info);
+ return fb_get_cmap(cmap, kspc, s3trio_getcolreg, info);
else if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else
return err;
}
if (con == currcon) /* current console? */
- return fb_set_cmap(cmap, &fb_display[con].var, kspc, s3trio_setcolreg,
- info);
+ return fb_set_cmap(cmap, kspc, s3trio_setcolreg, info);
else
fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
return 0;
{
/* Do we have to save the colormap? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1,
- s3trio_getcolreg, info);
+ fb_get_cmap(&fb_display[currcon].cmap, 1, s3trio_getcolreg, info);
currcon = con;
/* Install new colormap */
{
if (regno > 255)
return 1;
- *red = palette[regno].red;
- *green = palette[regno].green;
- *blue = palette[regno].blue;
+ *red = (palette[regno].red << 8) | palette[regno].red;
+ *green = (palette[regno].green << 8) | palette[regno].green;
+ *blue = (palette[regno].blue << 8) | palette[regno].blue;
+ *transp = 0;
return 0;
}
/*
- * Set a single color register. The values supplied are already
- * rounded down to the hardware's capabilities (according to the
- * entries in the var structure). Return != 0 for invalid regno.
+ * Set a single color register. Return != 0 for invalid regno.
*/
static int s3trio_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
{
if (regno > 255)
return 1;
+
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
palette[regno].red = red;
palette[regno].green = green;
palette[regno].blue = blue;
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- s3trio_setcolreg, &fb_info);
+ fb_set_cmap(&fb_display[con].cmap, 1, s3trio_setcolreg, &fb_info);
else
- fb_set_cmap(fb_default_cmap(fb_display[con].var.bits_per_pixel),
- &fb_display[con].var, 1, s3trio_setcolreg, &fb_info);
+ fb_set_cmap(fb_default_cmap(fb_display[con].var.bits_per_pixel), 1,
+ s3trio_setcolreg, &fb_info);
}
void s3triofb_setup(char *options, int *ints) {
int dx, int height, int width)
{
sx *= 8; dx *= 8; width *= 8;
- Trio_BitBLT((u_short)sx, (u_short)(sy*p->fontheight), (u_short)dx,
- (u_short)(dy*p->fontheight), (u_short)width,
- (u_short)(height*p->fontheight), (u_short)S3_NEW);
+ Trio_BitBLT((u_short)sx, (u_short)(sy*fontheight(p)), (u_short)dx,
+ (u_short)(dy*fontheight(p)), (u_short)width,
+ (u_short)(height*fontheight(p)), (u_short)S3_NEW);
}
static void fbcon_trio8_clear(struct vc_data *conp, struct display *p, int sy,
sx *= 8; width *= 8;
bg = attr_bgcol_ec(p,conp);
Trio_RectFill((u_short)sx,
- (u_short)(sy*p->fontheight),
+ (u_short)(sy*fontheight(p)),
(u_short)width,
- (u_short)(height*p->fontheight),
+ (u_short)(height*fontheight(p)),
(u_short)S3_NEW,
(u_short)bg);
}
#include <asm/irq.h>
#include <asm/uaccess.h>
-#include "fbcon-mfb.h"
-#include "fbcon-cfb2.h"
-#include "fbcon-cfb4.h"
-#include "fbcon-cfb8.h"
+#include <video/fbcon-mfb.h>
+#include <video/fbcon-cfb2.h>
+#include <video/fbcon-cfb4.h>
+#include <video/fbcon-cfb8.h>
#define MAX_VIDC20_PALETTE 256
#define MAX_VIDC_PALETTE 16
static int
acornfb_vidc20_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue, u_int *trans, struct fb_info *info)
{
+ int t;
+
if (regno >= current_par.palette_size)
return 1;
- *red = current_par.palette.vidc20[regno].d.red;
- *green = current_par.palette.vidc20[regno].d.green;
- *blue = current_par.palette.vidc20[regno].d.blue;
- *trans = current_par.palette.vidc20[regno].d.ext;
+ t = current_par.palette.vidc20[regno].d.red;
+ *red = (t << 8) | t;
+ t = current_par.palette.vidc20[regno].d.green;
+ *green = (t << 8) | t;
+ t = current_par.palette.vidc20[regno].d.blue;
+ *blue = (t << 8) | t;
+ t = current_par.palette.vidc20[regno].d.ext;
+ t |= t << 4;
+ *transp = (t << 8) | t;
return 0;
}
if (regno >= current_par.palette_size)
return 1;
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
current_par.palette.vidc20[regno].p = 0;
current_par.palette.vidc20[regno].d.red = red;
current_par.palette.vidc20[regno].d.green = green;
int err = 0;
if (con == currcon)
- err = fb_get_cmap(cmap, &fb_display[con].var,
- kspc, acornfb_vidc20_getcolreg, info);
+ err = fb_get_cmap(cmap, kspc, acornfb_vidc20_getcolreg, info);
else if (fb_display[con].cmap.len)
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else
current_par.palette_size, 0);
if (!err) {
if (con == currcon)
- err = fb_set_cmap(cmap, &fb_display[con].var,
- kspc, acornfb_vidc20_setcolreg, info);
+ err = fb_set_cmap(cmap, kspc, acornfb_vidc20_setcolreg,
+ info);
else
fb_copy_cmap(cmap, &fb_display[con].cmap,
kspc ? 0 : 1);
fb_info.blank = acornfb_blank;
acornfb_set_disp(-1);
- fb_set_cmap(fb_default_cmap(current_par.palette_size), &fb_display[0].var,
+ fb_set_cmap(fb_default_cmap(current_par.palette_size),
1, acornfb_vidc20_setcolreg, &fb_info);
register_framebuffer(&fb_info);
#include <asm/amigaints.h>
#include <asm/setup.h>
-#include "fbcon-afb.h"
-#include "fbcon-ilbm.h"
-#include "fbcon-mfb.h"
+#include <video/fbcon-afb.h>
+#include <video/fbcon-ilbm.h>
+#include <video/fbcon-mfb.h>
#define DEBUG
/*
* Since we can't read the palette on OCS/ECS, and since reading one
- * single color palette entry require 5 expensive custom chip bus accesses
+ * single color palette entry requires 5 expensive custom chip bus accesses
* on AGA, we keep a copy of the current palette.
+ * Note that the entries are always 24 bit!
*/
#if defined(CONFIG_FB_AMIGA_AGA)
/* colour */
#define rgb2hw8_high(red, green, blue) \
- (((red)<<4 & 0xf00) | ((green) & 0x0f0) | ((blue)>>4 & 0x00f))
+ (((red & 0xf0)<<4) | (green & 0xf0) | ((blue & 0xf0)>>4))
#define rgb2hw8_low(red, green, blue) \
- (((red)<<8 & 0xf00) | ((green)<<4 & 0x0f0) | ((blue) & 0x00f))
+ (((red & 0x0f)<<8) | ((green & 0x0f)<<4) | (blue & 0x0f))
#define rgb2hw4(red, green, blue) \
- (((red)<<8 & 0xf00) | ((green)<<4 & 0x0f0) | ((blue) & 0x00f))
+ (((red & 0xf0)<<4) | (green & 0xf0) | ((blue & 0xf0)>>4))
#define rgb2hw2(red, green, blue) \
- (((red)<<10 & 0xc00) | ((green)<<6 & 0x0c0) | ((blue)<<2 & 0x00c))
+ (((red & 0xc0)<<4) | (green & 0xc0) | ((blue & 0xc0)>>4))
/* sprpos/sprctl (sprite positioning) */
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc,
- ami_getcolreg, info);
+ return fb_get_cmap(cmap, kspc, ami_getcolreg, info);
else if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else
return err;
}
if (con == currcon) /* current console? */
- return fb_set_cmap(cmap, &fb_display[con].var, kspc,
- ami_setcolreg, info);
+ return fb_set_cmap(cmap, kspc, ami_setcolreg, info);
else
fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
return 0;
{
/* Do we have to save the colormap? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap,
- &fb_display[currcon].var, 1, ami_getcolreg, info);
+ fb_get_cmap(&fb_display[currcon].cmap, 1, ami_getcolreg, info);
currcon = con;
ami_set_var(&fb_display[con].var);
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- ami_setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, ami_setcolreg, info);
else
fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
- &fb_display[con].var, 1,
- ami_setcolreg, info);
+ 1, ami_setcolreg, info);
}
static int flash_cursor(void)
static int ami_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
u_int *transp, struct fb_info *info)
{
+ int len, tr, tg, tb;
+
if (IS_AGA) {
if (regno > 255)
return 1;
+ len = 8;
+ } else if (currentpar.bplcon0 & BPC0_SHRES) {
+ if (regno > 3)
+ return 1;
+ len = 2;
} else {
if (regno > 31)
return 1;
- }
-
- *red = palette[regno].red;
- *green = palette[regno].green;
- *blue = palette[regno].blue;
+ len = 4;
+ }
+ tr = palette[regno].red>>(8-len);
+ tg = palette[regno].green>>(8-len);
+ tb = palette[regno].blue>>(8-len);
+ while (len < 16) {
+ tr |= tr<<len;
+ tg |= tg<<len;
+ tb |= tb<<len;
+ len <<= 1;
+ }
+ *red = tr;
+ *green = tg;
+ *blue = tb;
+ *transp = 0;
return 0;
}
static int ami_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
u_int transp, struct fb_info *info)
{
-#if defined(CONFIG_FB_AMIGA_AGA)
- u_short bplcon3 = currentpar.bplcon3;
-
if (IS_AGA) {
if (regno > 255)
return 1;
- } else
-#endif
+ } else if (currentpar.bplcon0 & BPC0_SHRES) {
+ if (regno > 3)
+ return 1;
+ } else {
if (regno > 31)
return 1;
+ }
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
+ palette[regno].red = red;
+ palette[regno].green = green;
+ palette[regno].blue = blue;
/*
* Update the corresponding Hardware Color Register, unless it's Color
* being changed by ami_do_blank() during the VBlank.
*/
- palette[regno].red = red;
- palette[regno].green = green;
- palette[regno].blue = blue;
-
if (regno || !is_blanked) {
#if defined(CONFIG_FB_AMIGA_AGA)
if (IS_AGA) {
+ u_short bplcon3 = currentpar.bplcon3;
VBlankOff();
custom.bplcon3 = bplcon3 | (regno<<8 & 0xe000);
custom.color[regno&31] = rgb2hw8_high(red, green, blue);
VBlankOn();
} else
#endif
- {
#if defined(CONFIG_FB_AMIGA_ECS)
- if (currentpar.bplcon0 & BPC0_SHRES) {
- u_short color, mask;
- int i;
-
- mask = 0x3333;
- color = rgb2hw2(red, green, blue);
- VBlankOff();
- for (i = regno+12; i >= (int)regno; i -= 4)
- custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
- mask <<=2; color >>= 2;
- regno = down16(regno)+mul4(mod4(regno));
- for (i = regno+3; i >= (int)regno; i--)
- custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
- VBlankOn();
- } else
+ if (currentpar.bplcon0 & BPC0_SHRES) {
+ u_short color, mask;
+ int i;
+
+ mask = 0x3333;
+ color = rgb2hw2(red, green, blue);
+ VBlankOff();
+ for (i = regno+12; i >= (int)regno; i -= 4)
+ custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
+ mask <<=2; color >>= 2;
+ regno = down16(regno)+mul4(mod4(regno));
+ for (i = regno+3; i >= (int)regno; i--)
+ custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
+ VBlankOn();
+ } else
#endif
- custom.color[regno] = rgb2hw4(red, green, blue);
- }
+ custom.color[regno] = rgb2hw4(red, green, blue);
}
return 0;
}
custom.bplcon3 = bplcon3;
} else
#endif
- {
#if defined(CONFIG_FB_AMIGA_ECS)
- if (par->bplcon0 & BPC0_SHRES) {
- u_short color, mask;
- int i;
-
- mask = 0x3333;
- color = rgb2hw2(red, green, blue);
- for (i = 12; i >= 0; i -= 4)
- custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
- mask <<=2; color >>= 2;
- for (i = 3; i >= 0; i--)
- custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
- } else
+ if (par->bplcon0 & BPC0_SHRES) {
+ u_short color, mask;
+ int i;
+
+ mask = 0x3333;
+ color = rgb2hw2(red, green, blue);
+ for (i = 12; i >= 0; i -= 4)
+ custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
+ mask <<=2; color >>= 2;
+ for (i = 3; i >= 0; i--)
+ custom.color[i] = ecs_palette[i] = (ecs_palette[i] & mask) | color;
+ } else
#endif
- custom.color[0] = rgb2hw4(red, green, blue);
- }
+ custom.color[0] = rgb2hw4(red, green, blue);
is_blanked = do_blank > 0 ? do_blank : 0;
}
#include <linux/fb.h>
#include <asm/atarikb.h>
-#include "fbcon-cfb8.h"
-#include "fbcon-cfb16.h"
-#include "fbcon-iplan2p2.h"
-#include "fbcon-iplan2p4.h"
-#include "fbcon-iplan2p8.h"
-#include "fbcon-mfb.h"
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
+#include <video/fbcon-iplan2p2.h>
+#include <video/fbcon-iplan2p4.h>
+#include <video/fbcon-iplan2p8.h>
+#include <video/fbcon-mfb.h>
#define SWITCH_ACIA 0x01 /* modes for switch on OverScan */
}
-static int tt_getcolreg( unsigned regno, unsigned *red,
- unsigned *green, unsigned *blue,
- unsigned *transp, struct fb_info *info )
+static int tt_getcolreg(unsigned regno, unsigned *red,
+ unsigned *green, unsigned *blue,
+ unsigned *transp, struct fb_info *info)
{
+ int t, col;
+
if ((shifter_tt.tt_shiftmode & TT_SHIFTER_MODEMASK) == TT_SHIFTER_STHIGH)
regno += 254;
if (regno > 255)
return 1;
- *blue = tt_palette[regno];
- *green = (*blue >> 4) & 0xf;
- *red = (*blue >> 8) & 0xf;
- *blue &= 0xf;
+ t = tt_palette[regno];
+ col = t & 15;
+ col |= col << 4;
+ col |= col << 8;
+ *blue = col;
+ col = (t >> 4) & 15;
+ col |= col << 4;
+ col |= col << 8;
+ *green = col;
+ col = (t >> 8) & 15;
+ col |= col << 4;
+ col |= col << 8;
+ *red = col;
*transp = 0;
return 0;
}
-static int tt_setcolreg( unsigned regno, unsigned red,
- unsigned green, unsigned blue,
- unsigned transp, struct fb_info *info )
+static int tt_setcolreg(unsigned regno, unsigned red,
+ unsigned green, unsigned blue,
+ unsigned transp, struct fb_info *info)
{
if ((shifter_tt.tt_shiftmode & TT_SHIFTER_MODEMASK) == TT_SHIFTER_STHIGH)
regno += 254;
if (regno > 255)
return 1;
- tt_palette[regno] = (red << 8) | (green << 4) | blue;
+ tt_palette[regno] = (((red >> 12) << 8) | ((green >> 12) << 4) |
+ (blue >> 12));
if ((shifter_tt.tt_shiftmode & TT_SHIFTER_MODEMASK) ==
TT_SHIFTER_STHIGH && regno == 254)
tt_palette[0] = 0;
/* Default hsync timing [mon_type] in picoseconds */
static long h_syncs[4] = {3000000, 4875000, 4000000, 4875000};
+#ifdef FBCON_HAS_CFB16
+static u16 fbcon_cfb16_cmap[16];
+#endif
static inline int hxx_prescale(struct falcon_hw *hw)
{
}
-static int stste_getcolreg( unsigned regno, unsigned *red,
- unsigned *green, unsigned *blue,
- unsigned *transp, struct fb_info *info )
-{ unsigned col;
+static int stste_getcolreg(unsigned regno, unsigned *red,
+ unsigned *green, unsigned *blue,
+ unsigned *transp, struct fb_info *info)
+{
+ unsigned col, t;
if (regno > 15)
return 1;
col = shifter_tt.color_reg[regno];
if (ATARIHW_PRESENT(EXTD_SHIFTER)) {
- *red = ((col >> 7) & 0xe) | ((col >> 11) & 1);
- *green = ((col >> 3) & 0xe) | ((col >> 7) & 1);
- *blue = ((col << 1) & 0xe) | ((col >> 3) & 1);
+ t = ((col >> 7) & 0xe) | ((col >> 11) & 1);
+ t |= t << 4;
+ *red = t | (t << 8);
+ t = ((col >> 3) & 0xe) | ((col >> 7) & 1);
+ t |= t << 4;
+ *green = t | (t << 8);
+ t = ((col << 1) & 0xe) | ((col >> 3) & 1);
+ t |= t << 4;
+ *blue = t | (t << 8);
}
else {
- *red = (col >> 8) & 0x7;
- *green = (col >> 4) & 0x7;
- *blue = col & 0x7;
+ t = (col >> 7) & 0xe;
+ t |= t << 4;
+ *red = t | (t << 8);
+ t = (col >> 3) & 0xe;
+ t |= t << 4;
+ *green = t | (t << 8);
+ t = (col << 1) & 0xe;
+ t |= t << 4;
+ *blue = t | (t << 8);
}
*transp = 0;
return 0;
}
-static int stste_setcolreg( unsigned regno, unsigned red,
- unsigned green, unsigned blue,
- unsigned transp, struct fb_info *info )
+static int stste_setcolreg(unsigned regno, unsigned red,
+ unsigned green, unsigned blue,
+ unsigned transp, struct fb_info *info)
{
if (regno > 15)
return 1;
+ red >>= 12;
+ blue >>= 12;
+ green >>= 12;
if (ATARIHW_PRESENT(EXTD_SHIFTER))
shifter_tt.color_reg[regno] =
(((red & 0xe) >> 1) | ((red & 1) << 3) << 8) |
((blue & 0xe) >> 1) | ((blue & 1) << 3);
else
shifter_tt.color_reg[regno] =
- ((red & 0x7) << 8) |
- ((green & 0x7) << 4) |
- (blue & 0x7);
+ ((red & 0xe) << 7) |
+ ((green & 0xe) << 3) |
+ ((blue & 0xe) >> 1);
return 0;
}
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &(fb_display[con].var), 1,
- fbhw->setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, fbhw->setcolreg, info);
else
fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
- &(fb_display[con].var), 1,
- fbhw->setcolreg, info);
+ 1, fbhw->setcolreg, info);
}
#ifdef FBCON_HAS_CFB16
case 16:
display->dispsw = &fbcon_cfb16;
+ display->dispsw_data = fbcon_cfb16_cmap;
break;
#endif
}
atafb_get_cmap(struct fb_cmap *cmap, int kspc, int con, struct fb_info *info)
{
if (con == currcon) /* current console ? */
- return fb_get_cmap(cmap, &(fb_display[con].var), kspc,
- fbhw->getcolreg, info);
+ return fb_get_cmap(cmap, kspc, fbhw->getcolreg, info);
else
if (fb_display[con].cmap.len) /* non default colormap ? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
return err;
}
if (con == currcon) /* current console ? */
- return fb_set_cmap(cmap, &(fb_display[con].var), kspc,
- fbhw->setcolreg, info);
+ return fb_set_cmap(cmap, kspc, fbhw->setcolreg, info);
else
fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
return 0;
{
/* Do we have to save the colormap ? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap,
- &(fb_display[currcon].var), 1, fbhw->getcolreg,
+ fb_get_cmap(&fb_display[currcon].cmap, 1, fbhw->getcolreg,
info);
do_fb_set_var(&fb_display[con].var,1);
currcon=con;
cmap.transp=NULL;
cmap.start=0;
cmap.len=16;
- fb_set_cmap(&cmap, &(fb_display[currcon].var), 1,
- fbhw->setcolreg, info);
+ fb_set_cmap(&cmap, 1, fbhw->setcolreg, info);
}
else
do_install_cmap(currcon, info);
-/*
+/* $Id: atyfb.c,v 1.75 1998/09/03 20:13:21 geert Exp $
* linux/drivers/video/atyfb.c -- Frame buffer device for ATI Mach64
*
- * Copyright (C) 1997-1998 Geert Uytterhoeven
- * Copyright (C) 1998 Bernd Harries
- * Copyright (C) 1998 Eddie C. Dost
+ * Copyright (C) 1997-1998 Geert Uytterhoeven
+ * Copyright (C) 1998 Bernd Harries
+ * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
*
* This driver is partly based on the PowerMac console driver:
*
TODO:
- (ecd):
-
- - fix initialization of cursor timer.
-
- - add code to support cursor on all cards and all ramdacs.
-
- - make cursor parameters controllable via ioctl()s.
+ - cursor support on all cards and all ramdacs.
+ - cursor parameters controlable via ioctl()s.
- (Anyone to help with all this?)
+ (Anyone to help with this?)
******************************************************************************/
#if defined(CONFIG_PMAC) || defined(CONFIG_CHRP)
#include <asm/prom.h>
#include <asm/pci-bridge.h>
-#include "macmodes.h"
+#include <video/macmodes.h>
#endif
#ifdef __sparc__
#include <asm/pbm.h>
+#include <asm/fbio.h>
+#include <asm/uaccess.h>
#endif
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
+#include <video/fbcon-cfb24.h>
+#include <video/fbcon-cfb32.h>
+
#include "aty.h"
-#include "fbcon.h"
-#include "fbcon-cfb8.h"
-#include "fbcon-cfb16.h"
-#include "fbcon-cfb24.h"
-#include "fbcon-cfb32.h"
-#define GUI_RESERVE 0x00001000
+/*
+ * Debug flags.
+ */
+#undef PLL_DEBUG
+
-#define CLASS_GX 1
-#define CLASS_CT 2
-#define CLASS_VT 3
-#define CLASS_GT 4
+#define GUI_RESERVE 0x00001000
#ifndef __powerpc__
};
#define DEFAULT_CURSOR_BLINK_RATE (20)
+#define CURSOR_DRAW_DELAY (2)
struct aty_cursor {
int enable;
u32 color[2];
u8 bits[8][64];
u8 mask[8][64];
+ u8 *ram;
struct timer_list *timer;
};
unsigned long ati_regbase;
unsigned long frame_buffer_phys;
unsigned long frame_buffer;
- struct display disp;
- struct display_switch dispsw;
struct pci_mmap_map *mmap_map;
struct aty_cursor *cursor;
struct aty_cmap_regs *aty_cmap_regs;
u8 dac_type;
u8 clk_type;
u8 mem_refresh_rate;
+ struct display disp;
+ struct display_switch dispsw;
+ union {
+#ifdef FBCON_HAS_CFB16
+ u16 cfb16[16];
+#endif
+#ifdef FBCON_HAS_CFB24
+ u32 cfb24[16];
+#endif
+#ifdef FBCON_HAS_CFB32
+ u32 cfb32[16];
+#endif
+ } fbcon_cmap;
#ifdef __sparc__
u8 open;
u8 mmaped;
*/
static int aty_init(struct fb_info_aty *info, const char *name);
+static struct aty_cursor *aty_init_cursor(struct fb_info_aty *fb);
#ifdef CONFIG_ATARI
static int store_video_par(char *videopar, unsigned char m64_num);
static char *strtoke(char *s, const char *ct);
const struct fb_info_aty *info);
static void aty_st_514(int offset, u8 val, const struct fb_info_aty *info);
static void aty_st_pll(int offset, u8 val, const struct fb_info_aty *info);
+#ifdef PLL_DEBUG
+static u8 aty_ld_pll(int offset, const struct fb_info_aty *info);
+#endif
static void aty_set_crtc(const struct fb_info_aty *info,
const struct crtc *crtc);
static int aty_var_to_crtc(const struct fb_info_aty *info,
struct fb_var_screeninfo *var);
static void aty_set_pll_gx(const struct fb_info_aty *info,
const struct pll_gx *pll);
-static int aty_var_to_pll_18818(const struct fb_var_screeninfo *var,
- struct pll_gx *pll);
-static int aty_var_to_pll_514(const struct fb_var_screeninfo *var,
- struct pll_gx *pll);
-static int aty_pll_gx_to_var(const struct pll_gx *pll,
- struct fb_var_screeninfo *var);
+static int aty_var_to_pll_18818(u32 vclk_per, struct pll_gx *pll);
+static int aty_var_to_pll_514(u32 vclk_per, struct pll_gx *pll);
+static int aty_pll_gx_to_var(const struct pll_gx *pll, u32 *vclk_per);
static void aty_set_pll_ct(const struct fb_info_aty *info,
const struct pll_ct *pll);
static int aty_dsp_gt(const struct fb_info_aty *info, u8 mclk_fb_div,
u8 mclk_post_div, u8 vclk_fb_div, u8 vclk_post_div,
u8 bpp, struct pll_ct *pll);
-static int aty_var_to_pll_ct(const struct fb_info_aty *info,
- const struct fb_var_screeninfo *var,
- struct pll_ct *pll);
-static int aty_pll_ct_to_var(const struct pll_ct *pll,
- struct fb_var_screeninfo *var);
+static int aty_var_to_pll_ct(const struct fb_info_aty *info, u32 vclk_per,
+ u8 bpp, struct pll_ct *pll);
+static int aty_pll_ct_to_var(const struct pll_ct *pll, u32 *vclk_per);
static void atyfb_set_par(const struct atyfb_par *par,
struct fb_info_aty *info);
static int atyfb_decode_var(const struct fb_var_screeninfo *var,
static int encode_fix(struct fb_fix_screeninfo *fix,
const struct atyfb_par *par,
const struct fb_info_aty *info);
+static void atyfb_set_disp(struct display *disp, struct fb_info_aty *info,
+ int bpp, int accel);
static int atyfb_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
u_int *transp, struct fb_info *fb);
static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
static char atyfb_name[16] = "ATY Mach64";
static char fontname[40] __initdata = { 0 };
+static char curblink __initdata = 1;
+static char noaccel __initdata = 0;
static const u32 ref_clk_per = 1000000000000ULL/14318180;
aty_ld_le32(GEN_TEST_CNTL, info) | GUI_ENGINE_ENABLE, info);
/* ensure engine is not locked up by clearing any FIFO or */
/* HOST errors */
+ aty_st_le32(0xf4,0xa955,info);
aty_st_le32(BUS_CNTL, aty_ld_le32(BUS_CNTL, info) | BUS_HOST_ERR_ACK |
BUS_FIFO_ERR_ACK, info);
}
aty_st_le32(DP_PIX_WIDTH, par->crtc.dp_pix_width, info);
aty_st_le32(DP_CHAIN_MASK, par->crtc.dp_chain_mask, info);
+ wait_for_fifo(5, info);
+ aty_st_le32(SCALE_3D_CNTL, 0, info);
+ aty_st_le32(Z_CNTL, 0, info);
+ aty_st_le32(CRTC_INT_CNTL, aty_ld_le32(CRTC_INT_CNTL, info) & ~0x20, info);
+ aty_st_le32(GUI_TRAJ_CNTL, 0x100023, info);
+
/* insure engine is idle before leaving */
wait_for_idle(info);
}
aty_st_8(CLOCK_CNTL + 1, (offset << 2) & ~PLL_WR_EN, info);
}
-#if 0 /* ecd debug */
+#ifdef PLL_DEBUG
static u8 aty_ld_pll(int offset, const struct fb_info_aty *info)
{
- u8 val;
+ u8 res;
/* write addr byte */
aty_st_8(CLOCK_CNTL + 1, (offset << 2), info);
eieio();
/* read the register value */
- val = aty_ld_8(CLOCK_CNTL + 2, info);
+ res = aty_ld_8(CLOCK_CNTL + 2, info);
eieio();
- return val;
+ return res;
}
-#endif /* ecd debug */
+#endif
#if defined(CONFIG_PMAC) || defined(CONFIG_CHRP)
return;
#endif
- ram = (u8 *)(fb->frame_buffer + c->offset);
-
+ ram = c->ram;
for (y = 0; y < c->size.y; y++) {
for (x = 0; x < c->size.x >> 2; x++) {
m = c->mask[x][y];
}
static void
-aty_set_cursor(struct fb_info_aty *fb)
+aty_set_cursor(struct fb_info_aty *fb, int on)
{
+ struct atyfb_par *par = &fb->current_par;
struct aty_cursor *c = fb->cursor;
u16 xoff, yoff;
int x, y;
return;
#endif
- if (c->on) {
- x = c->pos.x - c->hot.x;
+ if (on) {
+ x = c->pos.x - c->hot.x - par->crtc.xoffset;
if (x < 0) {
xoff = -x;
x = 0;
xoff = 0;
}
- y = c->pos.y - c->hot.y;
+ y = c->pos.y - c->hot.y - par->crtc.yoffset;
if (y < 0) {
yoff = -y;
y = 0;
aty_st_le32(GEN_TEST_CNTL, aty_ld_le32(GEN_TEST_CNTL, fb)
| HWCURSOR_ENABLE, fb);
} else {
- wait_for_fifo(4, fb);
+ wait_for_fifo(1, fb);
aty_st_le32(GEN_TEST_CNTL,
aty_ld_le32(GEN_TEST_CNTL, fb) & ~HWCURSOR_ENABLE,
fb);
}
+ wait_for_idle(fb);
}
static void
if (fb->cursor->vbl_cnt && --fb->cursor->vbl_cnt == 0) {
fb->cursor->on ^= 1;
- aty_set_cursor(fb);
+ aty_set_cursor(fb, fb->cursor->on);
fb->cursor->vbl_cnt = fb->cursor->blink_rate;
}
}
static void
-atyfb_cursor(struct display *d, int mode, int x, int y)
+atyfb_cursor(struct display *p, int mode, int x, int y)
{
- struct fb_info_aty *fb = (struct fb_info_aty *)d->fb_info;
+ struct fb_info_aty *fb = (struct fb_info_aty *)p->fb_info;
struct aty_cursor *c = fb->cursor;
if (!c)
return;
#endif
- x *= d->fontwidth;
- y *= d->fontheight;
- if (c->pos.x == x && c->pos.y == y && (mode == CM_ERASE) == !c->on)
+ x *= fontwidth(p);
+ y *= fontheight(p);
+ if (c->pos.x == x && c->pos.y == y && (mode == CM_ERASE) == !c->enable)
return;
c->enable = 0;
+ if (c->on)
+ aty_set_cursor(fb, 0);
c->pos.x = x;
c->pos.y = y;
switch (mode) {
case CM_ERASE:
c->on = 0;
- aty_set_cursor(fb);
break;
case CM_DRAW:
case CM_MOVE:
- c->on = 1;
- aty_set_cursor(fb);
+ if (c->on)
+ aty_set_cursor(fb, 1);
+ else
+ c->vbl_cnt = CURSOR_DRAW_DELAY;
+ c->enable = 1;
+ break;
+ }
+}
- if (!c->timer) {
- c->timer = kmalloc(sizeof(*c->timer), GFP_KERNEL);
- if (!c->timer)
- return;
+__initfunc(static struct aty_cursor *
+aty_init_cursor(struct fb_info_aty *fb))
+{
+ struct aty_cursor *cursor;
+ unsigned long addr;
- c->blink_rate = DEFAULT_CURSOR_BLINK_RATE;
+ cursor = kmalloc(sizeof(struct aty_cursor), GFP_ATOMIC);
+ if (!cursor)
+ return 0;
+ memset(cursor, 0, sizeof(*cursor));
- init_timer(c->timer);
- c->timer->expires = jiffies + (HZ / 50);
- c->timer->data = (unsigned long)fb;
- c->timer->function = aty_cursor_timer_handler;
- add_timer(c->timer);
- }
+ cursor->timer = kmalloc(sizeof(*cursor->timer), GFP_KERNEL);
+ if (!cursor->timer) {
+ kfree(cursor);
+ return 0;
+ }
+ memset(cursor->timer, 0, sizeof(*cursor->timer));
- c->vbl_cnt = c->blink_rate;
- c->enable = 1;
- break;
+ cursor->blink_rate = DEFAULT_CURSOR_BLINK_RATE;
+ fb->total_vram -= PAGE_SIZE;
+ cursor->offset = fb->total_vram;
+
+#ifdef __sparc__
+ addr = fb->frame_buffer - 0x800000 + cursor->offset;
+ cursor->ram = (u8 *)addr;
+#else
+#ifdef __BIG_ENDIAN
+ addr = fb->frame_buffer_phys - 0x800000 + cursor->offset;
+ cursor->ram = (u8 *)ioremap(addr, 1024);
+#else
+ addr = fb->frame_buffer + cursor->offset;
+ cursor->ram = (u8 *)addr;
+#endif
+#endif
+
+ if (curblink) {
+ init_timer(cursor->timer);
+ cursor->timer->expires = jiffies + (HZ / 50);
+ cursor->timer->data = (unsigned long)fb;
+ cursor->timer->function = aty_cursor_timer_handler;
+ add_timer(cursor->timer);
}
+
+ return cursor;
}
static int
height = 16;
}
- c->offset = fb->total_vram - 0x1000;
c->hot.x = 0;
c->hot.y = 0;
c->size.x = width;
u32 xres, yres, vxres, vyres, xoffset, yoffset, bpp;
u32 left, right, upper, lower, hslen, vslen, sync, vmode;
u32 h_total, h_disp, h_sync_strt, h_sync_dly, h_sync_wid, h_sync_pol;
- u32 v_total, v_disp, v_sync_strt, v_sync_wid, v_sync_pol;
+ u32 v_total, v_disp, v_sync_strt, v_sync_wid, v_sync_pol, c_sync;
u32 pix_width, dp_pix_width, dp_chain_mask;
/* input */
FAIL("v_total too large");
v_sync_pol = sync & FB_SYNC_VERT_HIGH_ACT ? 0 : 1;
+ c_sync = sync & FB_SYNC_COMP_HIGH_ACT ? CRTC_CSYNC_EN : 0;
+
if (bpp <= 8) {
bpp = 8;
pix_width = CRTC_PIX_WIDTH_8BPP;
crtc->v_tot_disp = v_total | (v_disp<<16);
crtc->v_sync_strt_wid = v_sync_strt | (v_sync_wid<<16) | (v_sync_pol<<21);
crtc->off_pitch = ((yoffset*vxres+xoffset)*bpp/64) | (vxres<<19);
- crtc->gen_cntl = pix_width | CRTC_EXT_DISP_EN | CRTC_ENABLE;
+ crtc->gen_cntl = pix_width | c_sync | CRTC_EXT_DISP_EN | CRTC_ENABLE;
if ((Gx == CT_CHIP_ID) || (Gx == ET_CHIP_ID) ||
((Gx == VT_CHIP_ID) && !(Rev & 0x03)) ||
((Gx == GT_CHIP_ID) && !(Rev & 0x03))) {
{
u32 xres, yres, bpp, left, right, upper, lower, hslen, vslen, sync;
u32 h_total, h_disp, h_sync_strt, h_sync_dly, h_sync_wid, h_sync_pol;
- u32 v_total, v_disp, v_sync_strt, v_sync_wid, v_sync_pol;
+ u32 v_total, v_disp, v_sync_strt, v_sync_wid, v_sync_pol, c_sync;
u32 pix_width;
/* input */
v_sync_strt = crtc->v_sync_strt_wid & 0x7ff;
v_sync_wid = (crtc->v_sync_strt_wid>>16) & 0x1f;
v_sync_pol = (crtc->v_sync_strt_wid>>21) & 0x1;
+ c_sync = crtc->gen_cntl & CRTC_CSYNC_EN ? 1 : 0;
pix_width = crtc->gen_cntl & CRTC_PIX_WIDTH_MASK;
/* convert */
xres = (h_disp+1)*8;
yres = v_disp+1;
left = (h_total-h_sync_strt-h_sync_wid)*8-h_sync_dly;
- right = (h_sync_strt-h_disp)*8;
+ right = (h_sync_strt-h_disp)*8+h_sync_dly;
hslen = h_sync_wid*8;
upper = v_total-v_sync_strt-v_sync_wid;
lower = v_sync_strt-v_disp;
vslen = v_sync_wid;
sync = (h_sync_pol ? 0 : FB_SYNC_HOR_HIGH_ACT) |
- (v_sync_pol ? 0 : FB_SYNC_VERT_HIGH_ACT);
+ (v_sync_pol ? 0 : FB_SYNC_VERT_HIGH_ACT) |
+ (c_sync ? FB_SYNC_COMP_HIGH_ACT : 0);
switch (pix_width) {
#if 0
}
}
-static int aty_var_to_pll_18818(const struct fb_var_screeninfo *var,
- struct pll_gx *pll)
+static int aty_var_to_pll_18818(u32 vclk_per, struct pll_gx *pll)
{
/*
* FIXME: use real calculations instead of using fixed values from the old
for (set = 0; set < sizeof(ATI18818_clocks)/sizeof(*ATI18818_clocks);
set++)
- if (var->pixclock <= ATI18818_clocks[set].ps_lim) {
+ if (vclk_per <= ATI18818_clocks[set].ps_lim) {
pll->m = ATI18818_clocks[set].mode;
pll->n = ATI18818_clocks[set].prog;
return 0;
return -EINVAL;
}
-static int aty_var_to_pll_514(const struct fb_var_screeninfo *var,
- struct pll_gx *pll)
+static int aty_var_to_pll_514(u32 vclk_per, struct pll_gx *pll)
{
/*
* FIXME: use real calculations instead of using fixed values from the old
int i;
for (i = 0; i < sizeof(RGB514_clocks)/sizeof(*RGB514_clocks); i++)
- if (var->pixclock <= RGB514_clocks[i].limit) {
+ if (vclk_per <= RGB514_clocks[i].limit) {
pll->m = RGB514_clocks[i].m;
pll->n = RGB514_clocks[i].n;
return 0;
/* FIXME: ATI18818?? */
-static int aty_pll_gx_to_var(const struct pll_gx *pll,
- struct fb_var_screeninfo *var)
+static int aty_pll_gx_to_var(const struct pll_gx *pll, u32 *vclk_per)
{
u8 df, vco_div_count, ref_div_count;
vco_div_count = pll->m & 0x3f;
ref_div_count = pll->n;
- var->pixclock = (ref_clk_per*(vco_div_count+65)/ref_div_count)>>(3-df);
+ *vclk_per = (ref_clk_per*(vco_div_count+65)/ref_div_count)>>(3-df);
return 0;
}
static void aty_set_pll_ct(const struct fb_info_aty *info,
const struct pll_ct *pll)
{
-#if 0 /* ecd debug */
-printk("PLL_REF_DIV: %02x (%02x)\n",
- pll->pll_ref_div, aty_ld_pll(PLL_REF_DIV, info));
-printk("PLL_GEN_CNTL: %02x (%02x)\n",
- pll->pll_gen_cntl, aty_ld_pll(PLL_GEN_CNTL, info));
-printk("MCLK_FB_DIV: %02x (%02x)\n",
- pll->mclk_fb_div, aty_ld_pll(MCLK_FB_DIV, info));
-printk("PLL_VCLK_CNTL: %02x (%02x)\n",
- pll->pll_vclk_cntl, aty_ld_pll(PLL_VCLK_CNTL, info));
-printk("VCLK_POST_DIV: %02x (%02x)\n",
- pll->vclk_post_div, aty_ld_pll(VCLK_POST_DIV, info));
-printk("VCLK0_FB_DIV: %02x (%02x)\n",
- pll->vclk_fb_div, aty_ld_pll(VCLK0_FB_DIV, info));
-printk("PLL_EXT_CNTL: %02x (%02x)\n",
- pll->pll_ext_cntl, aty_ld_pll(PLL_EXT_CNTL, info));
-#endif /* ecd debug */
aty_st_pll(PLL_REF_DIV, pll->pll_ref_div, info);
aty_st_pll(PLL_GEN_CNTL, pll->pll_gen_cntl, info);
aty_st_pll(MCLK_FB_DIV, pll->mclk_fb_div, info);
return 0;
}
-static int aty_var_to_pll_ct(const struct fb_info_aty *info,
- const struct fb_var_screeninfo *var,
- struct pll_ct *pll)
+static int aty_var_to_pll_ct(const struct fb_info_aty *info, u32 vclk_per,
+ u8 bpp, struct pll_ct *pll)
{
- u32 vclk_per, q, x; /* x is a workaround for sparc64-linux-gcc */
+ u32 q, x; /* x is a workaround for sparc64-linux-gcc */
u8 pll_ref_div, pll_gen_cntl, pll_ext_cntl;
u8 mclk_fb_div, mclk_post_div, mpostdiv = 0;
u8 vclk_fb_div, vclk_post_div, vpostdiv = 0;
pll->pll_vclk_cntl = 0x03; /* VCLK = PLL_VCLK/VCLKx_POST */
- vclk_per = var->pixclock;
pll_ref_div = info->pll_per*2*255/ref_clk_per;
/* FIXME: use the VTB/GTB /3 post divider if it's better suited */
vclk_fb_div = q*vclk_post_div/8;
if ((err = aty_dsp_gt(info, mclk_fb_div, mclk_post_div, vclk_fb_div,
- vclk_post_div, var->bits_per_pixel, pll)))
+ vclk_post_div, bpp, pll)))
return err;
if ((((Gx == GT_CHIP_ID) && (Rev & 0x03)) || (Gx == GU_CHIP_ID) ||
return 0;
}
-static int aty_pll_ct_to_var(const struct pll_ct *pll,
- struct fb_var_screeninfo *var)
+static int aty_pll_ct_to_var(const struct pll_ct *pll, u32 *vclk_per)
{
u8 pll_ref_div = pll->pll_ref_div;
u8 vclk_fb_div = pll->vclk_fb_div;
(vclk_post_div & 3)];
if (vpostdiv == 0)
return -EINVAL;
- var->pixclock = pll_ref_div*vpostdiv*ref_clk_per/vclk_fb_div/2;
+ *vclk_per = pll_ref_div*vpostdiv*ref_clk_per/vclk_fb_div/2;
return 0;
}
aty_set_pll_ct(info, &par->pll.ct);
i = aty_ld_le32(MEM_CNTL, info) & 0xf30fffff;
if (!(Gx == VT_CHIP_ID && (Rev == 0x40 || Rev == 0x48)))
- i |= info->mem_refresh_rate << 20;
+ i |= info->mem_refresh_rate << 20;
switch (par->crtc.bpp) {
case 8:
case 24:
/* GT */
aty_st_le32(DAC_CNTL, 0x86010102, info);
aty_st_le32(BUS_CNTL, 0x7b23a040, info);
- aty_st_le32(EXT_MEM_CNTL, 0x5000001, info);
+ aty_st_le32(EXT_MEM_CNTL,
+ aty_ld_le32(EXT_MEM_CNTL, info) | 0x5000001, info);
}
aty_st_le32(MEM_CNTL, i, info);
}
if ((err = aty_var_to_crtc(info, var, &par->crtc)))
return err;
- if ((Gx == GX_PCI_ID) || (Gx == CX_PCI_ID))
+ if ((Gx == GX_CHIP_ID) || (Gx == CX_CHIP_ID))
switch (info->clk_type) {
case CLK_ATI18818_1:
- err = aty_var_to_pll_18818(var, &par->pll.gx);
+ err = aty_var_to_pll_18818(var->pixclock, &par->pll.gx);
break;
case CLK_IBMRGB514:
- err = aty_var_to_pll_514(var, &par->pll.gx);
+ err = aty_var_to_pll_514(var->pixclock, &par->pll.gx);
break;
}
else
- err = aty_var_to_pll_ct(info, var, &par->pll.ct);
+ err = aty_var_to_pll_ct(info, var->pixclock, par->crtc.bpp,
+ &par->pll.ct);
if (err)
return err;
par->accel_flags = 0;
#if 0
- if (!fbmon_valid_timings(pixclock, htotal, vtotal, info))
+ if (!fbmon_valid_timings(var->pixclock, htotal, vtotal, info))
return -EINVAL;
#endif
if ((err = aty_crtc_to_var(&par->crtc, var)))
return err;
- if ((Gx == GX_PCI_ID) || (Gx == CX_PCI_ID))
- err = aty_pll_gx_to_var(&par->pll.gx, var);
+ if ((Gx == GX_CHIP_ID) || (Gx == CX_CHIP_ID))
+ err = aty_pll_gx_to_var(&par->pll.gx, &var->pixclock);
else
- err = aty_pll_ct_to_var(&par->pll.ct, var);
+ err = aty_pll_ct_to_var(&par->pll.ct, &var->pixclock);
if (err)
return err;
0, FB_VMODE_NONINTERLACED
};
-#ifdef __sparc__
-struct fb_var_screeninfo default_var_1024x768 __initdata = {
- /* 1024x768, 75 Hz, Non-Interlaced (78.75 MHz dotclock) */
- 1024, 768, 1024, 768, 0, 0, 8, 0,
- {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
- 0, 0, -1, -1, 0, 12699, 176, 16, 28, 1, 96, 3,
- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-};
-
-struct fb_var_screeninfo default_var_1152x900 __initdata = {
- /* 1152x900, 76 Hz, Non-Interlaced (110.0 MHz dotclock) */
- 1152, 900, 1152, 900, 0, 0, 8, 0,
- {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
- 0, 0, -1, -1, 0, 9091, 234, 24, 34, 3, 100, 3,
- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-};
-
-struct fb_var_screeninfo default_var_1280x1024 __initdata = {
- /* 1280x1024, 75 Hz, Non-Interlaced (135.00 MHz dotclock) */
- 1280, 1024, 1280, 1024, 0, 0, 8, 0,
- {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
- 0, 0, -1, -1, 0, 7408, 248, 16, 38, 1, 144, 3,
- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-};
-#endif
-
/*
* Get the Fixed Part of the Display
}
+static void atyfb_set_disp(struct display *disp, struct fb_info_aty *info,
+ int bpp, int accel)
+{
+ unsigned long flags;
+
+ save_flags(flags); cli();
+ switch (bpp) {
+#ifdef FBCON_HAS_CFB8
+ case 8:
+ info->dispsw = accel ? fbcon_aty8 : fbcon_cfb8;
+ disp->dispsw = &info->dispsw;
+ break;
+#endif
+#ifdef FBCON_HAS_CFB16
+ case 16:
+ info->dispsw = accel ? fbcon_aty16 : fbcon_cfb16;
+ disp->dispsw = &info->dispsw;
+ disp->dispsw_data = info->fbcon_cmap.cfb16;
+ break;
+#endif
+#ifdef FBCON_HAS_CFB24
+ case 24:
+ info->dispsw = accel ? fbcon_aty24 : fbcon_cfb24;
+ disp->dispsw = &info->dispsw;
+ disp->dispsw_data = info->fbcon_cmap.cfb24;
+ break;
+#endif
+#ifdef FBCON_HAS_CFB32
+ case 32:
+ info->dispsw = accel ? fbcon_aty32 : fbcon_cfb32;
+ disp->dispsw = &info->dispsw;
+ disp->dispsw_data = info->fbcon_cmap.cfb32;
+ break;
+#endif
+ default:
+ disp->dispsw = &fbcon_dummy;
+ }
+ if (info->cursor) {
+ info->dispsw.cursor = atyfb_cursor;
+ info->dispsw.set_font = atyfb_set_font;
+ }
+ restore_flags(flags);
+}
+
+
/*
* Set the User Defined Part of the Display
*/
display->can_soft_blank = 1;
display->inverse = 0;
accel = var->accel_flags & FB_ACCELF_TEXT;
- switch (par.crtc.bpp) {
-#ifdef FBCON_HAS_CFB8
- case 8:
- *display->dispsw = accel ? fbcon_aty8 : fbcon_cfb8;
- break;
-#endif
-#ifdef FBCON_HAS_CFB16
- case 16:
- *display->dispsw = accel ? fbcon_aty16 : fbcon_cfb16;
- break;
-#endif
-#ifdef FBCON_HAS_CFB24
- case 24:
- *display->dispsw = accel ? fbcon_aty24 : fbcon_cfb24;
- break;
-#endif
-#ifdef FBCON_HAS_CFB32
- case 32:
- *display->dispsw = accel ? fbcon_aty32 : fbcon_cfb32;
- break;
-#endif
- default:
- display->dispsw = NULL;
- break;
- }
- display->scrollmode = accel ? 0 : SCROLL_YREDRAW;
+ atyfb_set_disp(display, info, par.crtc.bpp, accel);
+ if (accel)
+ display->scrollmode = (info->bus_type == PCI) ? SCROLL_YNOMOVE : 0;
+ else
+ display->scrollmode = SCROLL_YREDRAW;
if (info->fb_info.changevar)
(*info->fb_info.changevar)(con);
- if (info->cursor) {
- display->dispsw->cursor = atyfb_cursor;
- display->dispsw->set_font = atyfb_set_font;
- }
}
if (con == currcon)
atyfb_set_par(&par, info);
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc, atyfb_getcolreg,
- info);
+ return fb_get_cmap(cmap, kspc, atyfb_getcolreg, info);
else if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else {
return err;
}
if (con == currcon) /* current console? */
- return fb_set_cmap(cmap, &fb_display[con].var, kspc, atyfb_setcolreg,
- info);
+ return fb_set_cmap(cmap, kspc, atyfb_setcolreg, info);
else
fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
return 0;
static int atyfb_ioctl(struct inode *inode, struct file *file, u_int cmd,
u_long arg, int con, struct fb_info *info)
{
+#ifdef __sparc__
+ struct fb_info_aty *fb = (struct fb_info_aty *)info;
+ struct fbtype fbtyp;
+
+ switch (cmd) {
+ case FBIOGTYPE:
+ fbtyp.fb_type = FBTYPE_PCI_GENERIC;
+ fbtyp.fb_width = fb->current_par.crtc.vxres;
+ fbtyp.fb_height = fb->current_par.crtc.vyres;
+ fbtyp.fb_depth = fb->current_par.crtc.bpp;
+ fbtyp.fb_cmsize = fb_display[con].cmap.len;
+ fbtyp.fb_size = fb->total_vram;
+ copy_to_user_ret((struct fbtype *)arg, &fbtyp, sizeof(fbtyp), -EFAULT);
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+#else
return -EINVAL;
+#endif
}
#ifdef __sparc__
/* To stop the swapper from even considering these pages. */
vma->vm_flags |= (VM_SHM | VM_LOCKED);
+ if (((vma->vm_offset == 0) && (size == fb->total_vram)) ||
+ ((vma->vm_offset == fb->total_vram) && (size == PAGE_SIZE)))
+ vma->vm_offset += 0x8000000000000000UL;
+
#ifdef __sparc_v9__
/* Align it as much as desirable */
{
- int j, max = -1, align;
+ unsigned long j, align;
+ int max = -1;
map_offset = vma->vm_offset+size;
for (i = 0; fb->mmap_map[i].size; i++) {
if (start > offset)
continue;
- if (offset > end)
+ if (offset >= end)
continue;
map_size = fb->mmap_map[i].size - (offset - start);
printk("atyfb: Unknown mach64 0x%04x\n", Gx);
return 0;
} else
- printk("atyfb: %s [0x%04x rev 0x%2x] ", chipname, Gx, Rev);
+ printk("atyfb: %s [0x%04x rev 0x%02x] ", chipname, Gx, Rev);
if ((Gx == GX_CHIP_ID) || (Gx == CX_CHIP_ID)) {
info->bus_type = (aty_ld_le32(CONFIG_STAT0, info) >> 0) & 0x07;
info->ram_type = (aty_ld_le32(CONFIG_STAT0, info) >> 3) & 0x07;
info->mem_refresh_rate = 6; /* 110 = 80 Mhz - 100 Mhz */
else
info->mem_refresh_rate = 7; /* 111 = 100 Mhz and above */
- printk("%d MHz PLL, %d Mhz MCLK\n", pll, mclk);
info->pll_per = 1000000/pll;
info->mclk_per = 1000000/mclk;
info->total_vram = 0x80000;
}
+ if (Gx == GI_CHIP_ID) {
+ if (aty_ld_le32(CONFIG_STAT1, info) & 0x40000000)
+ info->total_vram += 0x400000;
+ }
+
+ printk("%d%c %d MHz PLL, %d Mhz MCLK\n",
+ info->total_vram == 0x80000 ? 512 : (info->total_vram >> 20),
+ info->total_vram == 0x80000 ? 'K' : 'M', pll, mclk);
+
if (info->bus_type == ISA)
if ((info->total_vram == 0x400000) || (info->total_vram == 0x800000)) {
/* protect GUI-regs if complete Aperture is VRAM */
default_vmode = VMODE_CHOOSE;
}
if (default_vmode == VMODE_CHOOSE) {
- sense = read_aty_sense(info);
- default_vmode = mac_map_monitor_sense(sense);
+ if (Gx == LG_CHIP_ID)
+ /* G3 PowerBook with 1024x768 LCD */
+ default_vmode = VMODE_1024_768_60;
+ else {
+ sense = read_aty_sense(info);
+ default_vmode = mac_map_monitor_sense(sense);
+ }
}
if (default_vmode <= 0 || default_vmode > VMODE_MAX)
default_vmode = VMODE_640_480_60;
#else /* !CONFIG_PMAC && !CONFIG_CHRP */
var = default_var;
#endif /* !CONFIG_PMAC && !CONFIG_CHRP */
- var.accel_flags |= FB_ACCELF_TEXT;
+ if (noaccel)
+ var.accel_flags &= ~FB_ACCELF_TEXT;
+ else
+ var.accel_flags |= FB_ACCELF_TEXT;
+
+ if (var.yres == var.yres_virtual) {
+ u32 vram = (info->total_vram - (PAGE_SIZE << 2));
+ var.yres_virtual = ((vram * 8) / var.bits_per_pixel) / var.xres_virtual;
+ if (var.yres_virtual < var.yres)
+ var.yres_virtual = var.yres;
+ }
+
if (atyfb_decode_var(&var, &info->default_par, info)) {
printk("atyfb: can't set default video mode\n");
return 0;
}
- if ((Gx == GX_CHIP_ID) || (Gx == CX_CHIP_ID))
- strcat(atyfb_name, "GX");
- else if ((Gx == CT_CHIP_ID) || (Gx == ET_CHIP_ID))
- strcat(atyfb_name, "CT");
- else if ((Gx == VT_CHIP_ID) || (Gx == VU_CHIP_ID))
- strcat(atyfb_name, "VT");
- else
- strcat(atyfb_name, "GT");
-
disp = &info->disp;
strcpy(info->fb_info.modename, atyfb_name);
info->palette[j].blue = default_blu[k];
}
- if ((Gx == VT_CHIP_ID) || (Gx == GT_CHIP_ID) || (Gx == GU_CHIP_ID) ||
- (Gx == LG_CHIP_ID) || (Gx == GB_CHIP_ID) || (Gx == GD_CHIP_ID) ||
- (Gx == GI_CHIP_ID) || (Gx == GP_CHIP_ID) || (Gx == GQ_CHIP_ID) ||
- (Gx == VU_CHIP_ID)) {
- info->cursor = kmalloc(sizeof(struct aty_cursor), GFP_ATOMIC);
- if (info->cursor)
- memset(info->cursor, 0, sizeof(*info->cursor));
+ if (Gx != GX_CHIP_ID && Gx != CX_CHIP_ID) {
+ info->cursor = aty_init_cursor(info);
+ if (info->cursor) {
+ info->dispsw.cursor = atyfb_cursor;
+ info->dispsw.set_font = atyfb_set_font;
+ }
}
-
- disp->dispsw = &info->dispsw;
+
atyfb_set_var(&var, -1, &info->fb_info);
if (register_framebuffer(&info->fb_info) < 0)
unsigned long addr;
#ifdef __sparc__
extern int con_is_present(void);
- u32 chip_id;
+ struct pcidev_cookie *pcp;
+ char prop[128];
+ int node, len;
+ u32 mem, chip_id;
int i, j;
/* Do not attach when we have a serial console. */
*/
for (i = 0; i < 6 && pdev->base_address[i]; i++)
/* nothing */;
- j = i + 1;
+ j = i + 3;
info->mmap_map = kmalloc(j * sizeof(*info->mmap_map), GFP_ATOMIC);
if (!info->mmap_map) {
printk("atyfb_init: can't alloc mmap_map\n");
kfree(info);
+ return;
}
-
memset(info->mmap_map, 0, j * sizeof(*info->mmap_map));
- for (i = j = 0; i < 6 && pdev->base_address[i]; i++) {
+
+ for (i = 0, j = 2; i < 6 && pdev->base_address[i]; i++) {
int io, breg = PCI_BASE_ADDRESS_0 + (i << 2);
unsigned long base;
u32 size, pbase;
size = ~(size) + 1;
if (base == addr) {
- info->mmap_map[j].voff = (pbase + 0x800000)
- & PAGE_MASK;
+ info->mmap_map[j].voff = (pbase + 0x800000) & PAGE_MASK;
info->mmap_map[j].poff = __pa((base + 0x800000)
& PAGE_MASK);
info->mmap_map[j].size = 0x800000;
/*
* Fix PROMs idea of MEM_CNTL settings...
*/
- chip_id = aty_ld_le32(CONFIG_CHIP_ID, info) & CFG_CHIP_TYPE;
- if ((chip_id & 0xffff) == VT_CHIP_ID && !((chip_id >> 24) & 1)) {
- u32 mem = aty_ld_le32(MEM_CNTL, info);
+ mem = aty_ld_le32(MEM_CNTL, info);
+ chip_id = aty_ld_le32(CONFIG_CHIP_ID, info);
+ if (((chip_id & CFG_CHIP_TYPE) == VT_CHIP_ID) &&
+ !((chip_id >> 24) & 1)) {
switch (mem & 0x0f) {
case 3:
mem = (mem & ~(0x0f)) | 2;
break;
}
if ((aty_ld_le32(CONFIG_STAT0, info) & 7) >= SDRAM)
- mem &= ~(0x00f00000);
- aty_st_le32(MEM_CNTL, mem, info);
+ mem &= ~(0x00700000);
}
+ mem &= ~(0xcf80e000); /* Turn off all undocumented bits. */
+ aty_st_le32(MEM_CNTL, mem, info);
/*
- * Set default vmode and cmode from PROM properties.
+ * If this is the console device, we will set default video
+ * settings to what the PROM left us with.
*/
- {
- struct pcidev_cookie *cookie = pdev->sysdata;
- int node = cookie->prom_node;
- int width = prom_getintdefault(node, "width", 1024);
- int height = prom_getintdefault(node, "height", 768);
- int depth = prom_getintdefault(node, "depth", 8);
-
- switch (width) {
- case 1024:
- if (height == 768)
- default_var = default_var_1024x768;
- break;
- case 1152:
- if (height == 900)
- default_var = default_var_1152x900;
- break;
- case 1280:
- if (height == 1024)
- default_var = default_var_1280x1024;
- break;
- default:
- break;
+ node = prom_getchild(prom_root_node);
+ node = prom_searchsiblings(node, "aliases");
+ if (node) {
+ len = prom_getproperty(node, "screen", prop, sizeof(prop));
+ if (len > 0) {
+ prop[len] = '\0';
+ node = prom_finddevice(prop);
+ } else {
+ node = 0;
}
+ }
- switch (depth) {
- case 8:
- default_var.bits_per_pixel = 8;
- break;
- case 16:
- default_var.bits_per_pixel = 16;
- break;
- case 24:
- default_var.bits_per_pixel = 24;
- break;
- case 32:
- default_var.bits_per_pixel = 32;
- break;
- default:
- break;
- }
+ pcp = pdev->sysdata;
+ if (node == pcp->prom_node) {
+
+ struct fb_var_screeninfo *var = &default_var;
+ u32 v_total, h_total;
+ struct crtc crtc;
+
+ crtc.vxres = prom_getintdefault(node, "width", 1024);
+ crtc.vyres = prom_getintdefault(node, "height", 768);
+ crtc.bpp = prom_getintdefault(node, "depth", 8);
+ crtc.xoffset = crtc.yoffset = 0;
+ crtc.h_tot_disp = aty_ld_le32(CRTC_H_TOTAL_DISP, info);
+ crtc.h_sync_strt_wid = aty_ld_le32(CRTC_H_SYNC_STRT_WID, info);
+ crtc.v_tot_disp = aty_ld_le32(CRTC_V_TOTAL_DISP, info);
+ crtc.v_sync_strt_wid = aty_ld_le32(CRTC_V_SYNC_STRT_WID, info);
+ crtc.gen_cntl = aty_ld_le32(CRTC_GEN_CNTL, info);
+ aty_crtc_to_var(&crtc, var);
+
+ /*
+ * FIXME: Read the PLL to figure actual Refresh Rate.
+ * Default to 66Hz for now.
+ */
+ h_total = var->xres + var->right_margin +
+ var->hsync_len + var->left_margin;
+ v_total = var->yres + var->lower_margin +
+ var->vsync_len + var->upper_margin;
+ default_var.pixclock = 1000000000000ULL/(66*h_total*v_total);
}
#else /* __sparc__ */
if (info->mmap_map)
kfree(info->mmap_map);
kfree(info);
+ return;
}
+
+#ifdef __sparc__
+ /*
+ * Add /dev/fb mmap values.
+ */
+ info->mmap_map[0].voff = 0x8000000000000000UL;
+ info->mmap_map[0].poff = __pa(info->frame_buffer & PAGE_MASK);
+ info->mmap_map[0].size = info->total_vram;
+ info->mmap_map[0].prot_mask = _PAGE_CACHE;
+ info->mmap_map[0].prot_flag = _PAGE_E;
+ info->mmap_map[1].voff = info->mmap_map[0].voff + info->total_vram;
+ info->mmap_map[1].poff = __pa(info->ati_regbase & PAGE_MASK);
+ info->mmap_map[1].size = PAGE_SIZE;
+ info->mmap_map[1].prot_mask = _PAGE_CACHE;
+ info->mmap_map[1].prot_flag = _PAGE_E;
+#endif /* __sparc__ */
}
}
#elif defined(CONFIG_ATARI)
}
info = kmalloc(sizeof(struct fb_info_aty), GFP_ATOMIC);
+ if (!info) {
+ printk("atyfb_init: can't alloc fb_info_aty\n");
+ return;
+ }
+ memset(info, 0, sizeof(struct fb_info_aty));
/*
* Map the video memory (physical address given) to somewhere in the
for (; dp; dp = dp->next) {
switch (dp->n_addrs) {
case 1:
+ case 2:
case 3:
addr = dp->addrs[0].address;
break;
}
info = kmalloc(sizeof(struct fb_info_aty), GFP_ATOMIC);
+ if (!info) {
+ printk("atyfb_of_init: can't alloc fb_info_aty\n");
+ return;
+ }
+ memset(info, 0, sizeof(struct fb_info_aty));
info->ati_regbase = (unsigned long)ioremap(0x7ff000+addr,
0x1000)+0xc00;
break;
memcpy(fontname, this_opt + 5, i);
fontname[i] = 0;
+ } else if (!strncmp(this_opt, "noblink", 7)) {
+ curblink = 0;
+ } else if (!strncmp(this_opt, "noaccel", 7)) {
+ noaccel = 1;
}
#if defined(CONFIG_PMAC) || defined(CONFIG_CHRP)
- if (!strncmp(this_opt, "vmode:", 6)) {
- int vmode = simple_strtoul(this_opt+6, NULL, 0);
+ else if (!strncmp(this_opt, "vmode:", 6)) {
+ unsigned int vmode = simple_strtoul(this_opt+6, NULL, 0);
if (vmode > 0 && vmode <= VMODE_MAX)
default_vmode = vmode;
} else if (!strncmp(this_opt, "cmode:", 6)) {
- int depth = simple_strtoul(this_opt+6, NULL, 0);
- switch (depth) {
+ unsigned int cmode = simple_strtoul(this_opt+6, NULL, 0);
+ switch (cmode) {
+ case 0:
case 8:
- default_cmode = 0;
+ default_cmode = CMODE_8;
break;
case 15:
case 16:
- default_cmode = 1;
+ default_cmode = CMODE_16;
break;
case 24:
case 32:
- default_cmode = 2;
+ default_cmode = CMODE_32;
break;
}
}
* Why do we need this silly Mach64 argument?
* We are already here because of mach64= so its redundant.
*/
- if (MACH_IS_ATARI && (!strncmp(this_opt, "Mach64:", 7))) {
+ else if (MACH_IS_ATARI && (!strncmp(this_opt, "Mach64:", 7))) {
static unsigned char m64_num;
static char mach64_str[80];
strncpy(mach64_str, this_opt+7, 80);
/* Do we have to save the colormap? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1,
- atyfb_getcolreg, fb);
+ fb_get_cmap(&fb_display[currcon].cmap, 1, atyfb_getcolreg, fb);
/* Erase HW Cursor */
if (info->cursor)
atyfb_decode_var(&fb_display[con].var, &par, info);
atyfb_set_par(&par, info);
+ atyfb_set_disp(&fb_display[con], info, par.crtc.bpp,
+ par.accel_flags & FB_ACCELF_TEXT);
/* Install new colormap */
do_install_cmap(con, fb);
return 1;
}
- /*
- * Update the `var' structure (called by fbcon.c)
- */
-
-static int atyfbcon_updatevar(int con, struct fb_info *fb)
-{
- struct fb_info_aty *info = (struct fb_info_aty *)fb;
-
- info->current_par.crtc.yoffset = fb_display[con].var.yoffset;
- set_off_pitch(&info->current_par, info);
- return 0;
-}
-
/*
* Blank the display.
*/
if (regno > 255)
return 1;
- *red = info->palette[regno].red;
- *green = info->palette[regno].green;
- *blue = info->palette[regno].blue;
+ *red = (info->palette[regno].red<<8) | info->palette[regno].red;
+ *green = (info->palette[regno].green<<8) | info->palette[regno].green;
+ *blue = (info->palette[regno].blue<<8) | info->palette[regno].blue;
+ *transp = 0;
return 0;
}
if (regno > 255)
return 1;
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
info->palette[regno].red = red;
info->palette[regno].green = green;
info->palette[regno].blue = blue;
(info->current_par.crtc.bpp == 16)) ? 3 : 0;
info->aty_cmap_regs->windex = regno << scale;
eieio();
- info->aty_cmap_regs->lut = red << scale;
+ info->aty_cmap_regs->lut = red;
eieio();
- info->aty_cmap_regs->lut = green << scale;
+ info->aty_cmap_regs->lut = green;
eieio();
- info->aty_cmap_regs->lut = blue << scale;
+ info->aty_cmap_regs->lut = blue;
eieio();
- if (regno < 16) {
+ if (regno < 16)
+ switch (info->current_par.crtc.bpp) {
#ifdef FBCON_HAS_CFB16
- fbcon_cfb16_cmap[regno] = (regno << 10) | (regno << 5) | regno;
+ case 16:
+ info->fbcon_cmap.cfb16[regno] = (regno << 10) | (regno << 5) |
+ regno;
+ break;
#endif
#ifdef FBCON_HAS_CFB24
- fbcon_cfb24_cmap[regno] = (regno << 16) | (regno << 8) | regno;
+ case 24:
+ info->fbcon_cmap.cfb24[regno] = (regno << 16) | (regno << 8) |
+ regno;
+ break;
#endif
#ifdef FBCON_HAS_CFB32
- fbcon_cfb32_cmap[regno] = (regno << 24) | (regno << 16) |
- (regno << 8) | regno;
+ case 32:
+ i = (regno << 8) | regno;
+ info->fbcon_cmap.cfb32[regno] = (i << 16) | i;
+ break;
#endif
- }
+ }
return 0;
}
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- atyfb_setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, atyfb_setcolreg, info);
else {
int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
- fb_set_cmap(fb_default_cmap(size), &fb_display[con].var, 1,
- atyfb_setcolreg, info);
+ fb_set_cmap(fb_default_cmap(size), 1, atyfb_setcolreg, info);
}
}
draw_rect(dstx, dsty, width, height, info);
}
+ /*
+ * Update the `var' structure (called by fbcon.c)
+ */
+
+static int atyfbcon_updatevar(int con, struct fb_info *fb)
+{
+ struct fb_info_aty *info = (struct fb_info_aty *)fb;
+ struct atyfb_par *par = &info->current_par;
+ struct display *p = &fb_display[con];
+ struct vc_data *conp = p->conp;
+ u32 yres, yoffset, sy, height;
+
+ yres = ((par->crtc.v_tot_disp >> 16) & 0x7ff) + 1;
+ yoffset = fb_display[con].var.yoffset;
+
+ sy = (conp->vc_rows + p->yscroll) * fontheight(p);
+ height = yres - conp->vc_rows * fontheight(p);
+
+ if (height && (yoffset + yres > sy)) {
+ u32 xres, xoffset;
+ u32 bgx;
+
+ xres = (((par->crtc.h_tot_disp >> 16) & 0xff) + 1) * 8;
+ xoffset = fb_display[con].var.xoffset;
+
+
+ bgx = attr_bgcol_ec(p, conp);
+ bgx |= (bgx << 8);
+ bgx |= (bgx << 16);
+
+ if (sy + height > par->crtc.vyres) {
+ wait_for_fifo(1, info);
+ aty_st_le32(SC_BOTTOM, sy + height - 1, info);
+ }
+ aty_rectfill(xoffset, sy, xres, height, bgx, info);
+ }
+
+ if (info->cursor && (yoffset + yres <= sy))
+ atyfb_cursor(p, CM_ERASE, info->cursor->pos.x, info->cursor->pos.y);
+
+ info->current_par.crtc.yoffset = yoffset;
+ set_off_pitch(&info->current_par, info);
+ return 0;
+}
/*
* Text console acceleration
return;
#endif
- sx *= p->fontwidth;
- sy *= p->fontheight;
- dx *= p->fontwidth;
- dy *= p->fontheight;
- width *= p->fontwidth;
- height *= p->fontheight;
+ sx *= fontwidth(p);
+ sy *= fontheight(p);
+ dx *= fontwidth(p);
+ dy *= fontheight(p);
+ width *= fontwidth(p);
+ height *= fontheight(p);
aty_rectcopy(sx, sy, dx, dy, width, height,
(struct fb_info_aty *)p->fb_info);
bgx |= (bgx << 8);
bgx |= (bgx << 16);
- sx *= p->fontwidth;
- sy *= p->fontheight;
- width *= p->fontwidth;
- height *= p->fontheight;
+ sx *= fontwidth(p);
+ sy *= fontheight(p);
+ width *= fontwidth(p);
+ height *= fontheight(p);
aty_rectfill(sx, sy, width, height, bgx,
(struct fb_info_aty *)p->fb_info);
-/* $Id: bwtwofb.c,v 1.1 1998/07/21 14:50:48 jj Exp $
+/* $Id: bwtwofb.c,v 1.5 1998/08/23 14:20:40 mj Exp $
* bwtwofb.c: BWtwo frame buffer driver
*
* Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
#include <linux/init.h>
#include <linux/selection.h>
-#include "sbusfb.h"
+#include <video/sbusfb.h>
#include <asm/io.h>
#ifndef __sparc_v9__
#include <asm/sun4paddr.h>
#endif
-#include "fbcon-mfb.h"
+#include <video/fbcon-mfb.h>
/* OBio addresses for the bwtwo registers */
#define BWTWO_REGISTER_OFFSET 0x400000
#define BWTWO_SR_ID_MONO 0x02
#define BWTWO_SR_ID_MONO_ECL 0x03
#define BWTWO_SR_ID_MSYNC 0x04
+#define BWTWO_SR_ID_NOCONN 0x0a
/* Control Register Constants */
#define BWTWO_CTL_ENABLE_INTS 0x80
static void bw2_margins (struct fb_info_sbusfb *fb, struct display *p, int x_margin, int y_margin)
{
- p->screen_base += ((y_margin - fb->y_margin) * p->line_length + (x_margin - fb->x_margin)) >> 3;
+ p->screen_base += (y_margin - fb->y_margin) * p->line_length + ((x_margin - fb->x_margin) >> 3);
}
static u8 bw2regs_1600[] __initdata = {
struct display *disp = &fb->disp;
struct fbtype *type = &fb->type;
#ifdef CONFIG_SUN4
- unsigned long phys = SUN4_300_BWTWO_PHYSADDR;
+ unsigned long phys = sun4_bwtwo_physaddr;
#else
unsigned long phys = fb->sbdp->reg_addrs[0].phys_addr;
#endif
else
p = bw2regs_66hz;
break;
+ case BWTWO_SR_ID_NOCONN:
+ return NULL;
default:
prom_printf("bw2: can't handle SR %02x\n",
status);
if (!disp->screen_base)
disp->screen_base = (char *)sparc_alloc_io(phys, 0,
type->fb_size, "bw2_ram", fb->iospace, 0);
- disp->screen_base += (fix->line_length * fb->y_margin + fb->x_margin) >> 3;
+ disp->screen_base += fix->line_length * fb->y_margin + (fb->x_margin >> 3);
fb->dispsw = fbcon_mfb;
fix->visual = FB_VISUAL_MONO01;
--- /dev/null
+/* $Id: cgfourteenfb.c,v 1.3 1998/09/04 15:43:41 jj Exp $
+ * cgfourteenfb.c: CGfourteen frame buffer driver
+ *
+ * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz)
+ * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx)
+ */
+
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/tty.h>
+#include <linux/malloc.h>
+#include <linux/vmalloc.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/fb.h>
+#include <linux/init.h>
+#include <linux/selection.h>
+
+#include <video/sbusfb.h>
+#include <asm/io.h>
+#include <asm/pgtable.h>
+#include <asm/uaccess.h>
+
+#include <video/fbcon-cfb8.h>
+
+#define CG14_MCR_INTENABLE_SHIFT 7
+#define CG14_MCR_INTENABLE_MASK 0x80
+#define CG14_MCR_VIDENABLE_SHIFT 6
+#define CG14_MCR_VIDENABLE_MASK 0x40
+#define CG14_MCR_PIXMODE_SHIFT 4
+#define CG14_MCR_PIXMODE_MASK 0x30
+#define CG14_MCR_TMR_SHIFT 2
+#define CG14_MCR_TMR_MASK 0x0c
+#define CG14_MCR_TMENABLE_SHIFT 1
+#define CG14_MCR_TMENABLE_MASK 0x02
+#define CG14_MCR_RESET_SHIFT 0
+#define CG14_MCR_RESET_MASK 0x01
+#define CG14_REV_REVISION_SHIFT 4
+#define CG14_REV_REVISION_MASK 0xf0
+#define CG14_REV_IMPL_SHIFT 0
+#define CG14_REV_IMPL_MASK 0x0f
+#define CG14_VBR_FRAMEBASE_SHIFT 12
+#define CG14_VBR_FRAMEBASE_MASK 0x00fff000
+#define CG14_VMCR1_SETUP_SHIFT 0
+#define CG14_VMCR1_SETUP_MASK 0x000001ff
+#define CG14_VMCR1_VCONFIG_SHIFT 9
+#define CG14_VMCR1_VCONFIG_MASK 0x00000e00
+#define CG14_VMCR2_REFRESH_SHIFT 0
+#define CG14_VMCR2_REFRESH_MASK 0x00000001
+#define CG14_VMCR2_TESTROWCNT_SHIFT 1
+#define CG14_VMCR2_TESTROWCNT_MASK 0x00000002
+#define CG14_VMCR2_FBCONFIG_SHIFT 2
+#define CG14_VMCR2_FBCONFIG_MASK 0x0000000c
+#define CG14_VCR_REFRESHREQ_SHIFT 0
+#define CG14_VCR_REFRESHREQ_MASK 0x000003ff
+#define CG14_VCR1_REFRESHENA_SHIFT 10
+#define CG14_VCR1_REFRESHENA_MASK 0x00000400
+#define CG14_VCA_CAD_SHIFT 0
+#define CG14_VCA_CAD_MASK 0x000003ff
+#define CG14_VCA_VERS_SHIFT 10
+#define CG14_VCA_VERS_MASK 0x00000c00
+#define CG14_VCA_RAMSPEED_SHIFT 12
+#define CG14_VCA_RAMSPEED_MASK 0x00001000
+#define CG14_VCA_8MB_SHIFT 13
+#define CG14_VCA_8MB_MASK 0x00002000
+
+#define CG14_MCR_PIXMODE_8 0
+#define CG14_MCR_PIXMODE_16 2
+#define CG14_MCR_PIXMODE_32 3
+
+struct cg14_regs{
+ volatile u8 mcr; /* Master Control Reg */
+ volatile u8 ppr; /* Packed Pixel Reg */
+ volatile u8 tms[2]; /* Test Mode Status Regs */
+ volatile u8 msr; /* Master Status Reg */
+ volatile u8 fsr; /* Fault Status Reg */
+ volatile u8 rev; /* Revision & Impl */
+ volatile u8 ccr; /* Clock Control Reg */
+ volatile u32 tmr; /* Test Mode Read Back */
+ volatile u8 mod; /* Monitor Operation Data Reg */
+ volatile u8 acr; /* Aux Control */
+ u8 xxx0[6];
+ volatile u16 hct; /* Hor Counter */
+ volatile u16 vct; /* Vert Counter */
+ volatile u16 hbs; /* Hor Blank Start */
+ volatile u16 hbc; /* Hor Blank Clear */
+ volatile u16 hss; /* Hor Sync Start */
+ volatile u16 hsc; /* Hor Sync Clear */
+ volatile u16 csc; /* Composite Sync Clear */
+ volatile u16 vbs; /* Vert Blank Start */
+ volatile u16 vbc; /* Vert Blank Clear */
+ volatile u16 vss; /* Vert Sync Start */
+ volatile u16 vsc; /* Vert Sync Clear */
+ volatile u16 xcs;
+ volatile u16 xcc;
+ volatile u16 fsa; /* Fault Status Address */
+ volatile u16 adr; /* Address Registers */
+ u8 xxx1[0xce];
+ volatile u8 pcg[0x100]; /* Pixel Clock Generator */
+ volatile u32 vbr; /* Frame Base Row */
+ volatile u32 vmcr; /* VBC Master Control */
+ volatile u32 vcr; /* VBC refresh */
+ volatile u32 vca; /* VBC Config */
+};
+
+#define CG14_CCR_ENABLE 0x04
+#define CG14_CCR_SELECT 0x02 /* HW/Full screen */
+
+struct cg14_cursor {
+ volatile u32 cpl0[32]; /* Enable plane 0 */
+ volatile u32 cpl1[32]; /* Color selection plane */
+ volatile u8 ccr; /* Cursor Control Reg */
+ u8 xxx0[3];
+ volatile u16 cursx; /* Cursor x,y position */
+ volatile u16 cursy; /* Cursor x,y position */
+ volatile u32 color0;
+ volatile u32 color1;
+ u32 xxx1[0x1bc];
+ volatile u32 cpl0i[32]; /* Enable plane 0 autoinc */
+ volatile u32 cpl1i[32]; /* Color selection autoinc */
+};
+
+struct cg14_dac {
+ volatile u8 addr; /* Address Register */
+ u8 xxx0[255];
+ volatile u8 glut; /* Gamma table */
+ u8 xxx1[255];
+ volatile u8 select; /* Register Select */
+ u8 xxx2[255];
+ volatile u8 mode; /* Mode Register */
+};
+
+struct cg14_xlut{
+ volatile u8 x_xlut [256];
+ volatile u8 x_xlutd [256];
+ u8 xxx0[0x600];
+ volatile u8 x_xlut_inc [256];
+ volatile u8 x_xlutd_inc [256];
+};
+
+/* Color look up table (clut) */
+/* Each one of these arrays hold the color lookup table (for 256
+ * colors) for each MDI page (I assume then there should be 4 MDI
+ * pages, I still wonder what they are. I have seen NeXTStep split
+ * the screen in four parts, while operating in 24 bits mode. Each
+ * integer holds 4 values: alpha value (transparency channel, thanks
+ * go to John Stone (johns@umr.edu) from OpenBSD), red, green and blue
+ *
+ * I currently use the clut instead of the Xlut
+ */
+struct cg14_clut {
+ unsigned int c_clut [256];
+ unsigned int c_clutd [256]; /* i wonder what the 'd' is for */
+ unsigned int c_clut_inc [256];
+ unsigned int c_clutd_inc [256];
+};
+
+static struct sbus_mmap_map cg14_mmap_map[] __initdata = {
+ { CG14_REGS, 0x80000000, 0x1000 },
+ { CG14_XLUT, 0x80003000, 0x1000 },
+ { CG14_CLUT1, 0x80004000, 0x1000 },
+ { CG14_CLUT2, 0x80005000, 0x1000 },
+ { CG14_CLUT3, 0x80006000, 0x1000 },
+ { CG3_MMAP_OFFSET -
+ 0x7000, 0x80000000, 0x7000 },
+ { CG3_MMAP_OFFSET, 0x00000000, SBUS_MMAP_FBSIZE(1) },
+ { MDI_CURSOR_MAP, 0x80001000, 0x1000 },
+ { MDI_CHUNKY_BGR_MAP, 0x01000000, 0x400000 },
+ { MDI_PLANAR_X16_MAP, 0x02000000, 0x200000 },
+ { MDI_PLANAR_C16_MAP, 0x02800000, 0x200000 },
+ { MDI_PLANAR_X32_MAP, 0x03000000, 0x100000 },
+ { MDI_PLANAR_B32_MAP, 0x03400000, 0x100000 },
+ { MDI_PLANAR_G32_MAP, 0x03800000, 0x100000 },
+ { MDI_PLANAR_R32_MAP, 0x03c00000, 0x100000 },
+ { 0, 0, 0 }
+};
+
+static void cg14_loadcmap (struct fb_info_sbusfb *fb, struct display *p, int index, int count)
+{
+ struct cg14_clut *clut = fb->s.cg14.clut;
+
+ for (; count--; index++)
+ clut->c_clut[index] =
+ (fb->color_map CM(index,2) << 16) |
+ (fb->color_map CM(index,1) << 8) |
+ (fb->color_map CM(index,0));
+}
+
+static void cg14_margins (struct fb_info_sbusfb *fb, struct display *p, int x_margin, int y_margin)
+{
+ p->screen_base += (y_margin - fb->y_margin) * p->line_length + (x_margin - fb->x_margin);
+}
+
+static void cg14_setcursormap (struct fb_info_sbusfb *fb, u8 *red, u8 *green, u8 *blue)
+{
+ struct cg14_cursor *cur = fb->s.cg14.cursor;
+
+ cur->color0 = ((red[0]) | (green[0] << 8) | (blue[0] << 16));
+ cur->color1 = ((red[1]) | (green[1] << 8) | (blue[1] << 16));
+}
+
+/* Set cursor shape */
+static void cg14_setcurshape (struct fb_info_sbusfb *fb)
+{
+ struct cg14_cursor *cur = fb->s.cg14.cursor;
+ int i;
+
+ for (i = 0; i < 32; i++){
+ cur->cpl0 [i] = fb->cursor.bits[0][i];
+ cur->cpl1 [i] = fb->cursor.bits[1][i];
+ }
+}
+
+/* Load cursor information */
+static void cg14_setcursor (struct fb_info_sbusfb *fb)
+{
+ struct cg_cursor *c = &fb->cursor;
+ struct cg14_cursor *cur = fb->s.cg14.cursor;
+
+ if (c->enable)
+ cur->ccr |= CG14_CCR_ENABLE;
+ cur->cursx = ((c->cpos.fbx - c->chot.fbx) & 0xfff);
+ cur->cursy = ((c->cpos.fby - c->chot.fby) & 0xfff);
+}
+
+static void cg14_switch_from_graph (struct fb_info_sbusfb *fb)
+{
+ /* Set the 8-bpp mode */
+ if (fb->open && fb->mmaped){
+ volatile char *mcr = &fb->s.cg14.regs->mcr;
+
+ fb->s.cg14.mode = 8;
+ *mcr = (*mcr & ~(CG14_MCR_PIXMODE_MASK));
+ }
+}
+
+static void cg14_reset (struct fb_info_sbusfb *fb)
+{
+ volatile char *mcr = &fb->s.cg14.regs->mcr;
+
+ *mcr = (*mcr & ~(CG14_MCR_PIXMODE_MASK));
+}
+
+static int cg14_ioctl (struct fb_info_sbusfb *fb, unsigned int cmd, unsigned long arg)
+{
+ volatile char *mcr = &fb->s.cg14.regs->mcr;
+ struct mdi_cfginfo *mdii;
+ int mode;
+
+ switch (cmd) {
+ case MDI_RESET:
+ *mcr = (*mcr & ~CG14_MCR_PIXMODE_MASK);
+ break;
+ case MDI_GET_CFGINFO:
+ mdii = (struct mdi_cfginfo *)arg;
+ put_user_ret(FBTYPE_MDICOLOR, &mdii->mdi_type, -EFAULT);
+ __put_user_ret(fb->type.fb_height, &mdii->mdi_height, -EFAULT);
+ __put_user_ret(fb->type.fb_width, &mdii->mdi_width, -EFAULT);
+ __put_user_ret(fb->s.cg14.mode, &mdii->mdi_mode, -EFAULT);
+ __put_user_ret(72, &mdii->mdi_pixfreq, -EFAULT); /* FIXME */
+ __put_user_ret(fb->s.cg14.ramsize, &mdii->mdi_size, -EFAULT);
+ break;
+ case MDI_SET_PIXELMODE:
+ get_user_ret(mode, (int *)arg, -EFAULT);
+ switch (mode){
+ case MDI_32_PIX:
+ *mcr = (*mcr & ~CG14_MCR_PIXMODE_MASK) |
+ (CG14_MCR_PIXMODE_32 << CG14_MCR_PIXMODE_SHIFT);
+ break;
+ case MDI_16_PIX:
+ *mcr = (*mcr & ~CG14_MCR_PIXMODE_MASK) | 0x20;
+ break;
+ case MDI_8_PIX:
+ *mcr = (*mcr & ~CG14_MCR_PIXMODE_MASK);
+ break;
+ default:
+ return -ENOSYS;
+ }
+ fb->s.cg14.mode = mode;
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+__initfunc(static unsigned long get_phys(unsigned long addr))
+{
+ return __get_phys(addr);
+}
+
+__initfunc(static int get_iospace(unsigned long addr))
+{
+ return __get_iospace(addr);
+}
+
+static char idstring[60] __initdata = { 0 };
+
+__initfunc(char *cgfourteenfb_init(struct fb_info_sbusfb *fb))
+{
+ struct fb_fix_screeninfo *fix = &fb->fix;
+ struct display *disp = &fb->disp;
+ struct fbtype *type = &fb->type;
+ unsigned long rphys, phys;
+ u32 bases[6];
+ int is_8mb, i;
+
+#ifndef FBCON_HAS_CFB8
+ return NULL;
+#endif
+ prom_getproperty (fb->prom_node, "address", (char *) &bases[0], 8);
+ if (!bases[0]) {
+ printk("cg14 not mmaped\n");
+ return NULL;
+ }
+ if (get_iospace(bases[0]) != get_iospace(bases[1])) {
+ printk("Ugh. cg14 iospaces don't match\n");
+ return NULL;
+ }
+ fb->physbase = phys = get_phys(bases[1]);
+ rphys = get_phys(bases[0]);
+ fb->iospace = get_iospace(bases[0]);
+ fb->s.cg14.regs = (struct cg14_regs *)(unsigned long)bases[0];
+ fb->s.cg14.clut = (void *)((unsigned long)bases[0]+CG14_CLUT1);
+ fb->s.cg14.cursor = (void *)((unsigned long)bases[0]+CG14_CURSORREGS);
+ disp->screen_base = (char *)bases[1];
+
+ /* CG14_VCA_8MB_MASK is not correctly set on the 501-2482
+ * VSIMM, so we read the memory size from the PROM
+ */
+ prom_getproperty(fb->prom_node, "reg", (char *) &bases[0], 24);
+ is_8mb = bases[5] == 0x800000;
+
+ fb->mmap_map = kmalloc(sizeof(cg14_mmap_map), GFP_KERNEL);
+ if (!fb->mmap_map)
+ return NULL;
+
+ for (i = 0; ; i++) {
+ fb->mmap_map[i].voff = cg14_mmap_map[i].voff;
+ fb->mmap_map[i].poff = (cg14_mmap_map[i].poff & 0x80000000) ?
+ (cg14_mmap_map[i].poff & 0x7fffffff) + rphys - phys :
+ cg14_mmap_map[i].poff;
+ fb->mmap_map[i].size = cg14_mmap_map[i].size;
+ if (is_8mb && fb->mmap_map[i].size >= 0x100000 &&
+ fb->mmap_map[i].size <= 0x400000)
+ fb->mmap_map[i].size <<= 1;
+ if (!cg14_mmap_map[i].size)
+ break;
+ }
+
+ strcpy(fb->info.modename, "CGfourteen");
+ strcpy(fix->id, "CGfourteen");
+ fix->line_length = fb->var.xres_virtual;
+
+ disp->scrollmode = SCROLL_YREDRAW;
+ disp->screen_base += fix->line_length * fb->y_margin + fb->x_margin;
+ fb->dispsw = fbcon_cfb8;
+
+ type->fb_depth = 24;
+ fb->emulations[1] = FBTYPE_SUN3COLOR;
+
+ fb->margins = cg14_margins;
+ fb->loadcmap = cg14_loadcmap;
+ fb->setcursor = cg14_setcursor;
+ fb->setcursormap = cg14_setcursormap;
+ fb->setcurshape = cg14_setcurshape;
+ fb->reset = cg14_reset;
+ fb->switch_from_graph = cg14_switch_from_graph;
+ fb->ioctl = cg14_ioctl;
+
+ fb->s.cg14.mode = 8;
+ fb->s.cg14.ramsize = (is_8mb) ? 0x800000 : 0x400000;
+
+ cg14_reset(fb);
+
+ sprintf(idstring, "cgfourteen at %x.%08lx, %dMB, rev=%d, impl=%d", fb->iospace, phys,
+ is_8mb ? 8 : 4, fb->s.cg14.regs->rev >> 4, fb->s.cg14.regs->rev & 0xf);
+
+ return idstring;
+}
-/* $Id: cgsixfb.c,v 1.7 1998/07/22 12:44:59 jj Exp $
+/* $Id: cgsixfb.c,v 1.11 1998/09/04 15:43:42 jj Exp $
* cgsixfb.c: CGsix (GX,GXplus) frame buffer driver
*
* Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz)
* Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/selection.h>
-#include "sbusfb.h"
+#include <video/sbusfb.h>
#include <asm/io.h>
/* Offset of interesting structures in the OBIO space */
fbc->clip = 0;
fbc->pm = ~(0);
- if (p->fontheightlog) {
- y = sy << p->fontheightlog; h = height << p->fontheightlog;
+ if (fontheightlog(p)) {
+ y = sy << fontheightlog(p); h = height << fontheightlog(p);
} else {
- y = sy * p->fontheight; h = height * p->fontheight;
+ y = sy * fontheight(p); h = height * fontheight(p);
}
- if (p->fontwidthlog) {
- x = sx << p->fontwidthlog; w = width << p->fontwidthlog;
+ if (fontwidthlog(p)) {
+ x = sx << fontwidthlog(p); w = width << fontwidthlog(p);
} else {
- x = sx * p->fontwidth; w = width * p->fontwidth;
+ x = sx * fontwidth(p); w = width * fontwidth(p);
}
fbc->arecty = y + fb->y_margin;
fbc->arectx = x + fb->x_margin;
int i, x, y;
u8 *fd;
- if (p->fontheightlog) {
- y = fb->y_margin + (yy << p->fontheightlog);
- i = ((c & p->charmask) << p->fontheightlog);
+ if (fontheightlog(p)) {
+ y = fb->y_margin + (yy << fontheightlog(p));
+ i = ((c & p->charmask) << fontheightlog(p));
} else {
- y = fb->y_margin + (yy * p->fontheight);
- i = (c & p->charmask) * p->fontheight;
+ y = fb->y_margin + (yy * fontheight(p));
+ i = (c & p->charmask) * fontheight(p);
}
-#ifdef CONFIG_FBCON_FONTWIDTH8_ONLY
- fd = p->fontdata + i;
- x = fb->x_margin + xx * 8;
-#else
- if (p->fontwidth <= 8)
+ if (fontwidth(p) <= 8)
fd = p->fontdata + i;
else
fd = p->fontdata + (i << 1);
- if (p->fontwidthlog)
- x = fb->x_margin + (xx << p->fontwidthlog);
+ if (fontwidthlog(p))
+ x = fb->x_margin + (xx << fontwidthlog(p));
else
- x = fb->x_margin + (xx * p->fontwidth);
-#endif
+ x = fb->x_margin + (xx * fontwidth(p));
do {
i = fbc->s;
} while (i & 0x10000000);
fbc->incx = 0;
fbc->incy = 1;
fbc->x0 = x;
- fbc->x1 = x + p->fontwidth - 1;
+ fbc->x1 = x + fontwidth(p) - 1;
fbc->y0 = y;
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
- if (p->fontwidth <= 8) {
-#endif
- for (i = 0; i < p->fontheight; i++)
+ if (fontwidth(p) <= 8) {
+ for (i = 0; i < fontheight(p); i++)
fbc->font = *fd++ << 24;
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
} else {
- for (i = 0; i < p->fontheight; i++) {
+ for (i = 0; i < fontheight(p); i++) {
fbc->font = *(u16 *)fd << 16;
fd += 2;
}
}
-#endif
}
static void cg6_putcs(struct vc_data *conp, struct display *p, const unsigned short *s,
fbc->pm = 0xff;
x = fb->x_margin;
y = fb->y_margin;
-#ifdef CONFIG_FBCON_FONTWIDTH8_ONLY
- x += xx * 8;
-#else
- if (p->fontwidthlog)
- x += (xx << p->fontwidthlog);
+ if (fontwidthlog(p))
+ x += (xx << fontwidthlog(p));
else
- x += xx * p->fontwidth;
-#endif
- if (p->fontheightlog)
- y += (yy << p->fontheightlog);
+ x += xx * fontwidth(p);
+ if (fontheightlog(p))
+ y += (yy << fontheightlog(p));
else
- y += (yy * p->fontheight);
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
- if (p->fontwidth <= 8) {
-#endif
+ y += (yy * fontheight(p));
+ if (fontwidth(p) <= 8) {
while (count >= 4) {
count -= 4;
fbc->incx = 0;
fbc->incy = 1;
fbc->x0 = x;
- fbc->x1 = (x += 4 * p->fontwidth) - 1;
+ fbc->x1 = (x += 4 * fontwidth(p)) - 1;
fbc->y0 = y;
- if (p->fontheightlog) {
- fd1 = p->fontdata + ((*s++ & p->charmask) << p->fontheightlog);
- fd2 = p->fontdata + ((*s++ & p->charmask) << p->fontheightlog);
- fd3 = p->fontdata + ((*s++ & p->charmask) << p->fontheightlog);
- fd4 = p->fontdata + ((*s++ & p->charmask) << p->fontheightlog);
+ if (fontheightlog(p)) {
+ fd1 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
+ fd2 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
+ fd3 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
+ fd4 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
} else {
- fd1 = p->fontdata + ((*s++ & p->charmask) * p->fontheight);
- fd2 = p->fontdata + ((*s++ & p->charmask) * p->fontheight);
- fd3 = p->fontdata + ((*s++ & p->charmask) * p->fontheight);
- fd4 = p->fontdata + ((*s++ & p->charmask) * p->fontheight);
+ fd1 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
+ fd2 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
+ fd3 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
+ fd4 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
}
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
- if (p->fontwidth == 8) {
-#endif
- for (i = 0; i < p->fontheight; i++)
+ if (fontwidth(p) == 8) {
+ for (i = 0; i < fontheight(p); i++)
fbc->font = ((u32)*fd4++) | ((((u32)*fd3++) | ((((u32)*fd2++) | (((u32)*fd1++)
<< 8)) << 8)) << 8);
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
} else {
- for (i = 0; i < p->fontheight; i++)
+ for (i = 0; i < fontheight(p); i++)
fbc->font = (((u32)*fd4++) | ((((u32)*fd3++) | ((((u32)*fd2++) | (((u32)*fd1++)
- << p->fontwidth)) << p->fontwidth)) << p->fontwidth)) << (24 - 3 * p->fontwidth);
+ << fontwidth(p))) << fontwidth(p))) << fontwidth(p))) << (24 - 3 * fontwidth(p));
}
}
} else {
fbc->incx = 0;
fbc->incy = 1;
fbc->x0 = x;
- fbc->x1 = (x += 2 * p->fontwidth) - 1;
+ fbc->x1 = (x += 2 * fontwidth(p)) - 1;
fbc->y0 = y;
- if (p->fontheightlog) {
- fd1 = p->fontdata + ((*s++ & p->charmask) << (p->fontheightlog + 1));
- fd2 = p->fontdata + ((*s++ & p->charmask) << (p->fontheightlog + 1));
+ if (fontheightlog(p)) {
+ fd1 = p->fontdata + ((*s++ & p->charmask) << (fontheightlog(p) + 1));
+ fd2 = p->fontdata + ((*s++ & p->charmask) << (fontheightlog(p) + 1));
} else {
- fd1 = p->fontdata + (((*s++ & p->charmask) * p->fontheight) << 1);
- fd2 = p->fontdata + (((*s++ & p->charmask) * p->fontheight) << 1);
+ fd1 = p->fontdata + (((*s++ & p->charmask) * fontheight(p)) << 1);
+ fd2 = p->fontdata + (((*s++ & p->charmask) * fontheight(p)) << 1);
}
- for (i = 0; i < p->fontheight; i++) {
- fbc->font = ((((u32)*(u16 *)fd1) << p->fontwidth) | ((u32)*(u16 *)fd2)) << (16 - p->fontwidth);
+ for (i = 0; i < fontheight(p); i++) {
+ fbc->font = ((((u32)*(u16 *)fd1) << fontwidth(p)) | ((u32)*(u16 *)fd2)) << (16 - fontwidth(p));
fd1 += 2; fd2 += 2;
}
}
-#endif
}
while (count) {
count--;
fbc->incx = 0;
fbc->incy = 1;
fbc->x0 = x;
- fbc->x1 = (x += p->fontwidth) - 1;
+ fbc->x1 = (x += fontwidth(p)) - 1;
fbc->y0 = y;
- if (p->fontheightlog)
- i = ((*s++ & p->charmask) << p->fontheightlog);
+ if (fontheightlog(p))
+ i = ((*s++ & p->charmask) << fontheightlog(p));
else
- i = ((*s++ & p->charmask) * p->fontheight);
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
- if (p->fontwidth <= 8) {
-#endif
+ i = ((*s++ & p->charmask) * fontheight(p));
+ if (fontwidth(p) <= 8) {
fd1 = p->fontdata + i;
- for (i = 0; i < p->fontheight; i++)
+ for (i = 0; i < fontheight(p); i++)
fbc->font = *fd1++ << 24;
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
} else {
fd1 = p->fontdata + (i << 1);
- for (i = 0; i < p->fontheight; i++) {
+ for (i = 0; i < fontheight(p); i++) {
fbc->font = *(u16 *)fd1 << 16;
fd1 += 2;
}
}
-#endif
}
}
/* Not used if hw cursor */
}
-static void cg6_loadcmap (struct fb_info_sbusfb *fb, int index, int count)
+static void cg6_loadcmap (struct fb_info_sbusfb *fb, struct display *p, int index, int count)
{
struct bt_regs *bt = fb->s.cg6.bt;
int i;
static void cg6_reset (struct fb_info_sbusfb *fb)
{
unsigned int rev, conf;
+ struct cg6_tec *tec = fb->s.cg6.tec;
+ struct cg6_fbc *fbc = fb->s.cg6.fbc;
/* Turn off stuff in the Transform Engine. */
- fb->s.cg6.tec->tec_matrix = 0;
- fb->s.cg6.tec->tec_clip = 0;
- fb->s.cg6.tec->tec_vdc = 0;
+ tec->tec_matrix = 0;
+ tec->tec_clip = 0;
+ tec->tec_vdc = 0;
/* Take care of bugs in old revisions. */
rev = (*(fb->s.cg6.fhc) >> CG6_FHC_REV_SHIFT) & CG6_FHC_REV_MASK;
}
/* Set things in the FBC. */
- fb->s.cg6.fbc->mode &= ~(CG6_FBC_BLIT_MASK | CG6_FBC_MODE_MASK |
- CG6_FBC_DRAW_MASK | CG6_FBC_BWRITE0_MASK |
- CG6_FBC_BWRITE1_MASK | CG6_FBC_BREAD_MASK |
- CG6_FBC_BDISP_MASK);
- fb->s.cg6.fbc->mode |= (CG6_FBC_BLIT_SRC | CG6_FBC_MODE_COLOR8 |
- CG6_FBC_DRAW_RENDER | CG6_FBC_BWRITE0_ENABLE |
- CG6_FBC_BWRITE1_DISABLE | CG6_FBC_BREAD_0 |
- CG6_FBC_BDISP_0);
- fb->s.cg6.fbc->clip = 0;
- fb->s.cg6.fbc->offx = 0;
- fb->s.cg6.fbc->offy = 0;
- fb->s.cg6.fbc->clipminx = 0;
- fb->s.cg6.fbc->clipminy = 0;
- fb->s.cg6.fbc->clipmaxx = fb->type.fb_width - 1;
- fb->s.cg6.fbc->clipmaxy = fb->type.fb_height - 1;
+ fbc->mode &= ~(CG6_FBC_BLIT_MASK | CG6_FBC_MODE_MASK |
+ CG6_FBC_DRAW_MASK | CG6_FBC_BWRITE0_MASK |
+ CG6_FBC_BWRITE1_MASK | CG6_FBC_BREAD_MASK |
+ CG6_FBC_BDISP_MASK);
+ fbc->mode |= (CG6_FBC_BLIT_SRC | CG6_FBC_MODE_COLOR8 |
+ CG6_FBC_DRAW_RENDER | CG6_FBC_BWRITE0_ENABLE |
+ CG6_FBC_BWRITE1_DISABLE | CG6_FBC_BREAD_0 |
+ CG6_FBC_BDISP_0);
+ fbc->clip = 0;
+ fbc->offx = 0;
+ fbc->offy = 0;
+ fbc->clipminx = 0;
+ fbc->clipminy = 0;
+ fbc->clipmaxx = fb->type.fb_width - 1;
+ fbc->clipmaxy = fb->type.fb_height - 1;
/* Enable cursor in Brooktree DAC. */
fb->s.cg6.bt->addr = 0x06 << 24;
fb->s.cg6.bt->control |= 0x03 << 24;
unsigned long phys = fb->sbdp->reg_addrs[0].phys_addr;
u32 conf;
char *p;
+ struct bt_regs *bt;
strcpy(fb->info.modename, "CGsix");
sizeof(struct cg6_tec), "cgsix_tec", fb->iospace, 0);
fb->s.cg6.thc = (struct cg6_thc *)sparc_alloc_io(phys + CG6_THC_OFFSET, 0,
sizeof(struct cg6_thc), "cgsix_thc", fb->iospace, 0);
- fb->s.cg6.bt = (struct bt_regs *)sparc_alloc_io(phys + CG6_BROOKTREE_OFFSET, 0,
+ fb->s.cg6.bt = bt = (struct bt_regs *)sparc_alloc_io(phys + CG6_BROOKTREE_OFFSET, 0,
sizeof(struct bt_regs), "cgsix_dac", fb->iospace, 0);
fb->s.cg6.fhc = (u32 *)sparc_alloc_io(phys + CG6_FHC_OFFSET, 0,
sizeof(u32), "cgsix_fhc", fb->iospace, 0);
fb->mmap_map = cg6_mmap_map;
/* Initialize Brooktree DAC */
- fb->s.cg6.bt->addr = 0x04 << 24; /* color planes */
- fb->s.cg6.bt->control = 0xff << 24;
- fb->s.cg6.bt->addr = 0x05 << 24;
- fb->s.cg6.bt->control = 0x00 << 24;
- fb->s.cg6.bt->addr = 0x06 << 24; /* overlay plane */
- fb->s.cg6.bt->control = 0x73 << 24;
- fb->s.cg6.bt->addr = 0x07 << 24;
- fb->s.cg6.bt->control = 0x00 << 24;
+ bt->addr = 0x04 << 24; /* color planes */
+ bt->control = 0xff << 24;
+ bt->addr = 0x05 << 24;
+ bt->control = 0x00 << 24;
+ bt->addr = 0x06 << 24; /* overlay plane */
+ bt->control = 0x73 << 24;
+ bt->addr = 0x07 << 24;
+ bt->control = 0x00 << 24;
conf = *fb->s.cg6.fhc;
switch(conf & CG6_FHC_CPU_MASK) {
-/* $Id: cgthreefb.c,v 1.1 1998/07/21 14:50:47 jj Exp $
+/* $Id: cgthreefb.c,v 1.3 1998/09/04 15:43:43 jj Exp $
* cgthreefb.c: CGthree frame buffer driver
*
* Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz)
#include <linux/init.h>
#include <linux/selection.h>
-#include "sbusfb.h"
+#include <video/sbusfb.h>
#include <asm/io.h>
-#include "fbcon-cfb8.h"
+#include <video/fbcon-cfb8.h>
/* Control Register Constants */
#define CG3_CR_ENABLE_INTS 0x80
#define D4M3(x) ((((x)>>2)<<1) + ((x)>>2)) /* (x/4)*3 */
#define D4M4(x) ((x)&~0x3) /* (x/4)*4 */
-static void cg3_loadcmap (struct fb_info_sbusfb *fb, int index, int count)
+static void cg3_loadcmap (struct fb_info_sbusfb *fb, struct display *p, int index, int count)
{
struct bt_regs *bt = &fb->s.cg3.regs->cmap;
u32 *i;
#include <asm/adb.h>
#include <asm/pmu.h>
-#include "fbcon.h"
-#include "fbcon-cfb8.h"
-#include "fbcon-cfb16.h"
-#include "macmodes.h"
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
+#include <video/macmodes.h>
static int currcon = 0;
#ifdef CONFIG_PMAC_PBOOK
unsigned char *save_framebuffer;
#endif
+#ifdef FBCON_HAS_CFB16
+ u16 fbcon_cfb16_cmap[16];
+#endif
};
#define write_xr(num,val) { out_8(p->io_base + 0x3D6, num); out_8(p->io_base + 0x3D7, val); }
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc,
- chipsfb_getcolreg, info);
+ return fb_get_cmap(cmap, kspc, chipsfb_getcolreg, info);
if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc? 0: 2);
else
}
if (con == currcon)
- return fb_set_cmap(cmap, &disp->var, kspc, chipsfb_setcolreg,
- info);
+ return fb_set_cmap(cmap, kspc, chipsfb_setcolreg, info);
fb_copy_cmap(cmap, &disp->cmap, kspc==0);
return 0;
}
int bit_depth;
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&old_disp->cmap,
- &old_disp->var, 1, chipsfb_getcolreg,
- info);
+ fb_get_cmap(&old_disp->cmap, 1, chipsfb_getcolreg, info);
bit_depth = new_disp->var.bits_per_pixel;
if (old_disp->var.bits_per_pixel != bit_depth)
if (regno > 255)
return 1;
- *red = p->palette[regno].red;
- *green = p->palette[regno].green;
- *blue = p->palette[regno].blue;
+ *red = (p->palette[regno].red<<8) | p->palette[regno].red;
+ *green = (p->palette[regno].green<<8) | p->palette[regno].green;
+ *blue = (p->palette[regno].blue<<8) | p->palette[regno].blue;
+ *transp = 0;
return 0;
}
if (regno > 255)
return 1;
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
p->palette[regno].red = red;
p->palette[regno].green = green;
p->palette[regno].blue = blue;
out_8(p->io_base + 0x3c9, blue);
#ifdef FBCON_HAS_CFB16
- if (regno < 16)
- fbcon_cfb16_cmap[regno] = (red << 10) | (green << 5) | blue;
+ if (regno < 16)
+ p->fbcon_cfb16_cmap[regno] = (red << 10) | (green << 5) | blue;
#endif
return 0;
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- chipsfb_setcolreg, info);
- else
- fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel), &fb_display[con].var, 1,
- chipsfb_setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, chipsfb_setcolreg, info);
+ else {
+ int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
+ fb_set_cmap(fb_default_cmap(size), 1, chipsfb_setcolreg, info);
+ }
}
-#ifdef CONFIG_FB_COMPAT_XPMAC
-/* from drivers/macintosh/pmac-cons.h */
-#define VMODE_800_600_60 10 /* 800x600, 60Hz */
-#endif /* CONFIG_FB_COMPAT_XPMAC */
-
static void chips_set_bitdepth(struct fb_info_chips *p, struct display* disp, int con, int bpp)
{
int err;
#ifdef FBCON_HAS_CFB16
disp->dispsw = &fbcon_cfb16;
+ disp->dispsw_data = p->fbcon_cfb16_cmap;
#else
disp->dispsw = NULL;
#endif
{
int i;
- memset(&p->fix, 0, sizeof(p->fix));
strcpy(p->fix.id, "C&T 65550");
p->fix.smem_start = (char *) p->chips_base_phys;
p->fix.smem_len = 800 * 600;
p->fix.visual = FB_VISUAL_PSEUDOCOLOR;
p->fix.line_length = 800;
- memset(&p->var, 0, sizeof(p->var));
p->var.xres = 800;
p->var.yres = 600;
p->var.xres_virtual = 800;
p->var.upper_margin = p->var.lower_margin = 16;
p->var.hsync_len = p->var.vsync_len = 8;
- memset(&p->disp, 0, sizeof(p->disp));
p->disp.var = p->var;
p->disp.cmap.red = NULL;
p->disp.cmap.green = NULL;
p = kmalloc(sizeof(*p), GFP_ATOMIC);
if (p == 0)
return;
+ memset(p, 0, sizeof(*p));
addr = dp->addrs[0].address;
p->chips_base_phys = addr;
p->frame_buffer = __ioremap(addr+0x800000, 0x100000, _PAGE_NO_CACHE);
#include <asm/amigahw.h>
#include <asm/pgtable.h>
#include <asm/delay.h>
-#include "fbcon.h"
-#include "fbcon.h"
-#include "fbcon-mfb.h"
-#include "fbcon-cfb8.h"
-#include "fbcon-cfb16.h"
-#include "fbcon-cfb24.h"
-#include "fbcon-cfb32.h"
+#include <video/fbcon.h>
+#include <video/fbcon-mfb.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
+#include <video/fbcon-cfb24.h>
+#include <video/fbcon-cfb32.h>
#include "clgenfb.h"
#define arraysize(x) (sizeof(x)/sizeof(*(x)))
-/* zorro IDs */
-#define ZORRO_PROD_HELFRICH_SD64_RAM 0x08930A00
-#define ZORRO_PROD_HELFRICH_SD64_REG 0x08930B00
-#define ZORRO_PROD_HELFRICH_PICCOLO_RAM 0x08930500
-#define ZORRO_PROD_HELFRICH_PICCOLO_REG 0x08930600
-#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM 0x08770B00
-#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_REG 0x08770C00
-#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM 0x08910200
-#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_REG 0x08910100
-#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z3 0x08771800
-
/* board types */
#define BT_NONE 0
#define BT_SD64 1
unsigned char SFR; /* Shadow of special function register */
struct clgenfb_par currentmode;
+ union {
+#ifdef FBCON_HAS_CFB16
+ u16 cfb16[16];
+#endif
+#ifdef FBCON_HAS_CFB24
+ u32 cfb24[16];
+#endif
+#ifdef FBCON_HAS_CFB32
+ u32 cfb32[16];
+#endif
+ } fbcon_cmap;
};
static struct display disp;
struct fb_info_gen *info);
static int clgen_blank(int blank_mode, struct fb_info_gen *info);
-static struct display_switch *clgen_get_dispsw(const void *par,
- struct fb_info_gen *info);
+static void clgen_set_dispsw(const void *par, struct display *disp,
+ struct fb_info_gen *info);
/* function table of the above functions */
static struct fbgen_hwswitch clgen_hwswitch =
clgen_setcolreg,
clgen_pan_display,
clgen_blank,
- clgen_get_dispsw
+ clgen_set_dispsw
};
/* Text console acceleration */
case 8:
_par->line_length = _par->var.xres_virtual;
_par->visual = FB_VISUAL_PSEUDOCOLOR;
+ _par->var.red.offset = 0;
+ _par->var.red.length = 6;
+ _par->var.green.offset = 0;
+ _par->var.green.length = 6;
+ _par->var.blue.offset = 0;
+ _par->var.blue.length = 6;
break;
case 16:
_par->line_length = _par->var.xres_virtual * 2;
_par->visual = FB_VISUAL_DIRECTCOLOR;
+ _par->var.red.offset = 10;
+ _par->var.red.length = 5;
+ _par->var.green.offset = 5;
+ _par->var.green.length = 5;
+ _par->var.blue.offset = 0;
+ _par->var.blue.length = 5;
break;
case 24:
_par->line_length = _par->var.xres_virtual * 3;
_par->visual = FB_VISUAL_DIRECTCOLOR;
+ _par->var.red.offset = 16;
+ _par->var.red.length = 8;
+ _par->var.green.offset = 8;
+ _par->var.green.length = 8;
+ _par->var.blue.offset = 0;
+ _par->var.blue.length = 8;
break;
case 32:
_par->line_length = _par->var.xres_virtual * 4;
_par->visual = FB_VISUAL_DIRECTCOLOR;
+ _par->var.red.offset = 16;
+ _par->var.red.length = 8;
+ _par->var.green.offset = 8;
+ _par->var.green.length = 8;
+ _par->var.blue.offset = 0;
+ _par->var.blue.length = 8;
break;
}
+ _par->var.red.msb_right = 0;
+ _par->var.green.msb_right = 0;
+ _par->var.blue.msb_right = 0;
+ _par->var.transp.offset = 0;
+ _par->var.transp.length = 0;
+ _par->var.transp.msb_right = 0;
+
_par->type = FB_TYPE_PACKED_PIXELS;
/* convert from ps to kHz */
#if 0
/* restore first 2 color registers for mono mode */
WClut( 0, 0x00, 0x00, 0x00); /* background: black */
- WClut( 1, 0xff, 0xff, 0xff); /* foreground: white */
+ WClut( 1, 0x3f, 0x3f, 0x3f); /* foreground: white */
#endif
WGfx(GR5, 0); /* mode register */
{
unsigned char bred, bgreen, bblue;
- if (regno > 255 || regno < 0)
+ if (regno > 255)
return (1);
fb_info = (struct clgenfb_info *)info;
RClut(regno, &bred, &bgreen, &bblue);
- *red = (u_int)bred;
- *green = (u_int)bgreen;
- *blue = (u_int)bblue;
+ *red = (bred<<10) | (bred<<4) | (bred>>2);
+ *green = (bgreen<<10) | (bgreen<<4) | (bgreen>>2);
+ *blue = (bblue<<10) | (bblue<<4) | (bblue>>2);
*transp = 0;
return (0);
}
unsigned blue, unsigned transp,
struct fb_info *info)
{
- if (regno > 255 || regno < 0)
+ if (regno > 255)
return (1);
fb_info = (struct clgenfb_info *)info;
/* "transparent" stuff is completely ignored. */
- WClut(regno, (red & 0xff), (green & 0xff), (blue & 0xff));
+ WClut(regno, red>>10, green>>10, blue>>10);
return (0);
}
/* CLUT setup */
WClut( 0, 0x00, 0x00, 0x00); /* background: black */
- WClut( 1, 0xff, 0xff, 0xff); /* foreground: white */
- WClut( 2, 0x00, 0x80, 0x00);
- WClut( 3, 0x00, 0x80, 0x80);
- WClut( 4, 0x80, 0x00, 0x00);
- WClut( 5, 0x80, 0x00, 0x80);
- WClut( 6, 0x80, 0x40, 0x00);
- WClut( 7, 0x80, 0x80, 0x80);
- WClut( 8, 0x40, 0x40, 0x40);
- WClut( 9, 0x40, 0x40, 0xc0);
- WClut(10, 0x40, 0xc0, 0x40);
- WClut(11, 0x40, 0xc0, 0xc0);
- WClut(12, 0xc0, 0x40, 0x40);
- WClut(13, 0xc0, 0x40, 0xc0);
- WClut(14, 0xc0, 0xc0, 0x40);
- WClut(15, 0xc0, 0xc0, 0xc0);
+ WClut( 1, 0x3f, 0x3f, 0x3f); /* foreground: white */
+ WClut( 2, 0x00, 0x20, 0x00);
+ WClut( 3, 0x00, 0x20, 0x20);
+ WClut( 4, 0x20, 0x00, 0x00);
+ WClut( 5, 0x20, 0x00, 0x20);
+ WClut( 6, 0x20, 0x10, 0x00);
+ WClut( 7, 0x20, 0x20, 0x20);
+ WClut( 8, 0x10, 0x10, 0x10);
+ WClut( 9, 0x10, 0x10, 0x30);
+ WClut(10, 0x10, 0x30, 0x10);
+ WClut(11, 0x10, 0x30, 0x30);
+ WClut(12, 0x30, 0x10, 0x10);
+ WClut(13, 0x30, 0x10, 0x30);
+ WClut(14, 0x30, 0x30, 0x10);
+ WClut(15, 0x30, 0x30, 0x30);
/* the rest a grey ramp */
{
int i;
for (i = 16; i < 256; i++)
- WClut(i, i, i, i);
+ WClut(i, i>>2, i>>2, i>>2);
}
}
}
-static struct display_switch *clgen_get_dispsw(const void *par,
- struct fb_info_gen *info)
+static void clgen_set_dispsw(const void *par, struct display *disp,
+ struct fb_info_gen *info)
{
struct clgenfb_par *_par = (struct clgenfb_par*) par;
+ struct clgenfb_info *info2 = (struct clgenfb_info *)info;
printk("clgen_get_dispsw(): ");
switch (_par->var.bits_per_pixel)
#ifdef FBCON_HAS_MFB
case 1:
printk("monochrome\n");
- return &fbcon_mfb;
+ disp->dispsw = &fbcon_mfb;
+ break;
#endif
#ifdef FBCON_HAS_CFB8
case 8:
printk("8 bit color depth\n");
- return &fbcon_clgen_8;
+ disp->dispsw = &fbcon_clgen_8;
+ break;
#endif
#ifdef FBCON_HAS_CFB16
case 16:
printk("16 bit color depth\n");
- return &fbcon_cfb16;
+ disp->dispsw = &fbcon_cfb16;
+ disp->dispsw_data = info2->fbcon_cmap.cfb16;
+ break;
#endif
#ifdef FBCON_HAS_CFB24
case 24:
printk("24 bit color depth\n");
- return &fbcon_cfb24;
+ disp->dispsw = &fbcon_cfb24;
+ disp->dispsw_data = info2->fbcon_cmap.cfb24;
+ break;
#endif
#ifdef FBCON_HAS_CFB32
case 32:
printk("32 bit color depth\n");
- return &fbcon_cfb32;
+ disp->dispsw = &fbcon_cfb32;
+ disp->dispsw_data = info2->fbcon_cmap.cfb32;
+ break;
#endif
default:
printk("unsupported color depth\n");
- return NULL;
+ disp->dispsw = NULL;
+ break;
}
}
static void fbcon_clgen8_bmove(struct display *p, int sy, int sx,
int dy, int dx, int height, int width)
{
- sx *= p->fontwidth;
- sy *= p->fontheight;
- dx *= p->fontwidth;
- dy *= p->fontheight;
- width *= p->fontwidth;
- height *= p->fontheight;
+ sx *= fontwidth(p);
+ sy *= fontheight(p);
+ dx *= fontwidth(p);
+ dy *= fontheight(p);
+ width *= fontwidth(p);
+ height *= fontheight(p);
fb_info = (struct clgenfb_info*)p->fb_info;
fb_info = (struct clgenfb_info*)p->fb_info;
- sx *= p->fontwidth;
- sy *= p->fontheight;
- width *= p->fontwidth;
- height *= p->fontheight;
+ sx *= fontwidth(p);
+ sy *= fontheight(p);
+ width *= fontwidth(p);
+ height *= fontheight(p);
col = attr_bgcol_ec(p, conp);
col &= 0xff;
fb_info->regs[0x9000] = val;
}
-/*** WClut - set CLUT entry (range: 0..255 is automat. shifted to 0..63) ***/
+/*** WClut - set CLUT entry (range: 0..63) ***/
void WClut(unsigned char regnum, unsigned char red, unsigned char green, unsigned char blue)
{
unsigned int data = 0x3c9;
/* but DAC data register IS, at least for Picasso II */
if(fb_info->btype == BT_PICASSO)
data += 0xfff;
- fb_info->regs[data] = (red >> 2);
- fb_info->regs[data] = (green >> 2);
- fb_info->regs[data] = (blue >> 2);
+ fb_info->regs[data] = red;
+ fb_info->regs[data] = green;
+ fb_info->regs[data] = blue;
}
else
{
- fb_info->regs[data] = (blue >> 2);
- fb_info->regs[data] = (green >> 2);
- fb_info->regs[data] = (red >> 2);
+ fb_info->regs[data] = blue;
+ fb_info->regs[data] = green;
+ fb_info->regs[data] = red;
}
}
-/*** RClut - read CLUT entry and convert to 0..255 range ***/
+/*** RClut - read CLUT entry (range 0..63) ***/
void RClut(unsigned char regnum, unsigned char *red, unsigned char *green, unsigned char *blue)
{
unsigned int data = 0x3c9;
{
if(fb_info->btype == BT_PICASSO)
data += 0xfff;
- *red = fb_info->regs[data] << 2;
- *green = fb_info->regs[data] << 2;
- *blue = fb_info->regs[data] << 2;
+ *red = fb_info->regs[data];
+ *green = fb_info->regs[data];
+ *blue = fb_info->regs[data];
}
else
{
- *blue = fb_info->regs[data] << 2;
- *green = fb_info->regs[data] << 2;
- *red = fb_info->regs[data] << 2;
+ *blue = fb_info->regs[data];
+ *green = fb_info->regs[data];
+ *red = fb_info->regs[data];
}
}
#include <asm/adb.h>
#include <asm/cuda.h>
-#include "fbcon.h"
-#include "fbcon-cfb8.h"
-#include "fbcon-cfb16.h"
-#include "fbcon-cfb32.h"
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
+#include <video/fbcon-cfb32.h>
+#include <video/macmodes.h>
-#include "macmodes.h"
#include "controlfb.h"
static int currcon = 0;
int sense, control_use_bank2;
unsigned long total_vram;
+ union {
+#ifdef FBCON_HAS_CFB16
+ u16 cfb16[16];
+#endif
+#ifdef FBCON_HAS_CFB32
+ u32 cfb32[16];
+#endif
+ } fbcon_cmap;
};
/*
}
if ((var->activate & FB_ACTIVATE_MASK) != FB_ACTIVATE_NOW) {
- printk("Not activating, in control_set_var.\n");
+ /* printk("Not activating, in control_set_var.\n"); */
control_par_to_var(&par, var);
return 0;
}
p->var = disp->var = *var;
return 0;
}
-printk("Original bpp is %d, new bpp %d.\n", p->var.bits_per_pixel, var->bits_per_pixel);
+ /* printk("Original bpp is %d, new bpp %d.\n", p->var.bits_per_pixel, var->bits_per_pixel); */
/* OK, we're getting here at the right times... */
p->par = par;
control_par_to_var(&par, var);
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc,
- controlfb_getcolreg, info);
+ return fb_get_cmap(cmap, kspc, controlfb_getcolreg, info);
if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc? 0: 2);
else {
}
if (con == currcon)
- return fb_set_cmap(cmap, &disp->var, kspc, controlfb_setcolreg,
- info);
+ return fb_set_cmap(cmap, kspc, controlfb_setcolreg, info);
fb_copy_cmap(cmap, &disp->cmap, kspc ? 0 : 1);
return 0;
}
static int controlfb_switch(int con, struct fb_info *info)
{
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap,
- &fb_display[currcon].var, 1, controlfb_getcolreg,
+ fb_get_cmap(&fb_display[currcon].cmap, 1, controlfb_getcolreg,
info);
currcon = con;
#if 0
if (regno > 255)
return 1;
- *red = p->palette[regno].red;
- *green = p->palette[regno].green;
- *blue = p->palette[regno].blue;
+ *red = (p->palette[regno].red<<8) | p->palette[regno].red;
+ *green = (p->palette[regno].green<<8) | p->palette[regno].green;
+ *blue = (p->palette[regno].blue<<8) | p->palette[regno].blue;
+ *transp = 0;
return 0;
}
u_int transp, struct fb_info *info)
{
struct fb_info_control *p = (struct fb_info_control *) info;
+ int i;
- if (regno > 255 || regno < 0)
+ if (regno > 255)
return 1;
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
p->palette[regno].red = red;
p->palette[regno].green = green;
p->palette[regno].blue = blue;
out_8(&p->cmap_regs->lut, green); /* a time... */
out_8(&p->cmap_regs->lut, blue);
- if(regno < 16) {
-#if 0
+ if (regno < 16)
+ switch (p->var.bits_per_pixel) {
#ifdef FBCON_HAS_CFB16
- fbcon_cfb16_cmap[regno] = (red << 10) | (green << 5) | blue;
-#endif
-#ifdef FBCON_HAS_CFB32
- fbcon_cfb32_cmap[regno] = (red << 16) | (green << 8) | blue;
- /* I think. */
-#endif
+ case 16:
+#if 0
+ p->fbcon_cmap.cfb16[regno] = (red << 10) | (green << 5) | blue;
#else
-#ifdef FBCON_HAS_CFB16
- fbcon_cfb16_cmap[regno] = (regno << 10) | (regno << 5) | regno;
+ p->fbcon_cmap.cfb16[regno] = (regno << 10) | (regno << 5) | regno;
+#endif
+ break;
#endif
#ifdef FBCON_HAS_CFB32
- fbcon_cfb32_cmap[regno] = (regno << 24) | (regno << 16) | (regno << 8) | regno;
- /* I think. */
+ case 32:
+#if 0
+ p->fbcon_cmap.cfb32[regno] = (red << 16) | (green << 8) | blue;
+#else
+ i = (regno << 8) | regno;
+ p->fbcon_cmap.cfb32[regno] = (i << 16) | i;
+ /* I think */
#endif
+ break;
#endif
- }
+ }
return 0;
}
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- controlfb_setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, controlfb_setcolreg,
+ info);
else {
int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
- fb_set_cmap(fb_default_cmap(size), &fb_display[con].var, 1,
- controlfb_setcolreg, info);
+ fb_set_cmap(fb_default_cmap(size), 1, controlfb_setcolreg,
+ info);
}
}
struct fb_par_control *par = &p->par;
p->sense = read_control_sense(p);
- printk("Monitor sense value = 0x%x, ", p->sense);
+ printk(KERN_INFO "Monitor sense value = 0x%x, ", p->sense);
/* Try to pick a video mode out of NVRAM if we have one. */
par->vmode = nvram_read_byte(NV_VMODE);
if(par->vmode <= 0 || par->vmode > VMODE_MAX || !control_reg_init[par->vmode - 1])
}
control_set_hardware(p);
- printk("fb%d: control display adapter\n", GET_FB_IDX(p->info.node));
+ printk(KERN_INFO "fb%d: control display adapter\n", GET_FB_IDX(p->info.node));
}
/* Now how about actually saying, Make it so! */
out_le32(&p->control_regs->reg19.r, 0);
for (i = 0; i < 16; ++i) {
- controlfb_setcolreg(color_table[i], default_red[i], default_grn[i],
- default_blu[i], 0, (struct fb_info *)p);
+ controlfb_setcolreg(color_table[i], default_red[i]<<8,
+ default_grn[i]<<8, default_blu[i]<<8,
+ 0, (struct fb_info *)p);
}
/* Does the above need to be here each time? -- danj */
struct fb_info_control *p;
unsigned long addr, size;
int i, bank1, bank2;
-
+
+#if 0
if(dp->next != 0)
printk("Warning: only using first control display device.\n");
/* danj: I have a feeling this no longer applies - if we somehow *
- * had two of them, they'd be two framebuffers, right? */
- if(dp->n_addrs != 2)
- panic("expecting 2 address for control (got %d)", dp->n_addrs);
+ * had two of them, they'd be two framebuffers, right?
+ * Yep. - paulus
+ */
+#endif
+
+ if(dp->n_addrs != 2) {
+ printk(KERN_ERR "expecting 2 address for control (got %d)", dp->n_addrs);
+ return;
+ }
p = kmalloc(sizeof(*p), GFP_ATOMIC);
if (p == 0)
return;
+ memset(p, 0, sizeof(*p));
/* Map in frame buffer and registers */
for (i = 0; i < dp->n_addrs; ++i) {
#if 1
/* This routine takes a user-supplied var, and picks the best vmode/cmode from it. */
-static int control_var_to_par(struct fb_var_screeninfo *var,
+static int control_var_to_par(struct fb_var_screeninfo *var,
struct fb_par_control *par, const struct fb_info *fb_info)
{
int xres = var->xres;
}
#else
/* This routine takes a user-supplied var, and picks the best vmode/cmode from it. */
-static int control_var_to_par(struct fb_var_screeninfo *var,
+static int control_var_to_par(struct fb_var_screeninfo *var,
struct fb_par_control *par, const struct fb_info *fb_info)
{
struct fb_info_control *p = (struct fb_info_control *) fb_info;
p->fix.smem_len = control_vram_reqd(par->vmode, par->cmode);
/* Hmm, jonh used total_vram here. */
p->fix.visual = (par->cmode == CMODE_8) ?
- FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
+ FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR;
p->fix.line_length = par->vxres << par->cmode;
/* ywrapstep, xpanstep, ypanstep */
}
printk(KERN_ERR "Scroll mode not YREDRAW in control_par_to_display!!\n");
disp->scrollmode = SCROLL_YREDRAW;
}
- disp->dispsw = (par->cmode == CMODE_32) ? &fbcon_cfb32 :
- ((par->cmode == CMODE_16) ? &fbcon_cfb16 : &fbcon_cfb8);
+ switch (par->cmode) {
+#ifdef FBCON_HAS_CFB8
+ case CMODE_8:
+ disp->dispsw = &fbcon_cfb8;
+ break;
+#endif
+#ifdef FBCON_HAS_CFB16
+ case CMODE_16:
+ disp->dispsw = &fbcon_cfb16;
+ disp->dispsw_data = p->fbcon_cmap.cfb16;
+ break;
+#endif
+#ifdef FBCON_HAS_CFB32
+ case CMODE_32:
+ disp->dispsw = &fbcon_cfb32;
+ disp->dispsw_data = p->fbcon_cmap.cfb32;
+ break;
+#endif
+ default:
+ disp->dispsw = &fbcon_dummy;
+ break;
+ }
}
static void control_init_info(struct fb_info *info, struct fb_info_control *p)
-/* $Id: creatorfb.c,v 1.10 1998/07/25 22:54:37 davem Exp $
+/* $Id: creatorfb.c,v 1.15 1998/09/04 15:43:40 jj Exp $
* creatorfb.c: Creator/Creator3D frame buffer driver
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/selection.h>
-#include "sbusfb.h"
+#include <video/sbusfb.h>
#define FFB_SFB8R_VOFF 0x00000000
#define FFB_SFB8G_VOFF 0x00400000
#define FFB_PROM_POFF 0x00000000
#define FFB_EXP_POFF 0x00200000
-#define FFB_Y_BYTE_ADDR_SHIFT 11
-#define FFB_Y_ADDR_SHIFT 13
-
-#define FFB_PPC_ACE_DISABLE 1
-#define FFB_PPC_ACE_AUX_ADD 3
-#define FFB_PPC_ACE_SHIFT 18
-#define FFB_PPC_DCE_DISABLE 2
-#define FFB_PPC_DCE_SHIFT 16
-#define FFB_PPC_ABE_DISABLE 2
-#define FFB_PPC_ABE_SHIFT 14
-#define FFB_PPC_VCE_DISABLE 1
-#define FFB_PPC_VCE_2D 2
-#define FFB_PPC_VCE_SHIFT 12
-#define FFB_PPC_APE_DISABLE 2
-#define FFB_PPC_APE_SHIFT 10
-#define FFB_PPC_CS_VARIABLE 2
-#define FFB_PPC_CS_SHIFT 0
-
-#define FFB_FBC_WB_A 1
-#define FFB_FBC_WB_SHIFT 29
-#define FFB_FBC_PGE_MASK 3
-#define FFB_FBC_BE_SHIFT 4
-#define FFB_FBC_GE_SHIFT 2
-#define FFB_FBC_RE_SHIFT 0
+/* Draw operations */
+#define FFB_DRAWOP_DOT 0x00
+#define FFB_DRAWOP_AADOT 0x01
+#define FFB_DRAWOP_BRLINECAP 0x02
+#define FFB_DRAWOP_BRLINEOPEN 0x03
+#define FFB_DRAWOP_DDLINE 0x04
+#define FFB_DRAWOP_AALINE 0x05
+#define FFB_DRAWOP_TRIANGLE 0x06
+#define FFB_DRAWOP_POLYGON 0x07
+#define FFB_DRAWOP_RECTANGLE 0x08
+#define FFB_DRAWOP_FASTFILL 0x09
+#define FFB_DRAWOP_BCOPY 0x0a
+#define FFB_DRAWOP_VSCROLL 0x0b
+
+/* Pixel processor control */
+/* Force WID */
+#define FFB_PPC_FW_DISABLE 0x800000
+#define FFB_PPC_FW_ENABLE 0xc00000
+/* Auxiliary clip */
+#define FFB_PPC_ACE_DISABLE 0x040000
+#define FFB_PPC_ACE_AUX_SUB 0x080000
+#define FFB_PPC_ACE_AUX_ADD 0x0c0000
+/* Depth cue */
+#define FFB_PPC_DCE_DISABLE 0x020000
+#define FFB_PPC_DCE_ENABLE 0x030000
+/* Alpha blend */
+#define FFB_PPC_ABE_DISABLE 0x008000
+#define FFB_PPC_ABE_ENABLE 0x00c000
+/* View clip */
+#define FFB_PPC_VCE_DISABLE 0x001000
+#define FFB_PPC_VCE_2D 0x002000
+#define FFB_PPC_VCE_3D 0x003000
+/* Area pattern */
+#define FFB_PPC_APE_DISABLE 0x000800
+#define FFB_PPC_APE_ENABLE 0x000c00
+/* Transparent background */
+#define FFB_PPC_TBE_OPAQUE 0x000200
+#define FFB_PPC_TBE_TRANSPARENT 0x000300
+/* Z source */
+#define FFB_PPC_ZS_VAR 0x000080
+#define FFB_PPC_ZS_CONST 0x0000c0
+/* Y source */
+#define FFB_PPC_YS_VAR 0x000020
+#define FFB_PPC_YS_CONST 0x000030
+/* X source */
+#define FFB_PPC_XS_WID 0x000004
+#define FFB_PPC_XS_VAR 0x000008
+#define FFB_PPC_XS_CONST 0x00000c
+/* Color (BGR) source */
+#define FFB_PPC_CS_VAR 0x000002
+#define FFB_PPC_CS_CONST 0x000003
#define FFB_ROP_NEW 0x83
-#define FFB_ROP_RGB_SHIFT 0
#define FFB_UCSR_FIFO_MASK 0x00000fff
#define FFB_UCSR_RP_BUSY 0x02000000
struct ffb_fbc {
- u8 xxx1[0x60];
+ /* Next vertex registers */
+ u32 xxx1[3];
+ volatile u32 alpha;
+ volatile u32 red;
+ volatile u32 green;
+ volatile u32 blue;
+ volatile u32 depth;
+ volatile u32 y;
+ volatile u32 x;
+ u32 xxx2[2];
+ volatile u32 ryf;
+ volatile u32 rxf;
+ u32 xxx3[2];
+
+ volatile u32 dmyf;
+ volatile u32 dmxf;
+ u32 xxx4[2];
+ volatile u32 ebyi;
+ volatile u32 ebxi;
+ u32 xxx5[2];
volatile u32 by;
volatile u32 bx;
- u32 xxx2;
- u32 xxx3;
+ u32 dy;
+ u32 dx;
volatile u32 bh;
volatile u32 bw;
- u8 xxx4[0x188];
+ u32 xxx6[2];
+
+ u32 xxx7[32];
+
+ /* Setup unit vertex state register */
+ volatile u32 suvtx;
+ u32 xxx8[63];
+
+ /* Control registers */
volatile u32 ppc;
- u32 xxx5;
+ volatile u32 wid;
volatile u32 fg;
volatile u32 bg;
- u8 xxx6[0x44];
+ volatile u32 consty;
+ volatile u32 constz;
+ volatile u32 xclip;
+ volatile u32 dcss;
+ volatile u32 vclipmin;
+ volatile u32 vclipmax;
+ volatile u32 vclipzmin;
+ volatile u32 vclipzmax;
+ volatile u32 dcsf;
+ volatile u32 dcsb;
+ volatile u32 dczf;
+ volatile u32 dczb;
+
+ u32 xxx9;
+ volatile u32 blendc;
+ volatile u32 blendc1;
+ volatile u32 blendc2;
+ volatile u32 fbramitc;
volatile u32 fbc;
volatile u32 rop;
- u8 xxx7[0x34];
+ volatile u32 cmp;
+ volatile u32 matchab;
+ volatile u32 matchc;
+ volatile u32 magnab;
+ volatile u32 magnc;
+ volatile u32 fbcfg0;
+ volatile u32 fbcfg1;
+ volatile u32 fbcfg2;
+ volatile u32 fbcfg3;
+
+ u32 ppcfg;
+ volatile u32 pick;
+ volatile u32 fillmode;
+ volatile u32 fbramwac;
volatile u32 pmask;
- u8 xxx8[12];
+ volatile u32 xpmask;
+ volatile u32 ypmask;
+ volatile u32 zpmask;
volatile u32 clip0min;
volatile u32 clip0max;
volatile u32 clip1min;
volatile u32 clip2max;
volatile u32 clip3min;
volatile u32 clip3max;
- u8 xxx9[0x3c];
- volatile u32 unk1;
- volatile u32 unk2;
- u8 xxx10[0x10];
+
+ /* New 3dRAM III support regs */
+ volatile u32 rawblend2;
+ volatile u32 rawpreblend;
+ volatile u32 rawstencil;
+ volatile u32 rawstencilctl;
+ volatile u32 threedram1;
+ volatile u32 threedram2;
+ volatile u32 passin;
+ volatile u32 rawclrdepth;
+ volatile u32 rawpmask;
+ volatile u32 rawcsrc;
+ volatile u32 rawmatch;
+ volatile u32 rawmagn;
+ volatile u32 rawropblend;
+ volatile u32 rawcmp;
+ volatile u32 rawwac;
+ volatile u32 fbramid;
+
+ volatile u32 drawop;
+ u32 xxx10[2];
+ volatile u32 fontlpat;
+ u32 xxx11;
volatile u32 fontxy;
volatile u32 fontw;
volatile u32 fontinc;
volatile u32 font;
- u8 xxx11[0x4dc];
- volatile u32 unk3;
- u8 xxx12[0xfc];
+ u32 xxx12[3];
+ volatile u32 blend2;
+ volatile u32 preblend;
+ volatile u32 stencil;
+ volatile u32 stencilctl;
+
+ u32 xxx13[4];
+ volatile u32 dcss1;
+ volatile u32 dcss2;
+ volatile u32 dcss3;
+ volatile u32 widpmask;
+ volatile u32 dcs2;
+ volatile u32 dcs3;
+ volatile u32 dcs4;
+ u32 xxx14;
+ volatile u32 dcd2;
+ volatile u32 dcd3;
+ volatile u32 dcd4;
+ u32 xxx15;
+
+ volatile u32 pattern[32];
+
+ u32 xxx16[256];
+
+ volatile u32 devid;
+ u32 xxx17[63];
+
volatile u32 ucsr;
+ u32 xxx18[31];
+
+ volatile u32 mer;
};
struct ffb_dac {
{ 0, 0, 0 }
};
-static u32 ffb_cmap[16];
-
static void ffb_setup(struct display *p)
{
p->next_line = 8192;
register struct ffb_fbc *fbc = fb->s.ffb.fbc;
int x, y, w, h;
- fbc->ppc = 0x1803;
- fbc->fg = ffb_cmap[attr_bgcol_ec(p,conp)];
- fbc->fbc = 0x2000707f;
- fbc->rop = 0x83;
- fbc->pmask = 0xffffffff;
- fbc->unk2 = 8;
+ fbc->fg = ((u32 *)p->dispsw_data)[attr_bgcol_ec(p,conp)];
+ fbc->drawop = FFB_DRAWOP_RECTANGLE;
- if (p->fontheightlog) {
- y = sy << p->fontheightlog; h = height << p->fontheightlog;
+ if (fontheightlog(p)) {
+ y = sy << fontheightlog(p); h = height << fontheightlog(p);
} else {
- y = sy * p->fontheight; h = height * p->fontheight;
+ y = sy * fontheight(p); h = height * fontheight(p);
}
- if (p->fontwidthlog) {
- x = sx << p->fontwidthlog; w = width << p->fontwidthlog;
+ if (fontwidthlog(p)) {
+ x = sx << fontwidthlog(p); w = width << fontwidthlog(p);
} else {
- x = sx * p->fontwidth; w = width * p->fontwidth;
+ x = sx * fontwidth(p); w = width * fontwidth(p);
}
fbc->by = y + fb->y_margin;
fbc->bx = x + fb->x_margin;
{
register struct ffb_fbc *fbc = fb->s.ffb.fbc;
- fbc->ppc = 0x1803;
- fbc->fg = ffb_cmap[attr_bgcol(p,s)];
- fbc->fbc = 0x2000707f;
- fbc->rop = 0x83;
- fbc->pmask = 0xffffffff;
- fbc->unk2 = 8;
+ fbc->fg = ((u32 *)p->dispsw_data)[attr_bgcol(p,s)];
+ fbc->drawop = FFB_DRAWOP_RECTANGLE;
while (count-- > 0) {
fbc->by = boxes[1];
fbc->bx = boxes[0];
int i, xy;
u8 *fd;
- if (p->fontheightlog) {
- xy = (yy << (16 + p->fontheightlog));
- i = ((c & p->charmask) << p->fontheightlog);
+ if (fontheightlog(p)) {
+ xy = (yy << (16 + fontheightlog(p)));
+ i = ((c & p->charmask) << fontheightlog(p));
} else {
- xy = ((yy * p->fontheight) << 16);
- i = (c & p->charmask) * p->fontheight;
+ xy = ((yy * fontheight(p)) << 16);
+ i = (c & p->charmask) * fontheight(p);
}
-#ifdef CONFIG_FBCON_FONTWIDTH8_ONLY
- fd = p->fontdata + i;
- xy += (xx * 8) + fb->s.ffb.xy_margin;
-#else
- if (p->fontwidth <= 8)
+ if (fontwidth(p) <= 8)
fd = p->fontdata + i;
else
fd = p->fontdata + (i << 1);
- if (p->fontwidthlog)
- xy += (xx << p->fontwidthlog) + fb->s.ffb.xy_margin;
+ if (fontwidthlog(p))
+ xy += (xx << fontwidthlog(p)) + fb->s.ffb.xy_margin;
else
- xy += (xx * p->fontwidth) + fb->s.ffb.xy_margin;
-#endif
- fbc->ppc = 0x203;
- fbc->fg = ffb_cmap[attr_fgcol(p,c)];
- fbc->fbc = 0x2000707f;
- fbc->rop = 0x83;
- fbc->pmask = 0xffffffff;
- fbc->bg = ffb_cmap[attr_bgcol(p,c)];
- fbc->fontw = p->fontwidth;
+ xy += (xx * fontwidth(p)) + fb->s.ffb.xy_margin;
+ fbc->fg = ((u32 *)p->dispsw_data)[attr_fgcol(p,c)];
+ fbc->bg = ((u32 *)p->dispsw_data)[attr_bgcol(p,c)];
+ fbc->fontw = fontwidth(p);
fbc->fontinc = 0x10000;
fbc->fontxy = xy;
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
- if (p->fontwidth <= 8) {
-#endif
- for (i = 0; i < p->fontheight; i++)
+ if (fontwidth(p) <= 8) {
+ for (i = 0; i < fontheight(p); i++)
fbc->font = *fd++ << 24;
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
} else {
- for (i = 0; i < p->fontheight; i++) {
+ for (i = 0; i < fontheight(p); i++) {
fbc->font = *(u16 *)fd << 16;
fd += 2;
}
}
-#endif
}
static void ffb_putcs(struct vc_data *conp, struct display *p, const unsigned short *s,
int i, xy;
u8 *fd1, *fd2, *fd3, *fd4;
- fbc->ppc = 0x203;
- fbc->fg = ffb_cmap[attr_fgcol(p,*s)];
- fbc->fbc = 0x2000707f;
- fbc->rop = 0x83;
- fbc->pmask = 0xffffffff;
- fbc->bg = ffb_cmap[attr_bgcol(p,*s)];
+ fbc->fg = ((u32 *)p->dispsw_data)[attr_fgcol(p,*s)];
+ fbc->bg = ((u32 *)p->dispsw_data)[attr_bgcol(p,*s)];
xy = fb->s.ffb.xy_margin;
-#ifdef CONFIG_FBCON_FONTWIDTH8_ONLY
- xy += xx * 8;
-#else
- if (p->fontwidthlog)
- xy += (xx << p->fontwidthlog);
+ if (fontwidthlog(p))
+ xy += (xx << fontwidthlog(p));
else
- xy += xx * p->fontwidth;
-#endif
- if (p->fontheightlog)
- xy += (yy << (16 + p->fontheightlog));
+ xy += xx * fontwidth(p);
+ if (fontheightlog(p))
+ xy += (yy << (16 + fontheightlog(p)));
else
- xy += ((yy * p->fontheight) << 16);
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
- if (p->fontwidth <= 8) {
-#endif
+ xy += ((yy * fontheight(p)) << 16);
+ if (fontwidth(p) <= 8) {
while (count >= 4) {
count -= 4;
- fbc->fontw = 4 * p->fontwidth;
+ fbc->fontw = 4 * fontwidth(p);
fbc->fontinc = 0x10000;
fbc->fontxy = xy;
- if (p->fontheightlog) {
- fd1 = p->fontdata + ((*s++ & p->charmask) << p->fontheightlog);
- fd2 = p->fontdata + ((*s++ & p->charmask) << p->fontheightlog);
- fd3 = p->fontdata + ((*s++ & p->charmask) << p->fontheightlog);
- fd4 = p->fontdata + ((*s++ & p->charmask) << p->fontheightlog);
+ if (fontheightlog(p)) {
+ fd1 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
+ fd2 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
+ fd3 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
+ fd4 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
} else {
- fd1 = p->fontdata + ((*s++ & p->charmask) * p->fontheight);
- fd2 = p->fontdata + ((*s++ & p->charmask) * p->fontheight);
- fd3 = p->fontdata + ((*s++ & p->charmask) * p->fontheight);
- fd4 = p->fontdata + ((*s++ & p->charmask) * p->fontheight);
+ fd1 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
+ fd2 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
+ fd3 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
+ fd4 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
}
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
- if (p->fontwidth == 8) {
-#endif
- for (i = 0; i < p->fontheight; i++)
+ if (fontwidth(p) == 8) {
+ for (i = 0; i < fontheight(p); i++)
fbc->font = ((u32)*fd4++) | ((((u32)*fd3++) | ((((u32)*fd2++) | (((u32)*fd1++)
<< 8)) << 8)) << 8);
xy += 32;
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
} else {
- for (i = 0; i < p->fontheight; i++)
+ for (i = 0; i < fontheight(p); i++)
fbc->font = (((u32)*fd4++) | ((((u32)*fd3++) | ((((u32)*fd2++) | (((u32)*fd1++)
- << p->fontwidth)) << p->fontwidth)) << p->fontwidth)) << (24 - 3 * p->fontwidth);
- xy += 4 * p->fontwidth;
+ << fontwidth(p))) << fontwidth(p))) << fontwidth(p))) << (24 - 3 * fontwidth(p));
+ xy += 4 * fontwidth(p);
}
}
} else {
while (count >= 2) {
count -= 2;
- fbc->fontw = 2 * p->fontwidth;
+ fbc->fontw = 2 * fontwidth(p);
fbc->fontinc = 0x10000;
fbc->fontxy = xy;
- if (p->fontheightlog) {
- fd1 = p->fontdata + ((*s++ & p->charmask) << (p->fontheightlog + 1));
- fd2 = p->fontdata + ((*s++ & p->charmask) << (p->fontheightlog + 1));
+ if (fontheightlog(p)) {
+ fd1 = p->fontdata + ((*s++ & p->charmask) << (fontheightlog(p) + 1));
+ fd2 = p->fontdata + ((*s++ & p->charmask) << (fontheightlog(p) + 1));
} else {
- fd1 = p->fontdata + (((*s++ & p->charmask) * p->fontheight) << 1);
- fd2 = p->fontdata + (((*s++ & p->charmask) * p->fontheight) << 1);
+ fd1 = p->fontdata + (((*s++ & p->charmask) * fontheight(p)) << 1);
+ fd2 = p->fontdata + (((*s++ & p->charmask) * fontheight(p)) << 1);
}
- for (i = 0; i < p->fontheight; i++) {
- fbc->font = ((((u32)*(u16 *)fd1) << p->fontwidth) | ((u32)*(u16 *)fd2)) << (16 - p->fontwidth);
+ for (i = 0; i < fontheight(p); i++) {
+ fbc->font = ((((u32)*(u16 *)fd1) << fontwidth(p)) | ((u32)*(u16 *)fd2)) << (16 - fontwidth(p));
fd1 += 2; fd2 += 2;
}
- xy += 2 * p->fontwidth;
+ xy += 2 * fontwidth(p);
}
-#endif
}
while (count) {
count--;
- fbc->fontw = p->fontwidth;
+ fbc->fontw = fontwidth(p);
fbc->fontinc = 0x10000;
fbc->fontxy = xy;
- if (p->fontheightlog)
- i = ((*s++ & p->charmask) << p->fontheightlog);
+ if (fontheightlog(p))
+ i = ((*s++ & p->charmask) << fontheightlog(p));
else
- i = ((*s++ & p->charmask) * p->fontheight);
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
- if (p->fontwidth <= 8) {
-#endif
+ i = ((*s++ & p->charmask) * fontheight(p));
+ if (fontwidth(p) <= 8) {
fd1 = p->fontdata + i;
- for (i = 0; i < p->fontheight; i++)
+ for (i = 0; i < fontheight(p); i++)
fbc->font = *fd1++ << 24;
-#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
} else {
fd1 = p->fontdata + (i << 1);
- for (i = 0; i < p->fontheight; i++) {
+ for (i = 0; i < fontheight(p); i++) {
fbc->font = *(u16 *)fd1 << 16;
fd1 += 2;
}
}
-#endif
- xy += p->fontwidth;
+ xy += fontwidth(p);
}
}
/* Not used if hw cursor */
}
-static void ffb_loadcmap (struct fb_info_sbusfb *fb, int index, int count)
+static void ffb_loadcmap (struct fb_info_sbusfb *fb, struct display *p, int index, int count)
{
struct ffb_dac *dac = fb->s.ffb.dac;
int i, j = count;
dac->value = ((fb->color_map CM(i,0))) |
((fb->color_map CM(i,1)) << 8) |
((fb->color_map CM(i,2)) << 16);
+ if (!p)
+ return;
for (i = index, j = count; i < 16 && j--; i++)
- ffb_cmap[i] = ((fb->color_map CM(i,0))) |
- ((fb->color_map CM(i,1)) << 8) |
- ((fb->color_map CM(i,2)) << 16);
+ ((u32 *)p->dispsw_data)[i] = ((fb->color_map CM(i,0))) |
+ ((fb->color_map CM(i,1)) << 8) |
+ ((fb->color_map CM(i,2)) << 16);
}
static struct display_switch ffb_dispsw __initdata = {
ffb_curs_enable (fb, fb->cursor.enable);
}
+static void ffb_switch_from_graph (struct fb_info_sbusfb *fb)
+{
+ register struct ffb_fbc *fbc = fb->s.ffb.fbc;
+
+ fbc->ppc = FFB_PPC_VCE_DISABLE|FFB_PPC_TBE_OPAQUE|FFB_PPC_APE_DISABLE|FFB_PPC_CS_CONST;
+ fbc->fbc = 0x2000707f;
+ fbc->rop = FFB_ROP_NEW;
+ fbc->pmask = 0xffffffff;
+}
+
static char idstring[60] __initdata = { 0 };
__initfunc(char *creatorfb_init(struct fb_info_sbusfb *fb))
if (prom_getproperty(fb->prom_node, "reg", (void *) regs, sizeof(regs)) <= 0)
return NULL;
+ disp->dispsw_data = (void *)kmalloc(16 * sizeof(u32), GFP_KERNEL);
+ if (!disp->dispsw_data)
+ return NULL;
+ memset(disp->dispsw_data, 0, 16 * sizeof(u32));
+
strcpy(fb->info.modename, "Creator");
strcpy(fix->id, "Creator");
- fix->visual = FB_VISUAL_DIRECTCOLOR;
+ fix->visual = FB_VISUAL_TRUECOLOR;
fix->line_length = 8192;
fix->accel = FB_ACCEL_SUN_CREATOR;
fb->setcursor = ffb_setcursor;
fb->setcursormap = ffb_setcursormap;
fb->setcurshape = ffb_setcurshape;
+ fb->switch_from_graph = ffb_switch_from_graph;
fb->fill = ffb_fill;
+ ffb_switch_from_graph(fb);
+
fb->physbase = regs[0].phys_addr;
fb->mmap_map = ffb_mmap_map;
#include <asm/pgtable.h>
#include <asm/amigahw.h>
-#include "s3blit.h"
-#include "fbcon.h"
-#include "fbcon-cfb8.h"
-#include "fbcon-cfb16.h"
+#include <video/s3blit.h>
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
#ifdef CYBERFBDEBUG
static unsigned int CyberKey = 0;
-static unsigned char Cyber_colour_table [256][4];
+static unsigned char Cyber_colour_table [256][3];
static unsigned long CyberMem;
static unsigned long CyberSize;
static volatile char *CyberRegs;
Cyber_colour_table [i][0] = i;
Cyber_colour_table [i][1] = i;
Cyber_colour_table [i][2] = i;
- Cyber_colour_table [i][3] = 0;
}
/*
*(CursorBase+3+(i*4)) = 0xffff0000;
}
- Cyber_setcolreg (255, 56, 100, 160, 0, NULL /* unused */);
+ Cyber_setcolreg (255, 56<<8, 100<<8, 160<<8, 0, NULL /* unused */);
Cyber_setcolreg (254, 0, 0, 0, 0, NULL /* unused */);
return 0;
if (par->bpp == 8)
fix->visual = FB_VISUAL_PSEUDOCOLOR;
else
- fix->visual = FB_VISUAL_DIRECTCOLOR;
+ fix->visual = FB_VISUAL_TRUECOLOR;
fix->xpanstep = 0;
fix->ypanstep = 0;
/*
- * Set a single color register. The values supplied are already
- * rounded down to the hardware's capabilities (according to the
- * entries in the var structure). Return != 0 for invalid regno.
+ * Set a single color register. Return != 0 for invalid regno.
*/
static int Cyber_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
}
wb_64(0x3c8, (unsigned char) regno);
- Cyber_colour_table [regno][0] = red & 0xff;
- Cyber_colour_table [regno][1] = green & 0xff;
- Cyber_colour_table [regno][2] = blue & 0xff;
- Cyber_colour_table [regno][3] = transp;
+ red >>= 10;
+ green >>= 10;
+ blue >>= 10;
- wb_64(0x3c9, (red & 0xff) >> 2);
- wb_64(0x3c9, (green & 0xff) >> 2);
- wb_64(0x3c9, (blue & 0xff) >> 2);
+ Cyber_colour_table [regno][0] = red;
+ Cyber_colour_table [regno][1] = green;
+ Cyber_colour_table [regno][2] = blue;
+
+ wb_64(0x3c9, red);
+ wb_64(0x3c9, green);
+ wb_64(0x3c9, blue);
return (0);
}
static int Cyber_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
u_int *transp, struct fb_info *info)
{
+ int t;
+
if (regno >= 256)
return (1);
- *red = Cyber_colour_table [regno][0];
- *green = Cyber_colour_table [regno][1];
- *blue = Cyber_colour_table [regno][2];
- *transp = Cyber_colour_table [regno][3];
+ t = Cyber_colour_table [regno][0];
+ *red = (t<<10) | (t<<4) | (t>>2);
+ t = Cyber_colour_table [regno][1];
+ *green = (t<<10) | (t<<4) | (t>>2);
+ t = Cyber_colour_table [regno][2];
+ *blue = (t<<10) | (t<<4) | (t>>2);
+ *transp = 0;
return (0);
}
for (i = 0; i < 256; i++)
{
wb_64(0x3c8, (unsigned char) i);
- wb_64(0x3c9, Cyber_colour_table[i][0] >> 2);
- wb_64(0x3c9, Cyber_colour_table[i][1] >> 2);
- wb_64(0x3c9, Cyber_colour_table[i][2] >> 2);
+ wb_64(0x3c9, Cyber_colour_table[i][0]);
+ wb_64(0x3c9, Cyber_colour_table[i][1]);
+ wb_64(0x3c9, Cyber_colour_table[i][2]);
}
}
}
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- fbhw->setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, fbhw->setcolreg, info);
else
fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
- &fb_display[con].var, 1, fbhw->setcolreg, info);
+ 1, fbhw->setcolreg, info);
}
break;
#endif
default:
- display->dispsw = NULL;
+ display->dispsw = &fbcon_dummy;
break;
}
}
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return(fb_get_cmap(cmap, &fb_display[con].var,
- kspc, fbhw->getcolreg, info));
+ return(fb_get_cmap(cmap, kspc, fbhw->getcolreg, info));
else if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else
return(err);
}
if (con == currcon) /* current console? */
- return(fb_set_cmap(cmap, &fb_display[con].var,
- kspc, fbhw->setcolreg, info));
+ return(fb_set_cmap(cmap, kspc, fbhw->setcolreg, info));
else
fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
return(0);
{
/* Do we have to save the colormap? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1,
- fbhw->getcolreg, info);
+ fb_get_cmap(&fb_display[currcon].cmap, 1, fbhw->getcolreg,
+ info);
do_fb_set_var(&fb_display[con].var, 1);
currcon = con;
int dx, int height, int width)
{
sx *= 8; dx *= 8; width *= 8;
- Cyber_BitBLT((u_short)sx, (u_short)(sy*p->fontheight), (u_short)dx,
- (u_short)(dy*p->fontheight), (u_short)width,
- (u_short)(height*p->fontheight), (u_short)S3_NEW);
+ Cyber_BitBLT((u_short)sx, (u_short)(sy*fontheight(p)), (u_short)dx,
+ (u_short)(dy*fontheight(p)), (u_short)width,
+ (u_short)(height*fontheight(p)), (u_short)S3_NEW);
}
static void fbcon_cyber8_clear(struct vc_data *conp, struct display *p, int sy,
sx *= 8; width *= 8;
bg = attr_bgcol_ec(p,conp);
Cyber_RectFill((u_short)sx,
- (u_short)(sy*p->fontheight),
+ (u_short)(sy*fontheight(p)),
(u_short)width,
- (u_short)(height*p->fontheight),
+ (u_short)(height*fontheight(p)),
(u_short)S3_NEW,
(u_short)bg);
}
#include <linux/fb.h>
#include <linux/module.h>
-#include "fbcon-mfb.h"
+#include <video/fbcon-mfb.h>
/* apollo video HW definitions */
#ifdef FBCON_HAS_MFB
disp[con].dispsw = &fbcon_mfb;
#else
- disp[con].dispsw = NULL;
+ disp[con].dispsw = &fbcon_dummy;
#endif
}
struct fbgen_hwswitch *fbhw = info2->fbhw;
if (con == currcon) /* current console ? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc, fbhw->getcolreg,
- info);
+ return fb_get_cmap(cmap, kspc, fbhw->getcolreg, info);
else
if (fb_display[con].cmap.len) /* non default colormap ? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
return err;
}
if (con == currcon) /* current console ? */
- return fb_set_cmap(cmap, &fb_display[con].var, kspc, fbhw->setcolreg,
- info);
+ return fb_set_cmap(cmap, kspc, fbhw->setcolreg, info);
else
fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
return 0;
display->can_soft_blank = 1;
else
display->can_soft_blank = 0;
- display->dispsw = fbhw->get_dispsw(&par, info);
+ fbhw->set_dispsw(&par, display, info);
#if 0 /* FIXME: generic inverse is not supported yet */
display->inverse = (fix.visual == FB_VISUAL_MONO01 ? !inverse : inverse);
#else
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- fbhw->setcolreg, &info->info);
+ fb_set_cmap(&fb_display[con].cmap, 1, fbhw->setcolreg, &info->info);
else {
int size = fb_display[con].var.bits_per_pixel == 16 ? 64 : 256;
- fb_set_cmap(fb_default_cmap(size), &fb_display[con].var, 1,
- fbhw->setcolreg, &info->info);
+ fb_set_cmap(fb_default_cmap(size), 1, fbhw->setcolreg, &info->info);
}
}
/* Do we have to save the colormap ? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1,
- fbhw->getcolreg, &info2->info);
+ fb_get_cmap(&fb_display[currcon].cmap, 1, fbhw->getcolreg,
+ &info2->info);
fbgen_do_set_var(&fb_display[con].var, 1, info2);
currcon = con;
/* Install new colormap */
cmap.transp = NULL;
cmap.start = 0;
cmap.len = 16;
- fb_set_cmap(&cmap, &fb_display[currcon].var, 1, fbhw->setcolreg, info);
+ fb_set_cmap(&cmap, 1, fbhw->setcolreg, info);
} else
fbgen_install_cmap(currcon, info2);
}
--- /dev/null
+/* $Id: g364fb.c,v 1.3 1998/08/28 22:43:00 tsbogend Exp $
+ *
+ * linux/drivers/video/g364fb.c -- Mips Magnum frame buffer device
+ *
+ * (C) 1998 Thomas Bogendoerfer
+ *
+ * This driver is based on tgafb.c
+ *
+ * Copyright (C) 1997 Geert Uytterhoeven
+ * Copyright (C) 1995 Jay Estabrook
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive for
+ * more details.
+ */
+
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/tty.h>
+#include <linux/malloc.h>
+#include <linux/vmalloc.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/fb.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/selection.h>
+#include <linux/console.h>
+#include <asm/io.h>
+#include <asm/jazz.h>
+
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+
+/*
+ * Various defines for the G364
+ */
+#define G364_MEM_BASE 0xe4400000
+#define G364_PORT_BASE 0xe4000000
+#define ID_REG 0xe4000000 /* Read only */
+#define BOOT_REG 0xe4080000
+#define TIMING_REG 0xe4080108 /* to 0x080170 - DON'T TOUCH! */
+#define DISPLAY_REG 0xe4080118
+#define VDISPLAY_REG 0xe4080150
+#define MASK_REG 0xe4080200
+#define CTLA_REG 0xe4080300
+#define CURS_TOGGLE 0x800000
+#define BIT_PER_PIX 0x700000 /* bits 22 to 20 of Control A */
+#define DELAY_SAMPLE 0x080000
+#define PORT_INTER 0x040000
+#define PIX_PIPE_DEL 0x030000 /* bits 17 and 16 of Control A */
+#define PIX_PIPE_DEL2 0x008000 /* same as above - don't ask me why */
+#define TR_CYCLE_TOG 0x004000
+#define VRAM_ADR_INC 0x003000 /* bits 13 and 12 of Control A */
+#define BLANK_OFF 0x000800
+#define FORCE_BLANK 0x000400
+#define BLK_FUN_SWTCH 0x000200
+#define BLANK_IO 0x000100
+#define BLANK_LEVEL 0x000080
+#define A_VID_FORM 0x000040
+#define D_SYNC_FORM 0x000020
+#define FRAME_FLY_PAT 0x000010
+#define OP_MODE 0x000008
+#define INTL_STAND 0x000004
+#define SCRN_FORM 0x000002
+#define ENABLE_VTG 0x000001
+#define TOP_REG 0xe4080400
+#define CURS_PAL_REG 0xe4080508 /* to 0x080518 */
+#define CHKSUM_REG 0xe4080600 /* to 0x080610 - unused */
+#define CURS_POS_REG 0xe4080638
+#define CLR_PAL_REG 0xe4080800 /* to 0x080ff8 */
+#define CURS_PAT_REG 0xe4081000 /* to 0x081ff8 */
+#define MON_ID_REG 0xe4100000 /* unused */
+#define RESET_REG 0xe4180000 /* Write only */
+
+#define arraysize(x) (sizeof(x)/sizeof(*(x)))
+
+static int currcon = 0;
+static struct display disp;
+static struct fb_info fb_info;
+static struct { u_char red, green, blue, pad; } palette[256];
+
+static struct fb_fix_screeninfo fb_fix = { { "G364 8plane", } };
+static struct fb_var_screeninfo fb_var = { 0, };
+
+
+/*
+ * Interface used by the world
+ */
+static int g364fb_open(struct fb_info *info, int user);
+static int g364fb_release(struct fb_info *info, int user);
+static int g364fb_get_fix(struct fb_fix_screeninfo *fix, int con,
+ struct fb_info *info);
+static int g364fb_get_var(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info);
+static int g364fb_set_var(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info);
+static int g364fb_pan_display(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info);
+static int g364fb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
+ struct fb_info *info);
+static int g364fb_set_cmap(struct fb_cmap *cmap, int kspc, int con,
+ struct fb_info *info);
+static int g364fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
+ u_long arg, int con, struct fb_info *info);
+
+
+/*
+ * Interface to the low level console driver
+ */
+void g364fb_init(void);
+static int g364fbcon_switch(int con, struct fb_info *info);
+static int g364fbcon_updatevar(int con, struct fb_info *info);
+static void g364fbcon_blank(int blank, struct fb_info *info);
+
+
+/*
+ * Internal routines
+ */
+static int g364fb_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
+ u_int *transp, struct fb_info *info);
+static int g364fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+ u_int transp, struct fb_info *info);
+static void do_install_cmap(int con, struct fb_info *info);
+
+
+static struct fb_ops g364fb_ops = {
+ g364fb_open, g364fb_release, g364fb_get_fix, g364fb_get_var, g364fb_set_var,
+ g364fb_get_cmap, g364fb_set_cmap, g364fb_pan_display, g364fb_ioctl
+};
+
+
+void fbcon_g364fb_cursor(struct display *p, int mode, int x, int y)
+{
+ switch (mode) {
+ case CM_ERASE:
+ *(unsigned int *) CTLA_REG |= CURS_TOGGLE;
+ break;
+
+ case CM_MOVE:
+ case CM_DRAW:
+ *(unsigned int *) CTLA_REG &= ~CURS_TOGGLE;
+ *(unsigned int *) CURS_POS_REG = ((x * p->fontwidth) << 12) | ((y * p->fontheight)-p->var.yoffset);
+ break;
+ }
+}
+
+
+static struct display_switch fbcon_g364cfb8 = {
+ fbcon_cfb8_setup, fbcon_cfb8_bmove, fbcon_cfb8_clear, fbcon_cfb8_putc,
+ fbcon_cfb8_putcs, fbcon_cfb8_revc, fbcon_g364fb_cursor, NULL,
+ fbcon_cfb8_clear_margins, FONTWIDTH(8)
+};
+
+
+/*
+ * Open/Release the frame buffer device
+ */
+static int g364fb_open(struct fb_info *info, int user)
+{
+ /*
+ * Nothing, only a usage count for the moment
+ */
+ MOD_INC_USE_COUNT;
+ return(0);
+}
+
+static int g364fb_release(struct fb_info *info, int user)
+{
+ MOD_DEC_USE_COUNT;
+ return(0);
+}
+
+
+/*
+ * Get the Fixed Part of the Display
+ */
+static int g364fb_get_fix(struct fb_fix_screeninfo *fix, int con,
+ struct fb_info *info)
+{
+ memcpy(fix, &fb_fix, sizeof(fb_fix));
+ return 0;
+}
+
+
+/*
+ * Get the User Defined Part of the Display
+ */
+static int g364fb_get_var(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info)
+{
+ memcpy(var, &fb_var, sizeof(fb_var));
+ return 0;
+}
+
+
+/*
+ * Set the User Defined Part of the Display
+ */
+static int g364fb_set_var(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info)
+{
+ struct display *display;
+ int oldbpp = -1, err;
+
+ if (con >= 0)
+ display = &fb_display[con];
+ else
+ display = &disp; /* used during initialization */
+
+ if (var->xres > fb_var.xres || var->yres > fb_var.yres ||
+ var->xres_virtual > fb_var.xres_virtual ||
+ var->yres_virtual > fb_var.yres_virtual ||
+ var->bits_per_pixel > fb_var.bits_per_pixel ||
+ var->nonstd ||
+ (var->vmode & FB_VMODE_MASK) != FB_VMODE_NONINTERLACED)
+ return -EINVAL;
+ memcpy(var, &fb_var, sizeof(fb_var));
+
+ if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
+ oldbpp = display->var.bits_per_pixel;
+ display->var = *var;
+ *(unsigned int *)TOP_REG = var->yoffset * var->xres;
+ }
+ if (oldbpp != var->bits_per_pixel) {
+ if ((err = fb_alloc_cmap(&display->cmap, 0, 0)))
+ return err;
+ do_install_cmap(con, info);
+ }
+ return 0;
+}
+
+
+/*
+ * Pan or Wrap the Display
+ *
+ * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
+ */
+static int g364fb_pan_display(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info)
+{
+ if (var->xoffset || var->yoffset+var->yres > var->yres_virtual)
+ return -EINVAL;
+
+ *(unsigned int *)TOP_REG = var->yoffset * var->xres;
+ return 0;
+}
+
+/*
+ * Get the Colormap
+ */
+static int g364fb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
+ struct fb_info *info)
+{
+ if (con == currcon) /* current console? */
+ return fb_get_cmap(cmap, kspc, g364fb_getcolreg, info);
+ else if (fb_display[con].cmap.len) /* non default colormap? */
+ fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+ else
+ fb_copy_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
+ cmap, kspc ? 0 : 2);
+ return 0;
+}
+
+/*
+ * Set the Colormap
+ */
+static int g364fb_set_cmap(struct fb_cmap *cmap, int kspc, int con,
+ struct fb_info *info)
+{
+ int err;
+
+ if (!fb_display[con].cmap.len) { /* no colormap allocated? */
+ if ((err = fb_alloc_cmap(&fb_display[con].cmap,
+ 1<<fb_display[con].var.bits_per_pixel, 0)))
+ return err;
+ }
+ if (con == currcon) { /* current console? */
+ return fb_set_cmap(cmap, kspc, g364fb_setcolreg, info);
+ } else
+ fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
+ return 0;
+}
+
+
+static int g364fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
+ u_long arg, int con, struct fb_info *info)
+{
+ return -EINVAL;
+}
+
+
+/*
+ * Initialisation
+ */
+__initfunc(void g364fb_init(void))
+{
+ int i,j;
+ volatile unsigned int *pal_ptr = (volatile unsigned int *) CLR_PAL_REG;
+ volatile unsigned int *curs_pal_ptr = (volatile unsigned int *) CURS_PAL_REG;
+ unsigned int xres, yres;
+ int mem;
+
+ /* TBD: G364 detection */
+
+ /* get the resolution set by ARC console */
+ *(volatile unsigned int *)CTLA_REG &= ~ENABLE_VTG;
+ xres = (*((volatile unsigned int*)DISPLAY_REG) & 0x00ffffff) * 4;
+ yres = (*((volatile unsigned int*)VDISPLAY_REG) & 0x00ffffff) / 2;
+ *(volatile unsigned int *)CTLA_REG |= ENABLE_VTG;
+
+ /* initialise color palette */
+ for (i = 0; i < 16; i++) {
+ j = color_table[i];
+ palette[i].red=default_red[j];
+ palette[i].green=default_grn[j];
+ palette[i].blue=default_blu[j];
+ pal_ptr[i << 1] = (palette[i].red << 16) | (palette[i].green << 8) | palette[i].blue;
+ }
+
+ /* setup cursor */
+ curs_pal_ptr[0] |= 0x00ffffff;
+ curs_pal_ptr[2] |= 0x00ffffff;
+ curs_pal_ptr[4] |= 0x00ffffff;
+
+ /*
+ * first set the whole cursor to transparent
+ */
+ for (i = 0; i < 512; i++)
+ *(unsigned short *)(CURS_PAT_REG+i*8) = 0;
+
+ /*
+ * switch the last two lines to cursor palette 3
+ * we assume here, that FONTSIZE_X is 8
+ */
+ *(unsigned short *)(CURS_PAT_REG + 14*64) = 0xffff;
+ *(unsigned short *)(CURS_PAT_REG + 15*64) = 0xffff;
+
+ fb_var.bits_per_pixel = 8;
+ fb_var.xres = fb_var.xres_virtual = xres;
+ fb_var.yres = yres;
+
+ fb_fix.line_length = (xres / 8) * fb_var.bits_per_pixel;
+ fb_fix.smem_start = (char *)0x40000000; /* physical address */
+ /* get size of video memory; this is special for the JAZZ hardware */
+ mem = (r4030_read_reg32(JAZZ_R4030_CONFIG) >> 8) & 3;
+ fb_fix.smem_len = (1 << (mem*2)) * 512 * 1024;
+ fb_fix.type = FB_TYPE_PACKED_PIXELS;
+ fb_fix.type_aux = 0;
+ fb_fix.visual = FB_VISUAL_PSEUDOCOLOR;
+ fb_fix.xpanstep = 0;
+ fb_fix.ypanstep = 1;
+ fb_fix.ywrapstep = 0;
+ fb_fix.mmio_start = NULL;
+ fb_fix.mmio_len = 0;
+ fb_fix.accel = FB_ACCEL_NONE;
+
+ fb_var.yres_virtual = fb_fix.smem_len / xres;
+ fb_var.xoffset = fb_var.yoffset = 0;
+ fb_var.grayscale = 0;
+
+ fb_var.red.offset = 0;
+ fb_var.green.offset = 0;
+ fb_var.blue.offset = 0;
+
+ fb_var.red.length = fb_var.green.length = fb_var.blue.length = 8;
+ fb_var.red.msb_right = fb_var.green.msb_right = fb_var.blue.msb_right = 0;
+ fb_var.transp.offset = fb_var.transp.length = fb_var.transp.msb_right = 0;
+ fb_var.nonstd = 0;
+ fb_var.activate = 0;
+ fb_var.height = fb_var.width = -1;
+ fb_var.accel_flags = 0;
+ fb_var.pixclock = 39722;
+ fb_var.left_margin = 40;
+ fb_var.right_margin = 24;
+ fb_var.upper_margin = 32;
+ fb_var.lower_margin = 11;
+ fb_var.hsync_len = 96;
+ fb_var.vsync_len = 2;
+ fb_var.sync = 0;
+ fb_var.vmode = FB_VMODE_NONINTERLACED;
+
+ disp.var = fb_var;
+ disp.cmap.start = 0;
+ disp.cmap.len = 0;
+ disp.cmap.red = disp.cmap.green = disp.cmap.blue = disp.cmap.transp = NULL;
+ disp.screen_base = (char *)G364_MEM_BASE; /* virtual kernel address */
+ disp.visual = fb_fix.visual;
+ disp.type = fb_fix.type;
+ disp.type_aux = fb_fix.type_aux;
+ disp.ypanstep = fb_fix.ypanstep;
+ disp.ywrapstep = fb_fix.ywrapstep;
+ disp.line_length = fb_fix.line_length;
+ disp.can_soft_blank = 1;
+ disp.inverse = 0;
+ disp.dispsw = &fbcon_g364cfb8;
+
+ strcpy(fb_info.modename, fb_fix.id);
+ fb_info.node = -1;
+ fb_info.fbops = &g364fb_ops;
+ fb_info.disp = &disp;
+ fb_info.fontname[0] = '\0';
+ fb_info.changevar = NULL;
+ fb_info.switch_con = &g364fbcon_switch;
+ fb_info.updatevar = &g364fbcon_updatevar;
+ fb_info.blank = &g364fbcon_blank;
+
+ g364fb_set_var(&fb_var, -1, &fb_info);
+
+ if (register_framebuffer(&fb_info) < 0)
+ return;
+
+ printk("fb%d: %s frame buffer device\n", GET_FB_IDX(fb_info.node),
+ fb_fix.id);
+}
+
+
+static int g364fbcon_switch(int con, struct fb_info *info)
+{
+ /* Do we have to save the colormap? */
+ if (fb_display[currcon].cmap.len)
+ fb_get_cmap(&fb_display[currcon].cmap, 1, g364fb_getcolreg, info);
+
+ currcon = con;
+ /* Install new colormap */
+ do_install_cmap(con, info);
+ g364fbcon_updatevar(con, info);
+ return 0;
+}
+
+/*
+ * Update the `var' structure (called by fbcon.c)
+ */
+static int g364fbcon_updatevar(int con, struct fb_info *info)
+{
+ if (con == currcon) {
+ struct fb_var_screeninfo *var = &fb_display[currcon].var;
+
+ /* hardware scrolling */
+ *(unsigned int *)TOP_REG = var->yoffset * var->xres;
+ }
+ return 0;
+}
+
+/*
+ * Blank the display.
+ */
+static void g364fbcon_blank(int blank, struct fb_info *info)
+{
+ if (blank)
+ *(unsigned int *) CTLA_REG |= FORCE_BLANK;
+ else
+ *(unsigned int *) CTLA_REG &= ~FORCE_BLANK;
+}
+
+/*
+ * Read a single color register and split it into
+ * colors/transparent. Return != 0 for invalid regno.
+ */
+static int g364fb_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
+ u_int *transp, struct fb_info *info)
+{
+ if (regno > 255)
+ return 1;
+ *red = (palette[regno].red << 8) | palette[regno].red;
+ *green = (palette[regno].green << 8) | palette[regno].green;
+ *blue = (palette[regno].blue << 8) | palette[regno].blue;
+ *transp = 0;
+ return 0;
+}
+
+/*
+ * Set a single color register. Return != 0 for invalid regno.
+ */
+static int g364fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+ u_int transp, struct fb_info *info)
+{
+ volatile unsigned int *ptr = (volatile unsigned int *) CLR_PAL_REG;
+
+ if (regno > 255)
+ return 1;
+
+ red >> = 8;
+ green >>= 8;
+ blue >>=8;
+ palette[regno].red = red;
+ palette[regno].green = green;
+ palette[regno].blue = blue;
+
+ ptr[regno << 1] = (red << 16) | (green << 8) | blue;
+
+ return 0;
+}
+
+
+static void do_install_cmap(int con, struct fb_info *info)
+{
+ if (con != currcon)
+ return;
+ if (fb_display[con].cmap.len)
+ fb_set_cmap(&fb_display[con].cmap, 1, g364fb_setcolreg, info);
+ else
+ fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel), 1,
+ g364fb_setcolreg, info);
+}
#include <asm/blinken.h>
#include <asm/hwtest.h>
-#include "fbcon-mfb.h"
-#include "fbcon-cfb2.h"
-#include "fbcon-cfb4.h"
-#include "fbcon-cfb8.h"
+#include <video/fbcon-mfb.h>
+#include <video/fbcon-cfb2.h>
+#include <video/fbcon-cfb4.h>
+#include <video/fbcon-cfb8.h>
#define arraysize(x) (sizeof(x)/sizeof(*(x)))
--- /dev/null
+/*
+ * drivers/video/imsttfb.c -- frame buffer device for IMS Twin Turbo
+ *
+ * This file is derived from the powermac console "imstt" driver:
+ * Copyright (C) 1997 Sigurdur Asgeirsson
+ * With additional hacking by Jeffrey Kuskin (jsk@mojave.stanford.edu)
+ * Modified by Danilo Beuche 1998
+ * Some register values added by Damien Doligez, INRIA Rocquencourt
+ *
+ * This file was written by Ryan Nielsen (ran@krazynet.com)
+ * Most of the frame buffer device stuff was copied from atyfb.c
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive for
+ * more details.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/tty.h>
+#include <linux/malloc.h>
+#include <linux/vmalloc.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/fb.h>
+#include <linux/selection.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+
+#if defined(CONFIG_PMAC) || defined(CONFIG_CHRP)
+#include <linux/nvram.h>
+#include <asm/prom.h>
+#include <asm/pci-bridge.h>
+#include <video/macmodes.h>
+#endif
+
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
+#include <video/fbcon-cfb24.h>
+#include <video/fbcon-cfb32.h>
+
+#ifndef __powerpc__
+#define eieio() /* Enforce In-order Execution of I/O */
+#endif
+
+enum {
+ IBM = 0x00,
+ TVP = 0x01
+};
+
+/* TwinTurbo registers */
+enum {
+ S1SA = 0, /* 0x00 */
+ S2SA = 1, /* 0x04 */
+ SP = 2, /* 0x08 */
+ DSA = 3, /* 0x0C */
+ CNT = 4, /* 0x10 */
+ DP_OCTRL= 5, /* 0x14 */
+ BI = 8, /* 0x20 */
+ MBC = 9, /* 0x24 */
+ BLTCTL = 10, /* 0x28 */
+
+ /* Scan Timing Generator Registers */
+ HES = 12, /* 0x30 */
+ HEB = 13, /* 0x34 */
+ HSB = 14, /* 0x38 */
+ HT = 15, /* 0x3C */
+ VES = 16, /* 0x40 */
+ VEB = 17, /* 0x44 */
+ VSB = 18, /* 0x48 */
+ VT = 19, /* 0x4C */
+ HCIV = 20, /* 0x50 */
+ VCIV = 21, /* 0x54 */
+ TCDR = 22, /* 0x58 */
+ VIL = 23, /* 0x5C */
+ STGCTL = 24, /* 0x60 */
+
+ /* Screen Refresh Generator Registers */
+ SSR = 25, /* 0x64 */
+ HRIR = 26, /* 0x68 */
+ SPR = 27, /* 0x6C */
+ CMR = 28, /* 0x70 */
+ SRGCTL = 29, /* 0x74 */
+
+ /* RAM Refresh Generator Registers */
+ RRCIV = 30, /* 0x78 */
+ RRSC = 31, /* 0x7C */
+ RRCR = 34, /* 0x88 */
+
+ /* System Registers */
+ GIOE = 32, /* 0x80 */
+ GIO = 33, /* 0x84 */
+ SCR = 35, /* 0x8C */
+ SSTATUS = 36, /* 0x90 */
+ PRC = 37, /* 0x94 */
+
+#if 0
+ /* PCI Registers */
+ DVID = 0x00000000L,
+ SC = 0x00000004L,
+ CCR = 0x00000008L,
+ OG = 0x0000000CL,
+ BARM = 0x00000010L,
+ BARER = 0x00000030L,
+#endif
+};
+
+/* IBM ramdac registers */
+enum {
+ PADDRW = 0x00,
+ PDATA = 0x04,
+ PPMASK = 0x08,
+ PADDRR = 0x0C,
+ PIDXLO = 0x10,
+ PIDXHI = 0x14,
+ PIDXDATA= 0x18,
+ PIDXCTL = 0x1C,
+
+ PPIXREP = 0x0A,
+ PM0 = 0x20,
+ PN0 = 0x21,
+ PP0 = 0x22,
+ PC0 = 0x23,
+ MCTL_3 = 0x72
+};
+
+/* TI TVP 3030 RAMDAC Direct Registers */
+enum {
+ TVPADDRW = 0x00, /* 0 Palette/Cursor RAM Write Adress/Index */
+ TVPPDATA = 0x04, /* 1 Palette Data RAM Data */
+ TVPPMASK = 0x08, /* 2 Pixel Read-Mask */
+ TVPPADRR = 0x0c, /* 3 Palette/Cursor RAM Read Adress */
+ TVPCADRW = 0x10, /* 4 Cursor/Overscan Color Write Address */
+ TVPCDATA = 0x14, /* 5 Cursor/Overscan Color Data */
+ /* 6 reserved */
+ TVPCADRR = 0x1c, /* 7 Cursor/Overscan Color Read Address */
+ /* 8 reserved */
+ TVPDCCTL = 0x24, /* 9 Direct Cursor Control */
+ TVPIDATA = 0x28, /* 10 Index Data */
+ TVPCRDAT = 0x2c, /* 11 Cursor RAM Data */
+ TVPCXPOL = 0x30, /* 12 Cursor-Position X LSB */
+ TVPCXPOH = 0x34, /* 13 Cursor-Position X MSB */
+ TVPCYPOL = 0x38, /* 14 Cursor-Position Y LSB */
+ TVPCYPOH = 0x3c, /* 15 Cursor-Position Y MSB */
+};
+
+/* TI TVP 3030 RAMDAC Indirect Registers */
+enum {
+ TVPIRREV = 0x01, /* Silicon Revision [RO] */
+ TVPIRICC = 0x06, /* Indirect Cursor Control (0x00) */
+ TVPIRBRC = 0x07, /* Byte Router Control (0xe4) */
+ TVPIRLAC = 0x0f, /* Latch Control (0x06) */
+ TVPIRTCC = 0x18, /* True Color Control (0x80) */
+ TVPIRMXC = 0x19, /* Multiplex Control (0x98) */
+ TVPIRCLS = 0x1a, /* Clock Selection (0x07) */
+ TVPIRPPG = 0x1c, /* Palette Page (0x00) */
+ TVPIRGEC = 0x1d, /* General Control (0x00) */
+ TVPIRMIC = 0x1e, /* Miscellaneous Control (0x00) */
+ TVPIRPLA = 0x2c, /* PLL Address */
+ TVPIRPPD = 0x2d, /* Pixel Clock PLL Data */
+ TVPIRMPD = 0x2e, /* Memory Clock PLL Data */
+ TVPIRLPD = 0x2f, /* Loop Clock PLL Data */
+ TVPIRCKL = 0x30, /* Color-Key Overlay Low */
+ TVPIRCKH = 0x31, /* Color-Key Overlay High */
+ TVPIRCRL = 0x32, /* Color-Key Red Low */
+ TVPIRCRH = 0x33, /* Color-Key Red High */
+ TVPIRCGL = 0x34, /* Color-Key Green Low */
+ TVPIRCGH = 0x35, /* Color-Key Green High */
+ TVPIRCBL = 0x36, /* Color-Key Blue Low */
+ TVPIRCBH = 0x37, /* Color-Key Blue High */
+ TVPIRCKC = 0x38, /* Color-Key Control (0x00) */
+ TVPIRMLC = 0x39, /* MCLK/Loop Clock Control (0x18) */
+ TVPIRSEN = 0x3a, /* Sense Test (0x00) */
+ TVPIRTMD = 0x3b, /* Test Mode Data */
+ TVPIRRML = 0x3c, /* CRC Remainder LSB [RO] */
+ TVPIRRMM = 0x3d, /* CRC Remainder MSB [RO] */
+ TVPIRRMS = 0x3e, /* CRC Bit Select [WO] */
+ TVPIRDID = 0x3f, /* Device ID [RO] (0x30) */
+ TVPIRRES = 0xff /* Software Reset [WO] */
+};
+
+struct initvalues {
+ __u8 addr, value;
+};
+
+static struct initvalues ibm_initregs[] = {
+ { 0x02, 0x21 }, /* (0x01) Miscellaneous Clock Control */
+ { 0x03, 0x00 }, /* (0x00) Sync Control */
+ { 0x04, 0x00 }, /* (0x00) Horizontal Sync Position */
+ { 0x05, 0x00 }, /* (0x00) Power Management */
+ { 0x06, 0x03 }, /* (0x02) DAC Operation */
+ { 0x07, 0x00 }, /* (0x00) Palette Control */
+ { 0x08, 0x01 }, /* (0x01) System Clock Control */
+
+ /*
+ * Note that colors in X are correct only if all video data is
+ * passed through the palette in the DAC. That is, "indirect
+ * color" must be configured. This is the case for the IBM DAC
+ * used in the 2MB and 4MB cards, at least.
+ */
+ { 0x0b, 0x00 }, /* (U) 8 BPP Control */
+ { 0x0c, 0x00 }, /* (U) 16 BPP Control; the "1" means use 555 RGB color encoding */
+ { 0x0d, 0x00 }, /* (U) 24 BPP Packed Control */
+ { 0x0e, 0x00 }, /* (U) 32 BPP Control */
+
+ { 0x10, 0x05 }, /* (0x00) Pixel PLL Control 1 */
+ { 0x11, 0x00 }, /* (0x00) Pixel PLL Control 2 */
+ { 0x15, 0x08 }, /* (0x08) SYSCLK N (System PLL Reference Divider) */
+ { 0x16, 0x4f }, /* (0x41) SYSCLK M (System PLL VCO Divider) */
+ { 0x17, 0x00 }, /* (U) SYSCLK P */
+ { 0x18, 0x00 }, /* (U) SYSCLK C */
+ { 0x30, 0x00 }, /* (0x00) Cursor Control */
+ { 0x60, 0xff }, /* (U) Border Color Red */
+ { 0x61, 0xff }, /* (U) Border Color Green */
+ { 0x62, 0xff }, /* (U) Border Color Blue */
+ { 0x70, 0x01 }, /* (0x00) Miscellaneous Control 1 */
+ { 0x71, 0x45 }, /* (0x00) Miscellaneous Control 2 */
+ { 0x72, 0x00 }, /* (0x00) Miscellaneous Control 3 */
+ { 0x78, 0x00 } /* (0x00) Key Control/DB Operation */
+};
+
+static struct initvalues tvp_initregs[] = {
+ { 0x6, 0x00 },
+ { 0x7, 0xe4 },
+ { 0xf, 0x06 },
+ { 0x18, 0x80 },
+ { 0x19, 0x4d },
+ { 0x1a, 0x05 },
+ { 0x1c, 0x00 },
+ { 0x1d, 0x00 },
+ { 0x1e, 0x08 },
+ { 0x30, 0xff },
+ { 0x31, 0xff },
+ { 0x32, 0xff },
+ { 0x33, 0xff },
+ { 0x34, 0xff },
+ { 0x35, 0xff },
+ { 0x36, 0xff },
+ { 0x37, 0xff },
+ { 0x38, 0x00 },
+ { TVPIRPLA, 0x00 },
+ { TVPIRPPD, 0xc0 },
+ { TVPIRPPD, 0xd5 },
+ { TVPIRPPD, 0xea },
+ { TVPIRPLA, 0x00 },
+ { TVPIRMPD, 0xb9 },
+ { TVPIRMPD, 0x3a },
+ { TVPIRMPD, 0xb1 },
+ { TVPIRPLA, 0x00 },
+ { TVPIRLPD, 0xc1 },
+ { TVPIRLPD, 0x3d },
+ { TVPIRLPD, 0xf3 },
+};
+
+struct fb_info_imstt {
+ struct fb_info info;
+ struct fb_fix_screeninfo fix;
+ struct display disp;
+ struct {
+ __u8 red, green, blue;
+ } palette[256];
+ __u8 *frame_buffer_phys, *frame_buffer;
+ __u32 *dc_regs_phys, *dc_regs;
+ __u8 *cmap_regs_phys, *cmap_regs;
+ __u32 total_vram;
+ __u32 ramdac;
+ union {
+#ifdef FBCON_HAS_CFB16
+ __u16 cfb16[16];
+#endif
+#ifdef FBCON_HAS_CFB24
+ __u32 cfb24[16];
+#endif
+#ifdef FBCON_HAS_CFB32
+ __u32 cfb32[16];
+#endif
+ } fbcon_cmap;
+};
+
+#define USE_NV_MODES 1
+#define INIT_BPP 8
+#define INIT_XRES 640
+#define INIT_YRES 480
+
+static int currcon = 0;
+
+/*
+ * for the IBM ramdac:
+ * Dot clock rate is 20MHz * (m + 1) / ((n + 1) * (p ? 2 * p : 1)
+ * where m = clk[0], n = clk[1], p = clk[2]
+ * clk[3] is c, charge pump bias which depends on the VCO frequency
+ */
+struct imstt_regvals {
+ __u16 hes, heb, hsb, ht, ves, veb, vsb, vt, vil;
+ __u8 pclk_m, pclk_n, pclk_p;
+ __u32 pitch;
+ /* Values of the tvp which change depending on colormode x resolution */
+ __u8 mlc[3]; /* Memory Loop Config 0x39 */
+ __u8 lckl_p[3]; /* P value of LCKL PLL */
+};
+
+/* 1600x1200, 75Hz */
+static struct imstt_regvals ibm_reg_init_1600x1200x75 = {
+ 0x0018, 0x0040, 0x0108, 0x010c, 0x0003, 0x002a, 0x04da, 0x04dd, 0x04da,
+ 0x09, 0x00, 0x00,
+ 1600
+};
+
+/* 1280x1024, 75Hz (20) */
+static struct imstt_regvals ibm_reg_init_20 = {
+ 0x0012, 0x002f, 0x00cf, 0x00d3, 0x0003, 0x0029, 0x0429, 0x042a, 0x0429,
+ 0x1a, 0x03, 0x00,
+ 1280
+};
+
+/* 1280x960, 75Hz (19) */
+static struct imstt_regvals ibm_reg_init_19 = {
+ 0x0012, 0x0030, 0x00d0, 0x00d2, 0x0003, 0x0027, 0x03e7, 0x03e8, 0x03e7,
+ 0x3e, 0x09, 0x00,
+ 1280
+};
+
+/* 1152x870, 75Hz (18) */
+static struct imstt_regvals ibm_reg_init_18 = {
+ 0x0012, 0x0022, 0x00b2, 0x00b6, 0x0003, 0x0031, 0x0397, 0x039a, 0x0397,
+ 0x3c, 0x0b, 0x00,
+ 1152
+};
+
+/* 1024x768, 75Hz (17) */
+#if 1
+static struct imstt_regvals ibm_reg_init_17 = {
+ 0x000a, 0x001c, 0x009c, 0x00a6, 0x0003, 0x0020, 0x0320, 0x0323, 0x0320,
+ 0x07, 0x00, 0x01,
+ 1024
+};
+#else
+/* this almost works with a 14" apple multiple scan monitor */
+static struct imstt_regvals ibm_reg_init_17 = {
+ 0x000a, 0x001d, 0x009c, 0x00ac, 0x0003, 0x0020, 0x0320, 0x0323, 0x0320,
+ 0x3e, 0x0a, 0x01,
+ 1024
+};
+#endif
+
+/* 832x624, 75Hz (13) */
+static struct imstt_regvals ibm_reg_init_13 = {
+ 0x0005, 0x0020, 0x0088, 0x0090, 0x0003, 0x0028, 0x0298, 0x029b, 0x0298,
+ 0x3e, 0x0a, 0x01,
+ 832
+};
+
+/* 640x480, 67Hz (6) */
+static struct imstt_regvals ibm_reg_init_6 = {
+ 0x0008, 0x0012, 0x0062, 0x006c, 0x0003, 0x002a, 0x020a, 0x020c, 0x020a,
+ 0x78, 0x13, 0x02,
+ 640
+};
+
+static struct imstt_regvals tvp_reg_init_2 = {
+ 0x0002, 0x0006, 0x0026, 0x0028, 0x0003, 0x0016, 0x0196, 0x0197, 0x0196,
+ 0xec, 0x2a, 0xf3,
+ 512,
+ { 0x3c, 0x3b, 0x39 }, { 0xf3, 0xf3, 0xf3 }
+};
+
+static struct imstt_regvals tvp_reg_init_6 = {
+ 0x0004, 0x0009, 0x0031, 0x0036, 0x0003, 0x002a, 0x020a, 0x020d, 0x020a,
+ 0xef, 0x2e, 0xb2,
+ 640,
+ { 0x39, 0x39, 0x38 }, { 0xf3, 0xf3, 0xf3 }
+};
+
+static struct imstt_regvals tvp_reg_init_12 = {
+ 0x0005, 0x000e, 0x0040, 0x0042, 0x0003, 0x018, 0x270, 0x271, 0x270,
+ 0xf6, 0x2e, 0xf2,
+ 800,
+ { 0x3a, 0x39, 0x38 }, { 0xf3, 0xf3, 0xf3 }
+};
+
+static struct imstt_regvals tvp_reg_init_13 = {
+ 0x0004, 0x0011, 0x0045, 0x0048, 0x0003, 0x002a, 0x029a, 0x029b, 0x0000,
+ 0xfe, 0x3e, 0xf1,
+ 832,
+ { 0x39, 0x38, 0x38 }, { 0xf3, 0xf3, 0xf2 }
+};
+
+static struct imstt_regvals tvp_reg_init_17 = {
+ 0x0006, 0x0210, 0x0250, 0x0053, 0x1003, 0x0021, 0x0321, 0x0324, 0x0000,
+ 0xfc, 0x3a, 0xf1,
+ 1024,
+ { 0x39, 0x38, 0x38 }, { 0xf3, 0xf3, 0xf2 }
+};
+
+static struct imstt_regvals tvp_reg_init_18 = {
+ 0x0009, 0x0011, 0x059, 0x5b, 0x0003, 0x0031, 0x0397, 0x039a, 0x0000,
+ 0xfd, 0x3a, 0xf1,
+ 1152,
+ { 0x39, 0x38, 0x38 }, { 0xf3, 0xf3, 0xf2 }
+};
+
+static struct imstt_regvals tvp_reg_init_19 = {
+ 0x0009, 0x0016, 0x0066, 0x0069, 0x0003, 0x0027, 0x03e7, 0x03e8, 0x03e7,
+ 0xf7, 0x36, 0xf0,
+ 1280,
+ { 0x38, 0x38, 0x38 }, { 0xf3, 0xf2, 0xf1 }
+};
+
+static struct imstt_regvals tvp_reg_init_20 = {
+ 0x0009, 0x0018, 0x0068, 0x006a, 0x0003, 0x0029, 0x0429, 0x042a, 0x0000,
+ 0xf0, 0x2d, 0xf0,
+ 1280,
+ { 0x38, 0x38, 0x38 }, { 0xf3, 0xf2, 0xf1 }
+};
+
+static struct imstt_regvals *
+compute_imstt_regvals_ibm (int xres, int yres)
+{
+ struct imstt_regvals *init;
+
+ switch (xres) {
+ case 640:
+ init = &ibm_reg_init_6;
+ break;
+ case 832:
+ init = &ibm_reg_init_13;
+ break;
+ case 1024:
+ init = &ibm_reg_init_17;
+ break;
+ case 1152:
+ init = &ibm_reg_init_18;
+ break;
+ case 1280:
+ init = yres == 960 ? &ibm_reg_init_19 : &ibm_reg_init_20;
+ break;
+ case 1600:
+ init = &ibm_reg_init_1600x1200x75;
+ break;
+ default:
+ init = 0;
+ break;
+ }
+
+ return init;
+}
+
+static struct imstt_regvals *
+compute_imstt_regvals_tvp (int xres, int yres)
+{
+ struct imstt_regvals *init;
+
+ switch (xres) {
+ case 512:
+ init = &tvp_reg_init_2;
+ break;
+ case 640:
+ init = &tvp_reg_init_6;
+ break;
+ case 800:
+ init = &tvp_reg_init_12;
+ break;
+ case 832:
+ init = &tvp_reg_init_13;
+ break;
+ case 1024:
+ init = &tvp_reg_init_17;
+ break;
+ case 1152:
+ init = &tvp_reg_init_18;
+ break;
+ case 1280:
+ init = yres == 960 ? &tvp_reg_init_19 : &tvp_reg_init_20;
+ break;
+ default:
+ init = 0;
+ break;
+ }
+
+ return init;
+}
+
+static struct imstt_regvals *
+compute_imstt_regvals (struct fb_info_imstt *p, int xres, int yres)
+{
+ if (p->ramdac == IBM)
+ return compute_imstt_regvals_ibm(xres, yres);
+ else
+ return compute_imstt_regvals_tvp(xres, yres);
+}
+
+static void
+set_imstt_regvals_ibm (struct fb_info_imstt *p, struct imstt_regvals *init, int bpp)
+{
+ __u8 pformat = (bpp >> 3) + 2;
+
+ p->cmap_regs[PIDXHI] = 0; eieio();
+ p->cmap_regs[PIDXLO] = PM0; eieio();
+ p->cmap_regs[PIDXDATA] = init->pclk_m; eieio();
+ p->cmap_regs[PIDXLO] = PN0; eieio();
+ p->cmap_regs[PIDXDATA] = init->pclk_n; eieio();
+ p->cmap_regs[PIDXLO] = PP0; eieio();
+ p->cmap_regs[PIDXDATA] = init->pclk_p; eieio();
+ p->cmap_regs[PIDXLO] = PC0; eieio();
+ p->cmap_regs[PIDXDATA] = 0x02; eieio();
+
+ p->cmap_regs[PIDXHI] = 0; eieio();
+ p->cmap_regs[PIDXLO] = PPIXREP; eieio();
+ p->cmap_regs[PIDXDATA] = pformat; eieio();
+ p->cmap_regs[PIDXHI] = 0; eieio();
+}
+
+static void
+set_imstt_regvals_tvp (struct fb_info_imstt *p, struct imstt_regvals *init, int bpp)
+{
+ __u8 tcc, mxc, lckl_n, mic;
+ __u8 mlc, lckl_p;
+
+ switch (bpp) {
+ case 8:
+ tcc = 0x80;
+ mxc = 0x4d;
+ lckl_n = 0xc1;
+ mlc = init->mlc[0];
+ lckl_p = init->lckl_p[0];
+ break;
+ case 16:
+ tcc = 0x44;
+ mxc = 0x55;
+ lckl_n = 0xe1;
+ mlc = init->mlc[1];
+ lckl_p = init->lckl_p[1];
+ break;
+ case 24:
+ /* ?!? */
+ case 32:
+ tcc = 0x46;
+ mxc = 0x5d;
+ lckl_n = 0xf1;
+ mlc = init->mlc[2];
+ lckl_p = init->lckl_p[2];
+ break;
+ }
+ mic = 0x08;
+
+ p->cmap_regs[TVPADDRW] = TVPIRPLA; eieio();
+ p->cmap_regs[TVPIDATA] = 0x00; eieio();
+ p->cmap_regs[TVPADDRW] = TVPIRPPD; eieio();
+ p->cmap_regs[TVPIDATA] = init->pclk_n; eieio();
+ p->cmap_regs[TVPADDRW] = TVPIRPPD; eieio();
+ p->cmap_regs[TVPIDATA] = init->pclk_m; eieio();
+ p->cmap_regs[TVPADDRW] = TVPIRPPD; eieio();
+ p->cmap_regs[TVPIDATA] = init->pclk_p; eieio();
+
+ p->cmap_regs[TVPADDRW] = TVPIRTCC; eieio();
+ p->cmap_regs[TVPIDATA] = tcc; eieio();
+ p->cmap_regs[TVPADDRW] = TVPIRMXC; eieio();
+ p->cmap_regs[TVPIDATA] = mxc; eieio();
+ p->cmap_regs[TVPADDRW] = TVPIRMIC; eieio();
+ p->cmap_regs[TVPIDATA] = mic; eieio();
+
+ p->cmap_regs[TVPADDRW] = TVPIRPLA; eieio();
+ p->cmap_regs[TVPIDATA] = 0x00; eieio();
+ p->cmap_regs[TVPADDRW] = TVPIRLPD; eieio();
+ p->cmap_regs[TVPIDATA] = lckl_n; eieio();
+
+ p->cmap_regs[TVPADDRW] = TVPIRPLA; eieio();
+ p->cmap_regs[TVPIDATA] = 0x15; eieio();
+ p->cmap_regs[TVPADDRW] = TVPIRMLC; eieio();
+ p->cmap_regs[TVPIDATA] = mlc; eieio();
+
+ p->cmap_regs[TVPADDRW] = TVPIRPLA; eieio();
+ p->cmap_regs[TVPIDATA] = 0x2a; eieio();
+ p->cmap_regs[TVPADDRW] = TVPIRLPD; eieio();
+ p->cmap_regs[TVPIDATA] = lckl_p; eieio();
+}
+
+static void
+set_imstt_regvals (struct fb_info_imstt *p, struct imstt_regvals *init, int bpp)
+{
+ __u32 ctl, pitch, byteswap, scr;
+
+ if (p->ramdac == IBM)
+ set_imstt_regvals_ibm(p, init, bpp);
+ else
+ set_imstt_regvals_tvp(p, init, bpp);
+
+ /*
+ * From what I (jsk) can gather poking around with MacsBug,
+ * bits 8 and 9 in the SCR register control endianness
+ * correction (byte swapping). These bits must be set according
+ * to the color depth as follows:
+ * Color depth Bit 9 Bit 8
+ * ========== ===== =====
+ * 8bpp 0 0
+ * 16bpp 0 1
+ * 24bpp 1 0
+ * 32bpp 1 1
+ */
+ switch (bpp) {
+ case 8:
+ ctl = 0x17b1;
+ pitch = init->pitch / 4;
+ byteswap = 0x0;
+ break;
+ case 16:
+ ctl = 0x17b3;
+ pitch = init->pitch / 2;
+ byteswap = 0x1;
+ break;
+ case 24:
+ ctl = 0x17b9;
+ pitch = init->pitch - (init->pitch / 4);
+ byteswap = 0x2;
+ break;
+ case 32:
+ ctl = 0x17b5;
+ pitch = init->pitch;
+ byteswap = 0x3;
+ break;
+ }
+ if (p->ramdac == TVP)
+ ctl -= 0x30;
+
+ out_le32(&p->dc_regs[HES], init->hes);
+ out_le32(&p->dc_regs[HEB], init->heb);
+ out_le32(&p->dc_regs[HSB], init->hsb);
+ out_le32(&p->dc_regs[HT], init->ht);
+ out_le32(&p->dc_regs[VES], init->ves);
+ out_le32(&p->dc_regs[VEB], init->veb);
+ out_le32(&p->dc_regs[VSB], init->vsb);
+ out_le32(&p->dc_regs[VT], init->vt);
+ out_le32(&p->dc_regs[VIL], init->vil);
+ out_le32(&p->dc_regs[HCIV], 1);
+ out_le32(&p->dc_regs[VCIV], 1);
+ out_le32(&p->dc_regs[TCDR], 4);
+ out_le32(&p->dc_regs[RRCIV], 1);
+ out_le32(&p->dc_regs[RRSC], 0x980);
+ out_le32(&p->dc_regs[RRCR], 0x11);
+
+ out_le32(&p->dc_regs[SSR], 0);
+ if (p->ramdac == IBM) {
+ out_le32(&p->dc_regs[HRIR], 0x0100);
+ out_le32(&p->dc_regs[CMR], 0x00ff);
+ out_le32(&p->dc_regs[SRGCTL], 0x0073);
+ } else {
+ out_le32(&p->dc_regs[HRIR], 0x0200);
+ out_le32(&p->dc_regs[CMR], 0x01ff);
+ out_le32(&p->dc_regs[SRGCTL], 0x0003);
+ }
+
+ switch (p->total_vram) {
+ case 0x00200000:
+ scr = 0x059d | (byteswap << 8);
+ break;
+ case 0x00400000:
+ pitch /= 2;
+ scr = 0xd0dc | (byteswap << 8);
+ break;
+ case 0x00800000:
+ pitch /= 2;
+ scr = 0x150dd | (byteswap << 8);
+ break;
+ }
+
+ out_le32(&p->dc_regs[SCR], scr);
+ out_le32(&p->dc_regs[SPR], pitch);
+
+ out_le32(&p->dc_regs[STGCTL], ctl);
+}
+
+void
+set_16 (struct fb_info_imstt *p, __u8 x)
+{
+ if (p->ramdac == IBM) {
+ p->cmap_regs[PIDXHI] = 0; eieio();
+ p->cmap_regs[PIDXLO] = 0x0c; eieio();
+ p->cmap_regs[PIDXDATA] = x; eieio();
+ } else {
+ /* ?!? */
+ }
+}
+
+#define set_555(_p) set_16(_p, 15) /* need 220 or 224 for X */
+#define set_565(_p) set_16(_p, 0) /* 220, 224 is darker in X */
+
+#ifdef CONFIG_FB_COMPAT_XPMAC
+#include <asm/vc_ioctl.h>
+
+extern struct vc_mode display_info;
+extern struct fb_info *console_fb_info;
+
+static void
+set_display_info (struct display *disp)
+{
+ display_info.width = disp->var.xres;
+ display_info.height = disp->var.yres;
+ display_info.depth = disp->var.bits_per_pixel;
+ display_info.pitch = disp->line_length;
+
+ switch (disp->var.xres) {
+ case 512:
+ display_info.mode = 2;
+ break;
+ case 640:
+ display_info.mode = 6;
+ break;
+ case 800:
+ display_info.mode = 12;
+ break;
+ case 832:
+ display_info.mode = 13;
+ break;
+ case 1024:
+ display_info.mode = 17;
+ break;
+ case 1152:
+ display_info.mode = 18;
+ break;
+ case 1280:
+ display_info.mode = disp->var.yres == 960 ? 19 : 20;
+ break;
+ default:
+ display_info.mode = 0;
+ }
+}
+#endif
+
+static int
+imsttfb_getcolreg (u_int regno, u_int *red, u_int *green,
+ u_int *blue, u_int *transp, struct fb_info *info)
+{
+ struct fb_info_imstt *p = (struct fb_info_imstt *)info;
+
+ if (regno > 255)
+ return 1;
+ *red = (p->palette[regno].red << 8) | p->palette[regno].red;
+ *green = (p->palette[regno].green << 8) | p->palette[regno].green;
+ *blue = (p->palette[regno].blue << 8) | p->palette[regno].blue;
+ *transp = 0;
+
+ return 0;
+}
+
+static int
+imsttfb_setcolreg (u_int regno, u_int red, u_int green, u_int blue,
+ u_int transp, struct fb_info *info)
+{
+ struct fb_info_imstt *p = (struct fb_info_imstt *)info;
+ unsigned int bpp = fb_display[currcon].var.bits_per_pixel;
+ unsigned int i;
+
+ if (regno > 255)
+ return 1;
+
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
+
+ p->palette[regno].red = red;
+ p->palette[regno].green = green;
+ p->palette[regno].blue = blue;
+
+ /* PADDRW/PDATA are the same as TVPPADDRW/TVPPDATA */
+ if (fb_display[currcon].var.green.length == 5 /* && bpp == 16 */ && p->ramdac == TVP) {
+ p->cmap_regs[PADDRW] = regno << 3; eieio();
+ } else {
+ p->cmap_regs[PADDRW] = regno; eieio();
+ }
+ p->cmap_regs[PDATA] = red; eieio();
+ p->cmap_regs[PDATA] = green; eieio();
+ p->cmap_regs[PDATA] = blue; eieio();
+
+ if (regno < 16)
+ switch (bpp) {
+#ifdef FBCON_HAS_CFB16
+ case 16:
+ p->fbcon_cmap.cfb16[regno] = (regno << (fb_display[currcon].var.green.length == 5 ? 10 : 11)) | (regno << 5) | regno;
+ break;
+#endif
+#ifdef FBCON_HAS_CFB24
+ case 24:
+ p->fbcon_cmap.cfb24[regno] = (regno << 16) | (regno << 8) | regno;
+ break;
+#endif
+#ifdef FBCON_HAS_CFB32
+ case 32:
+ i = (regno << 8) | regno;
+ p->fbcon_cmap.cfb32[regno] = (i << 16) | i;
+ break;
+#endif
+ }
+
+ return 0;
+}
+
+static void
+do_install_cmap (int con, struct fb_info *info)
+{
+ if (fb_display[con].cmap.len)
+ fb_set_cmap(&fb_display[con].cmap, 1, imsttfb_setcolreg, info);
+ else {
+ int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
+ fb_set_cmap(fb_default_cmap(size), 1, imsttfb_setcolreg, info);
+ }
+}
+
+static int
+imsttfb_open (struct fb_info *info, int user)
+{
+ MOD_INC_USE_COUNT;
+ return 0;
+}
+
+static int
+imsttfb_release (struct fb_info *info, int user)
+{
+ MOD_DEC_USE_COUNT;
+ return 0;
+}
+
+static int
+imsttfb_get_fix (struct fb_fix_screeninfo *fix, int con, struct fb_info *info)
+{
+ struct fb_info_imstt *p = (struct fb_info_imstt *)info;
+ struct fb_var_screeninfo *var = &fb_display[con].var;
+
+ *fix = p->fix;
+ fix->visual = var->bits_per_pixel == 8 ? FB_VISUAL_PSEUDOCOLOR
+ : FB_VISUAL_TRUECOLOR;
+ fix->line_length = var->xres * (var->bits_per_pixel >> 3);
+
+ return 0;
+}
+
+static int
+imsttfb_get_var (struct fb_var_screeninfo *var, int con, struct fb_info *info)
+{
+ *var = fb_display[con].var;
+
+ return 0;
+}
+
+static int
+imsttfb_set_var (struct fb_var_screeninfo *var, int con, struct fb_info *info)
+{
+ struct fb_info_imstt *p = (struct fb_info_imstt *)info;
+ struct display *disp;
+ unsigned int oldbpp, oldxres, oldyres, oldgreenlen;
+ struct imstt_regvals *init;
+
+ disp = &fb_display[con];
+
+ if ((var->bits_per_pixel != 8 && var->bits_per_pixel != 16
+ && var->bits_per_pixel != 24 && var->bits_per_pixel != 32)
+ || var->xres_virtual < var->xres || var->yres_virtual < var->yres
+ || var->nonstd
+ || (var->vmode & FB_VMODE_MASK) != FB_VMODE_NONINTERLACED)
+ return -EINVAL;
+
+ if ((var->xres * var->yres) * (var->bits_per_pixel >> 3) > p->total_vram
+ || (var->xres_virtual * var->yres_virtual) * (var->bits_per_pixel >> 3) > p->total_vram)
+ return -EINVAL;
+
+ if (!((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW))
+ return 0;
+
+ init = compute_imstt_regvals(p, var->xres, var->yres);
+ if (!init)
+ return -EINVAL;
+
+ oldbpp = disp->var.bits_per_pixel;
+ oldxres = disp->var.xres;
+ oldyres = disp->var.yres;
+ oldgreenlen = disp->var.green.length;
+
+ disp->var = *var;
+
+ disp->var.activate = 0;
+ disp->var.red.msb_right = 0;
+ disp->var.green.msb_right = 0;
+ disp->var.blue.msb_right = 0;
+ disp->var.transp.msb_right = 0;
+ disp->var.height = -1;
+ disp->var.width = -1;
+ disp->var.vmode = FB_VMODE_NONINTERLACED;
+ disp->var.pixclock = 10000;
+ disp->var.left_margin = disp->var.right_margin = 16;
+ disp->var.upper_margin = disp->var.lower_margin = 16;
+ disp->var.hsync_len = disp->var.vsync_len = 8;
+
+ disp->screen_base = p->frame_buffer;
+ disp->inverse = 0;
+ disp->scrollmode = SCROLL_YREDRAW;
+
+ if (oldbpp != disp->var.bits_per_pixel) {
+ disp->visual = disp->var.bits_per_pixel == 8 ? FB_VISUAL_PSEUDOCOLOR
+ : FB_VISUAL_TRUECOLOR;
+ disp->dispsw = &fbcon_dummy;
+ disp->dispsw_data = 0;
+ switch (disp->var.bits_per_pixel) {
+ case 8:
+ disp->var.red.offset = 0;
+ disp->var.red.length = 8;
+ disp->var.green.offset = 0;
+ disp->var.green.length = 8;
+ disp->var.blue.offset = 0;
+ disp->var.blue.length = 8;
+ disp->var.transp.offset = 0;
+ disp->var.transp.length = 0;
+#ifdef FBCON_HAS_CFB8
+ disp->dispsw = &fbcon_cfb8;
+#endif
+ break;
+ case 16: /* RGB 565 */
+ if (disp->var.red.offset != 10 && disp->var.red.offset != 11)
+ disp->var.red.offset = 10;
+ disp->var.red.length = 5;
+ disp->var.green.offset = 5;
+ if (disp->var.green.length != 5 && disp->var.green.length != 6)
+ disp->var.green.length = 5;
+ disp->var.blue.offset = 0;
+ disp->var.blue.length = 5;
+ disp->var.transp.offset = 0;
+ disp->var.transp.length = 0;
+#ifdef FBCON_HAS_CFB16
+ disp->dispsw = &fbcon_cfb16;
+ disp->dispsw_data = p->fbcon_cmap.cfb16;
+#endif
+ break;
+ case 24: /* RGB 888 */
+ disp->var.red.offset = 16;
+ disp->var.red.length = 8;
+ disp->var.green.offset = 8;
+ disp->var.green.length = 8;
+ disp->var.blue.offset = 0;
+ disp->var.blue.length = 8;
+ disp->var.transp.offset = 0;
+ disp->var.transp.length = 0;
+#ifdef FBCON_HAS_CFB24
+ disp->dispsw = &fbcon_cfb24;
+ disp->dispsw_data = p->fbcon_cmap.cfb24;
+#endif
+ break;
+ case 32: /* RGBA 8888 */
+ disp->var.red.offset = 16;
+ disp->var.red.length = 8;
+ disp->var.green.offset = 8;
+ disp->var.green.length = 8;
+ disp->var.blue.offset = 0;
+ disp->var.blue.length = 8;
+ disp->var.transp.offset = 24;
+ disp->var.transp.length = 8;
+#ifdef FBCON_HAS_CFB32
+ disp->dispsw = &fbcon_cfb32;
+ disp->dispsw_data = p->fbcon_cmap.cfb32;
+#endif
+ break;
+ }
+ }
+
+ if (oldxres != disp->var.xres || oldbpp != disp->var.bits_per_pixel)
+ disp->line_length = disp->var.xres * (disp->var.bits_per_pixel >> 3);
+
+#ifdef CONFIG_FB_COMPAT_XPMAC
+ set_display_info(disp);
+#endif
+
+ if (info->changevar)
+ (*info->changevar)(con);
+
+ if (con == currcon) {
+ if (oldgreenlen != disp->var.green.length) {
+ if (disp->var.green.length == 6)
+ set_565(p);
+ else
+ set_555(p);
+ }
+ if (oldxres != disp->var.xres || oldyres != disp->var.yres || oldbpp != disp->var.bits_per_pixel)
+ set_imstt_regvals(p, init, disp->var.bits_per_pixel);
+
+ }
+ if (oldbpp != disp->var.bits_per_pixel) {
+ int err = fb_alloc_cmap(&disp->cmap, 0, 0);
+ if (err)
+ return err;
+ do_install_cmap(con, info);
+ }
+
+ return 0;
+}
+
+static int
+imsttfb_pan_display (struct fb_var_screeninfo *var, int con, struct fb_info *info)
+{
+ struct fb_info_imstt *p = (struct fb_info_imstt *)info;
+ unsigned int off;
+
+ if (var->xoffset + fb_display[con].var.xres > fb_display[con].var.xres_virtual
+ || var->yoffset + fb_display[con].var.yres > fb_display[con].var.yres_virtual)
+ return -EINVAL;
+
+ fb_display[con].var.xoffset = var->xoffset;
+ fb_display[con].var.yoffset = var->yoffset;
+ if (con == currcon) {
+ off = var->yoffset * (fb_display[con].line_length / 8)
+ + (var->xoffset * (fb_display[con].var.bits_per_pixel >> 3)) / 8;
+ out_le32(&p->dc_regs[SSR], off);
+ }
+
+ return 0;
+}
+
+static int
+imsttfb_get_cmap (struct fb_cmap *cmap, int kspc, int con, struct fb_info *info)
+{
+ if (con == currcon) /* current console? */
+ return fb_get_cmap(cmap, kspc, imsttfb_getcolreg, info);
+ else if (fb_display[con].cmap.len) /* non default colormap? */
+ fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+ else {
+ int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
+ fb_copy_cmap(fb_default_cmap(size), cmap, kspc ? 0 : 2);
+ }
+
+ return 0;
+}
+
+static int
+imsttfb_set_cmap (struct fb_cmap *cmap, int kspc, int con, struct fb_info *info)
+{
+ int err;
+
+ if (!fb_display[con].cmap.len) { /* no colormap allocated? */
+ int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
+ if ((err = fb_alloc_cmap(&fb_display[con].cmap, size, 0)))
+ return err;
+ }
+ if (con == currcon) /* current console? */
+ return fb_set_cmap(cmap, kspc, imsttfb_setcolreg, info);
+ else
+ fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
+
+ return 0;
+}
+
+#define FBIMSTT_SETREG 0x545401
+#define FBIMSTT_GETREG 0x545402
+#define FBIMSTT_SETCMAPREG 0x545403
+#define FBIMSTT_GETCMAPREG 0x545404
+#define FBIMSTT_SETINITREG 0x545405
+#define FBIMSTT_GETINITREG 0x545406
+
+static int
+imsttfb_ioctl (struct inode *inode, struct file *file, u_int cmd,
+ u_long arg, int con, struct fb_info *info)
+{
+ struct fb_info_imstt *p = (struct fb_info_imstt *)info;
+ __u8 init[2];
+ __u32 reg[2];
+
+ switch (cmd) {
+ case FBIMSTT_SETREG:
+ if (copy_from_user(reg, (void *)arg, 8) || reg[0] > (0x40000 - sizeof(reg[0])) / sizeof(reg[0]))
+ return -EFAULT;
+ out_le32(&p->dc_regs[reg[0]], reg[1]);
+ break;
+ case FBIMSTT_GETREG:
+ if (copy_from_user(reg, (void *)arg, 4) || reg[0] > (0x40000 - sizeof(reg[0])) / sizeof(reg[0]))
+ return -EFAULT;
+ reg[1] = in_le32(&p->dc_regs[reg[0]]);
+ if (copy_to_user((void *)(arg + 4), ®[1], 4))
+ return -EFAULT;
+ break;
+ case FBIMSTT_SETCMAPREG:
+ if (copy_from_user(reg, (void *)arg, 8) || reg[0] > (0x17c0000 - sizeof(reg[0])) / sizeof(reg[0]))
+ return -EFAULT;
+ out_le32(&((unsigned int *)p->cmap_regs)[reg[0]], reg[1]);
+ break;
+ case FBIMSTT_GETCMAPREG:
+ if (copy_from_user(reg, (void *)arg, 4) || reg[0] > (0x17c0000 - sizeof(reg[0])) / sizeof(reg[0]))
+ return -EFAULT;
+ reg[1] = in_le32(&((unsigned int *)p->cmap_regs)[reg[0]]);
+ if (copy_to_user((void *)(arg + 4), ®[1], 4))
+ return -EFAULT;
+ break;
+ case FBIMSTT_SETINITREG:
+ if (copy_from_user(init, (void *)arg, 2))
+ return -EFAULT;
+ p->cmap_regs[PIDXHI] = 0; eieio();
+ p->cmap_regs[PIDXLO] = init[0]; eieio();
+ p->cmap_regs[PIDXDATA] = init[1]; eieio();
+ break;
+ case FBIMSTT_GETINITREG:
+ if (copy_from_user(init, (void *)arg, 1))
+ return -EFAULT;
+ p->cmap_regs[PIDXHI] = 0; eieio();
+ p->cmap_regs[PIDXLO] = init[0]; eieio();
+ init[1] = p->cmap_regs[PIDXDATA];
+ if (copy_to_user((void *)(arg + 1), &init[1], 1))
+ return -EFAULT;
+ break;
+ default:
+ return -ENOIOCTLCMD;
+ }
+
+ return 0;
+}
+
+static struct fb_ops imsttfb_ops = {
+ imsttfb_open,
+ imsttfb_release,
+ imsttfb_get_fix,
+ imsttfb_get_var,
+ imsttfb_set_var,
+ imsttfb_get_cmap,
+ imsttfb_set_cmap,
+ imsttfb_pan_display,
+ imsttfb_ioctl
+};
+
+static int
+imsttfb_switch (int con, struct fb_info *info)
+{
+ struct display *old = &fb_display[currcon], *new = &fb_display[con];
+
+ if (old->var.xres != new->var.xres
+ || old->var.yres != new->var.yres
+ || old->var.bits_per_pixel != new->var.bits_per_pixel) {
+ struct fb_info_imstt *p = (struct fb_info_imstt *)info;
+ struct imstt_regvals *init = compute_imstt_regvals(p, new->var.xres, new->var.yres);
+ if (!init) /* ?!? */ return -1;
+ if (new->var.bits_per_pixel == 16) {
+ if (new->var.green.length == 6)
+ set_565(p);
+ else
+ set_555(p);
+ }
+ set_imstt_regvals(p, init, new->var.bits_per_pixel);
+#ifdef CONFIG_FB_COMPAT_XPMAC
+ set_display_info(new);
+#endif
+ }
+ if (old->cmap.len)
+ fb_get_cmap(&old->cmap, 1, imsttfb_getcolreg, info);
+ currcon = con;
+ do_install_cmap(con, info);
+
+ return 0;
+}
+
+static int
+imsttfb_updatevar (int con, struct fb_info *info)
+{
+ struct fb_info_imstt *p = (struct fb_info_imstt *)info;
+ unsigned int off;
+
+ if (con == currcon) {
+ off = fb_display[con].var.yoffset * (fb_display[con].line_length / 8)
+ + (fb_display[con].var.xoffset * (fb_display[con].var.bits_per_pixel >> 3)) / 8;
+ out_le32(&p->dc_regs[SSR], off);
+ }
+
+ return 0;
+}
+
+static void
+imsttfb_blank (int blank, struct fb_info *info)
+{
+ struct fb_info_imstt *p = (struct fb_info_imstt *)info;
+ __u32 ctrl;
+
+ ctrl = in_le32(&p->dc_regs[STGCTL]);
+ if (blank > 0) {
+ switch (blank - 1) {
+ case VESA_NO_BLANKING:
+ ctrl &= ~0x000000f0;
+ break;
+ case VESA_VSYNC_SUSPEND:
+ ctrl &= ~0x00000020;
+ break;
+ case VESA_HSYNC_SUSPEND:
+ ctrl &= ~0x00000010;
+ break;
+ case VESA_POWERDOWN:
+ ctrl &= ~0x000000f0;
+ break;
+ }
+ } else {
+ ctrl |= p->ramdac == IBM ? 0x000000b0 : 0x00000080;
+ }
+ out_le32(&p->dc_regs[STGCTL], ctrl);
+}
+
+__initfunc(static void init_imstt(struct fb_info_imstt *p))
+{
+ __u32 i, tmp;
+ struct imstt_regvals *init;
+
+ tmp = in_le32(&p->dc_regs[SSTATUS]);
+ /* printk("chip version %ld, ", (tmp & 0x0F00) >> 8); */
+
+ tmp = in_le32(&p->dc_regs[PRC]);
+ if (p->ramdac == IBM)
+ p->total_vram = (tmp & 0x0004) ? 0x00400000 : 0x00200000;
+ else
+ p->total_vram = 0x00800000;
+
+ memset(p->frame_buffer, 0, p->total_vram);
+
+ /* initialize the card */
+ tmp = in_le32(&p->dc_regs[STGCTL]);
+ out_le32(&p->dc_regs[STGCTL], tmp & ~0x1);
+
+ /* set default values for DAC registers */
+ if (p->ramdac == IBM) {
+ p->cmap_regs[PPMASK] = 0xff;
+ p->cmap_regs[PIDXHI] = 0; eieio();
+ for (i = 0; i < sizeof(ibm_initregs) / sizeof(*ibm_initregs); i++) {
+ p->cmap_regs[PIDXLO] = ibm_initregs[i].addr; eieio();
+ p->cmap_regs[PIDXDATA] = ibm_initregs[i].value; eieio();
+ }
+ } else {
+ for (i = 0; i < sizeof(tvp_initregs) / sizeof(*tvp_initregs); i++) {
+ p->cmap_regs[TVPADDRW] = tvp_initregs[i].addr; eieio();
+ p->cmap_regs[TVPIDATA] = tvp_initregs[i].value; eieio();
+ }
+ }
+
+#if USE_NV_MODES && (defined(CONFIG_PMAC) || defined(CONFIG_CHRP))
+ {
+ int vmode, cmode;
+
+ vmode = nvram_read_byte(NV_VMODE);
+ if (vmode <= 0 || vmode > VMODE_MAX)
+ vmode = VMODE_640_480_67;
+ cmode = nvram_read_byte(NV_CMODE);
+ if (cmode < CMODE_8 || cmode > CMODE_32)
+ cmode = CMODE_8;
+ if (mac_vmode_to_var(vmode, cmode, &p->disp.var)) {
+ p->disp.var.xres = p->disp.var.xres_virtual = INIT_XRES;
+ p->disp.var.yres = p->disp.var.yres_virtual = INIT_YRES;
+ p->disp.var.bits_per_pixel = INIT_BPP;
+ }
+ }
+#else
+ p->disp.var.xres = p->disp.var.xres_virtual = INIT_XRES;
+ p->disp.var.yres = p->disp.var.yres_virtual = INIT_YRES;
+ p->disp.var.bits_per_pixel = INIT_BPP;
+#endif
+
+ p->disp.var.height = p->disp.var.width = -1;
+ p->disp.var.vmode = FB_VMODE_NONINTERLACED;
+ p->disp.var.pixclock = 10000;
+ p->disp.var.left_margin = p->disp.var.right_margin = 16;
+ p->disp.var.upper_margin = p->disp.var.lower_margin = 16;
+ p->disp.var.hsync_len = p->disp.var.vsync_len = 8;
+ p->disp.dispsw = &fbcon_dummy;
+ p->disp.dispsw_data = 0;
+ switch (p->disp.var.bits_per_pixel) {
+ case 8:
+ p->disp.var.red.offset = 0;
+ p->disp.var.red.length = 8;
+ p->disp.var.green.offset = 0;
+ p->disp.var.green.length = 8;
+ p->disp.var.blue.offset = 0;
+ p->disp.var.blue.length = 8;
+ p->disp.var.transp.offset = 0;
+ p->disp.var.transp.length = 0;
+#ifdef FBCON_HAS_CFB8
+ p->disp.dispsw = &fbcon_cfb8;
+#endif
+ break;
+ case 16: /* RGB 565 */
+ if (p->disp.var.red.offset != 10 && p->disp.var.red.offset != 11)
+ p->disp.var.red.offset = 10;
+ p->disp.var.red.length = 5;
+ p->disp.var.green.offset = 5;
+ if (p->disp.var.green.length != 5 && p->disp.var.green.length != 6)
+ p->disp.var.green.length = 5;
+ p->disp.var.blue.offset = 0;
+ p->disp.var.blue.length = 5;
+ p->disp.var.transp.offset = 0;
+ p->disp.var.transp.length = 0;
+#ifdef FBCON_HAS_CFB16
+ p->disp.dispsw = &fbcon_cfb16;
+ p->disp.dispsw_data = p->fbcon_cmap.cfb16;
+#endif
+ break;
+ case 24: /* RGB 888 */
+ p->disp.var.red.offset = 16;
+ p->disp.var.red.length = 8;
+ p->disp.var.green.offset = 8;
+ p->disp.var.green.length = 8;
+ p->disp.var.blue.offset = 0;
+ p->disp.var.blue.length = 8;
+ p->disp.var.transp.offset = 0;
+ p->disp.var.transp.length = 0;
+#ifdef FBCON_HAS_CFB24
+ p->disp.dispsw = &fbcon_cfb24;
+ p->disp.dispsw_data = p->fbcon_cmap.cfb24;
+#endif
+ break;
+ case 32: /* RGBA 8888 */
+ p->disp.var.red.offset = 16;
+ p->disp.var.red.length = 8;
+ p->disp.var.green.offset = 8;
+ p->disp.var.green.length = 8;
+ p->disp.var.blue.offset = 0;
+ p->disp.var.blue.length = 8;
+ p->disp.var.transp.offset = 24;
+ p->disp.var.transp.length = 8;
+#ifdef FBCON_HAS_CFB32
+ p->disp.dispsw = &fbcon_cfb32;
+ p->disp.dispsw_data = p->fbcon_cmap.cfb32;
+#endif
+ break;
+ }
+
+ if (p->disp.var.green.length == 6)
+ set_565(p);
+ else
+ set_555(p);
+
+ if ((p->disp.var.xres * p->disp.var.yres) * (p->disp.var.bits_per_pixel >> 3) > p->total_vram
+ || !(init = compute_imstt_regvals(p, p->disp.var.xres, p->disp.var.yres))) {
+ printk("imsttfb: %dx%dx%d not supported\n", p->disp.var.xres, p->disp.var.yres, p->disp.var.bits_per_pixel);
+ kfree(p);
+ return;
+ }
+
+ set_imstt_regvals(p, init, p->disp.var.bits_per_pixel);
+
+ sprintf(p->fix.id, "IMS TT (%s)", p->ramdac == IBM ? "IBM" : "TVP");
+ p->fix.smem_start = (__u8 *)p->frame_buffer_phys;
+ p->fix.smem_len = p->total_vram;
+ p->fix.mmio_start = (__u8 *)p->dc_regs_phys;
+ p->fix.mmio_len = 0x40000;
+ p->fix.type = FB_TYPE_PACKED_PIXELS;
+ p->fix.visual = p->disp.var.bits_per_pixel == 8 ? FB_VISUAL_PSEUDOCOLOR
+ : FB_VISUAL_DIRECTCOLOR;
+ p->fix.line_length = p->disp.var.xres * (p->disp.var.bits_per_pixel >> 3);
+
+ p->disp.screen_base = p->frame_buffer;
+ p->disp.visual = p->fix.visual;
+ p->disp.type = p->fix.type;
+ p->disp.type_aux = p->fix.type_aux;
+ p->disp.line_length = p->fix.line_length;
+ p->disp.can_soft_blank = 1;
+ p->disp.scrollmode = SCROLL_YREDRAW;
+
+ strcpy(p->info.modename, p->fix.id);
+ p->info.node = -1;
+ p->info.fbops = &imsttfb_ops;
+ p->info.disp = &p->disp;
+ p->info.fontname[0] = 0;
+ p->info.changevar = 0;
+ p->info.switch_con = &imsttfb_switch;
+ p->info.updatevar = &imsttfb_updatevar;
+ p->info.blank = &imsttfb_blank;
+
+ for (i = 0; i < 16; i++) {
+ unsigned int j = color_table[i];
+ p->palette[i].red = default_red[j];
+ p->palette[i].green = default_grn[j];
+ p->palette[i].blue = default_blu[j];
+ }
+
+ if (register_framebuffer(&p->info) < 0) {
+ kfree(p);
+ return;
+ }
+
+ printk("fb%d: %s frame buffer; %uMB vram\n",
+ GET_FB_IDX(p->info.node), p->fix.id, p->total_vram >> 20);
+
+#ifdef CONFIG_FB_COMPAT_XPMAC
+ strncpy(display_info.name, p->fix.id, sizeof display_info.name);
+ display_info.fb_address = (__u32)p->frame_buffer_phys;
+ display_info.cmap_adr_address = (__u32)&p->cmap_regs_phys[PADDRW];
+ display_info.cmap_data_address = (__u32)&p->cmap_regs_phys[PDATA];
+ display_info.disp_reg_address = 0;
+ set_display_info(&p->disp);
+ console_fb_info = &p->info;
+#endif /* CONFIG_FB_COMPAT_XPMAC */
+}
+
+__initfunc(void imsttfb_of_init(struct device_node *dp))
+{
+ struct fb_info_imstt *p;
+ int i;
+ __u32 addr, size = 0;
+ __u8 bus, devfn;
+ __u16 cmd;
+
+ for (i = 0; i < dp->n_addrs; i++) {
+ if (dp->addrs[i].size >= 0x02000000) {
+ addr = dp->addrs[i].address;
+ size = dp->addrs[i].size;
+ }
+ }
+ if (!size)
+ return;
+
+ p = kmalloc(sizeof(struct fb_info_imstt), GFP_ATOMIC);
+ if (!p)
+ return;
+
+ memset(p, 0, sizeof(struct fb_info_imstt));
+ p->frame_buffer_phys = (__u8 *)addr;
+ p->frame_buffer = (__u8 *)ioremap(addr, size);
+ p->dc_regs_phys = (__u32 *)(p->frame_buffer_phys + 0x00800000);
+ p->dc_regs = (__u32 *)(p->frame_buffer + 0x00800000);
+ p->cmap_regs_phys = (__u8 *)(p->frame_buffer_phys + 0x00840000);
+ p->cmap_regs = (__u8 *)(p->frame_buffer + 0x00840000);
+
+ if (dp->name[11] == '8')
+ p->ramdac = TVP;
+ else
+ p->ramdac = IBM;
+
+ if (!pci_device_loc(dp, &bus, &devfn)) {
+ if (!pcibios_read_config_word(bus, devfn, PCI_COMMAND, &cmd)) {
+ cmd |= PCI_COMMAND_MEMORY;
+ pcibios_write_config_word(bus, devfn, PCI_COMMAND, cmd);
+ }
+ }
+
+ init_imstt(p);
+}
+
+__initfunc(void imsttfb_init(void))
+{
+ unsigned int i;
+ struct device_node *dp;
+ char *names[4] = {"IMS,tt128mb","IMS,tt128mbA","IMS,tt128mb8","IMS,tt128mb8A"};
+
+ if (prom_num_displays)
+ return;
+
+ for (i = 0; i < 4; i++) {
+ dp = find_devices(names[i]);
+ if (dp)
+ imsttfb_of_init(dp);
+ }
+}
--- /dev/null
+/* $Id: leofb.c,v 1.4 1998/09/04 15:43:45 jj Exp $
+ * leofb.c: Leo (ZX) 24/8bit frame buffer driver
+ *
+ * Copyright (C) 1996,1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
+ * Copyright (C) 1997 Michal Rehacek (Michal.Rehacek@st.mff.cuni.cz)
+ */
+
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/tty.h>
+#include <linux/malloc.h>
+#include <linux/vmalloc.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/fb.h>
+#include <linux/init.h>
+#include <linux/selection.h>
+
+#include <video/sbusfb.h>
+#include <asm/io.h>
+
+#define LEO_OFF_LC_SS0_KRN 0x00200000
+#define LEO_OFF_LC_SS0_USR 0x00201000
+#define LEO_OFF_LC_SS1_KRN 0x01200000
+#define LEO_OFF_LC_SS1_USR 0x01201000
+#define LEO_OFF_LD_SS0 0x00400000
+#define LEO_OFF_LD_SS1 0x01400000
+#define LEO_OFF_LD_GBL 0x00401000
+#define LEO_OFF_LX_KRN 0x00600000
+#define LEO_OFF_LX_CURSOR 0x00601000
+#define LEO_OFF_SS0 0x00800000
+#define LEO_OFF_SS1 0x01800000
+#define LEO_OFF_UNK 0x00602000
+#define LEO_OFF_UNK2 0x00000000
+
+#define LEO_CUR_ENABLE 0x00000080
+#define LEO_CUR_UPDATE 0x00000030
+#define LEO_CUR_PROGRESS 0x00000006
+#define LEO_CUR_UPDATECMAP 0x00000003
+
+#define LEO_CUR_TYPE_MASK 0x00000000
+#define LEO_CUR_TYPE_IMAGE 0x00000020
+#define LEO_CUR_TYPE_CMAP 0x00000050
+
+struct leo_cursor {
+ u8 xxx0[16];
+ volatile u32 cur_type;
+ volatile u32 cur_misc;
+ volatile u32 cur_cursxy;
+ volatile u32 cur_data;
+};
+
+#define LEO_KRN_TYPE_CLUT0 0x00001000
+#define LEO_KRN_TYPE_CLUT1 0x00001001
+#define LEO_KRN_TYPE_CLUT2 0x00001002
+#define LEO_KRN_TYPE_WID 0x00001003
+#define LEO_KRN_TYPE_UNK 0x00001006
+#define LEO_KRN_TYPE_VIDEO 0x00002003
+#define LEO_KRN_TYPE_CLUTDATA 0x00004000
+#define LEO_KRN_CSR_ENABLE 0x00000008
+#define LEO_KRN_CSR_PROGRESS 0x00000004
+#define LEO_KRN_CSR_UNK 0x00000002
+#define LEO_KRN_CSR_UNK2 0x00000001
+
+struct leo_lx_krn {
+ volatile u32 krn_type;
+ volatile u32 krn_csr;
+ volatile u32 krn_value;
+};
+
+struct leo_lc_ss0_krn {
+ volatile u32 misc;
+ u8 xxx0[0x800-4];
+ volatile u32 rev;
+};
+
+struct leo_lc_ss0_usr {
+ volatile u32 csr;
+ volatile u32 attrs;
+ volatile u32 fontc;
+ volatile u32 fontc2;
+ volatile u32 extent;
+ volatile u32 src;
+ u32 xxx1[1];
+ volatile u32 copy;
+ volatile u32 fill;
+};
+
+struct leo_lc_ss1_krn {
+ u8 unknown;
+};
+
+struct leo_lc_ss1_usr {
+ u8 unknown;
+};
+
+struct leo_ld_ss0 {
+ u8 xxx0[0xe00];
+ u32 xxx1[2];
+ volatile u32 unk;
+ u32 xxx2[1];
+ volatile u32 unk2;
+ volatile u32 unk3;
+ u32 xxx3[2];
+ volatile u32 fg;
+ volatile u32 bg;
+ u8 xxx4[0x05c];
+ volatile u32 planemask;
+ volatile u32 rop;
+};
+
+#define LEO_SS1_MISC_ENABLE 0x00000001
+#define LEO_SS1_MISC_STEREO 0x00000002
+struct leo_ld_ss1 {
+ u8 xxx0[0xef4];
+ volatile u32 ss1_misc;
+};
+
+struct leo_ld_gbl {
+ u8 unknown;
+};
+
+static struct sbus_mmap_map leo_mmap_map[] = {
+ { LEO_SS0_MAP, LEO_OFF_SS0, 0x800000 },
+ { LEO_LC_SS0_USR_MAP, LEO_OFF_LC_SS0_USR, PAGE_SIZE },
+ { LEO_LD_SS0_MAP, LEO_OFF_LD_SS0, PAGE_SIZE },
+ { LEO_LX_CURSOR_MAP, LEO_OFF_LX_CURSOR, PAGE_SIZE },
+ { LEO_SS1_MAP, LEO_OFF_SS1, 0x800000 },
+ { LEO_LC_SS1_USR_MAP, LEO_OFF_LC_SS1_USR, PAGE_SIZE },
+ { LEO_LD_SS1_MAP, LEO_OFF_LD_SS1, PAGE_SIZE },
+ { LEO_UNK_MAP, LEO_OFF_UNK, PAGE_SIZE },
+ { LEO_LX_KRN_MAP, LEO_OFF_LX_KRN, PAGE_SIZE },
+ { LEO_LC_SS0_KRN_MAP, LEO_OFF_LC_SS0_KRN, PAGE_SIZE },
+ { LEO_LC_SS1_KRN_MAP, LEO_OFF_LC_SS1_KRN, PAGE_SIZE },
+ { LEO_LD_GBL_MAP, LEO_OFF_LD_GBL, PAGE_SIZE },
+ { LEO_UNK2_MAP, LEO_OFF_UNK2, 0x100000 },
+ { 0, 0, 0 }
+};
+
+static void leo_setup(struct display *p)
+{
+ p->next_line = 8192;
+ p->next_plane = 0;
+}
+
+static void leo_clear(struct vc_data *conp, struct display *p, int sy, int sx,
+ int height, int width)
+{
+ struct fb_info_sbusfb *fb = (struct fb_info_sbusfb *)p->fb_info;
+ register struct leo_lc_ss0_usr *us = fb->s.leo.lc_ss0_usr;
+ register struct leo_ld_ss0 *ss = fb->s.leo.ld_ss0;
+ int x, y, w, h;
+ int i;
+
+ do {
+ i = us->csr;
+ } while (i & 0x20000000);
+ ss->unk = 0xffff;
+ ss->unk2 = 0;
+ ss->unk3 = fb->s.leo.extent;
+ ss->fg = (attr_bgcol_ec(p,conp)<<24) | 0x030703;
+ ss->planemask = 0xff000000;
+ ss->rop = 0xd0840;
+ if (fontheightlog(p)) {
+ y = sy << fontheightlog(p); h = height << fontheightlog(p);
+ } else {
+ y = sy * fontheight(p); h = height * fontheight(p);
+ }
+ if (fontwidthlog(p)) {
+ x = sx << fontwidthlog(p); w = width << fontwidthlog(p);
+ } else {
+ x = sx * fontwidth(p); w = width * fontwidth(p);
+ }
+ us->extent = (w - 1) | ((h - 1) << 11);
+ i = us->attrs;
+ us->fill = (x + fb->x_margin) | ((y + fb->y_margin) << 11) |
+ ((i & 3) << 29) | ((i & 8) ? 0x80000000 : 0);
+}
+
+static void leo_fill(struct fb_info_sbusfb *fb, struct display *p, int s,
+ int count, unsigned short *boxes)
+{
+ int i;
+ register struct leo_lc_ss0_usr *us = fb->s.leo.lc_ss0_usr;
+ register struct leo_ld_ss0 *ss = fb->s.leo.ld_ss0;
+
+ do {
+ i = us->csr;
+ } while (i & 0x20000000);
+ ss->unk = 0xffff;
+ ss->unk2 = 0;
+ ss->unk3 = fb->s.leo.extent;
+ ss->fg = (attr_bgcol(p,s)<<24) | 0x030703;
+ ss->planemask = 0xff000000;
+ ss->rop = 0xd0840;
+ while (count-- > 0) {
+ us->extent = (boxes[2] - boxes[0] - 1) |
+ ((boxes[3] - boxes[1] - 1) << 11);
+ i = us->attrs;
+ us->fill = boxes[0] | (boxes[1] << 11) |
+ ((i & 3) << 29) | ((i & 8) ? 0x80000000 : 0);
+ }
+}
+
+static void leo_putc(struct vc_data *conp, struct display *p, int c, int yy, int xx)
+{
+ struct fb_info_sbusfb *fb = (struct fb_info_sbusfb *)p->fb_info;
+ register struct leo_lc_ss0_usr *us = fb->s.leo.lc_ss0_usr;
+ register struct leo_ld_ss0 *ss = fb->s.leo.ld_ss0;
+ int i, x, y;
+ u8 *fd;
+ u32 *u;
+
+ if (fontheightlog(p)) {
+ y = yy << (fontheightlog(p) + 11);
+ i = (c & p->charmask) << fontheightlog(p);
+ } else {
+ y = (yy * fontheight(p)) << 11;
+ i = (c & p->charmask) * fontheight(p);
+ }
+ if (fontwidth(p) <= 8)
+ fd = p->fontdata + i;
+ else
+ fd = p->fontdata + (i << 1);
+ if (fontwidthlog(p))
+ x = xx << fontwidthlog(p);
+ else
+ x = xx * fontwidth(p);
+ do {
+ i = us->csr;
+ } while (i & 0x20000000);
+ ss->fg = attr_fgcol(p,c) << 24;
+ ss->bg = attr_bgcol(p,c) << 24;
+ ss->rop = 0x310040;
+ ss->planemask = 0xff000000;
+ us->fontc2 = 0xFFFFFFFE;
+ us->attrs = 4;
+ us->fontc = 0xFFFFFFFF<<(32-fontwidth(p));
+ u = ((u32 *)p->screen_base) + y + x;
+ if (fontwidth(p) <= 8) {
+ for (i = 0; i < fontheight(p); i++, u += 2048)
+ *u = *fd++ << 24;
+ } else {
+ for (i = 0; i < fontheight(p); i++, u += 2048) {
+ *u = *(u16 *)fd << 16;
+ fd += 2;
+ }
+ }
+}
+
+static void leo_putcs(struct vc_data *conp, struct display *p, const unsigned short *s,
+ int count, int yy, int xx)
+{
+ struct fb_info_sbusfb *fb = (struct fb_info_sbusfb *)p->fb_info;
+ register struct leo_lc_ss0_usr *us = fb->s.leo.lc_ss0_usr;
+ register struct leo_ld_ss0 *ss = fb->s.leo.ld_ss0;
+ int i, x, y;
+ u8 *fd1, *fd2, *fd3, *fd4;
+ u32 *u;
+
+ do {
+ i = us->csr;
+ } while (i & 0x20000000);
+ ss->fg = attr_fgcol(p,*s) << 24;
+ ss->bg = attr_bgcol(p,*s) << 24;
+ ss->rop = 0x310040;
+ ss->planemask = 0xff000000;
+ us->fontc2 = 0xFFFFFFFE;
+ us->attrs = 4;
+ us->fontc = 0xFFFFFFFF<<(32-fontwidth(p));
+ if (fontwidthlog(p))
+ x = (xx << fontwidthlog(p));
+ else
+ x = xx * fontwidth(p);
+ if (fontheightlog(p))
+ y = yy << (fontheightlog(p) + 11);
+ else
+ y = (yy * fontheight(p)) << 11;
+ u = ((u32 *)p->screen_base) + y + x;
+ if (fontwidth(p) <= 8) {
+ us->fontc = 0xFFFFFFFF<<(32-4*fontwidth(p));
+ x = 4*fontwidth(p) - fontheight(p)*2048;
+ while (count >= 4) {
+ count -= 4;
+ if (fontheightlog(p)) {
+ fd1 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
+ fd2 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
+ fd3 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
+ fd4 = p->fontdata + ((*s++ & p->charmask) << fontheightlog(p));
+ } else {
+ fd1 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
+ fd2 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
+ fd3 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
+ fd4 = p->fontdata + ((*s++ & p->charmask) * fontheight(p));
+ }
+ if (fontwidth(p) == 8) {
+ for (i = 0; i < fontheight(p); i++, u += 2048)
+ *u = ((u32)*fd4++) | ((((u32)*fd3++) | ((((u32)*fd2++) | (((u32)*fd1++)
+ << 8)) << 8)) << 8);
+ u += x;
+ } else {
+ for (i = 0; i < fontheight(p); i++, u += 2048)
+ *u = (((u32)*fd4++) | ((((u32)*fd3++) | ((((u32)*fd2++) | (((u32)*fd1++)
+ << fontwidth(p))) << fontwidth(p))) << fontwidth(p))) << (24 - 3 * fontwidth(p));
+ u += x;
+ }
+ }
+ } else {
+ us->fontc = 0xFFFFFFFF<<(32-2*fontwidth(p));
+ x = 2*fontwidth(p) - fontheight(p)*2048;
+ while (count >= 2) {
+ count -= 2;
+ if (fontheightlog(p)) {
+ fd1 = p->fontdata + ((*s++ & p->charmask) << (fontheightlog(p) + 1));
+ fd2 = p->fontdata + ((*s++ & p->charmask) << (fontheightlog(p) + 1));
+ } else {
+ fd1 = p->fontdata + (((*s++ & p->charmask) * fontheight(p)) << 1);
+ fd2 = p->fontdata + (((*s++ & p->charmask) * fontheight(p)) << 1);
+ }
+ for (i = 0; i < fontheight(p); i++, u += 2048) {
+ *u = ((((u32)*(u16 *)fd1) << fontwidth(p)) | ((u32)*(u16 *)fd2)) << (16 - fontwidth(p));
+ fd1 += 2; fd2 += 2;
+ }
+ u += x;
+ }
+ }
+ us->fontc = 0xFFFFFFFF<<(32-fontwidth(p));
+ x = fontwidth(p) - fontheight(p)*2048;
+ while (count) {
+ count--;
+ if (fontheightlog(p))
+ i = ((*s++ & p->charmask) << fontheightlog(p));
+ else
+ i = ((*s++ & p->charmask) * fontheight(p));
+ if (fontwidth(p) <= 8) {
+ fd1 = p->fontdata + i;
+ for (i = 0; i < fontheight(p); i++, u += 2048)
+ *u = *fd1++ << 24;
+ } else {
+ fd1 = p->fontdata + (i << 1);
+ for (i = 0; i < fontheight(p); i++, u += 2048) {
+ *u = *(u16 *)fd1 << 16;
+ fd1 += 2;
+ }
+ }
+ u += x;
+ }
+}
+
+static void leo_revc(struct display *p, int xx, int yy)
+{
+ /* Not used if hw cursor */
+}
+
+static int leo_wait (struct leo_lx_krn *lx_krn)
+{
+ int i;
+
+ for (i = 0; (lx_krn->krn_csr & LEO_KRN_CSR_PROGRESS) && i < 300000; i++)
+ udelay (1); /* Busy wait at most 0.3 sec */
+ if (i == 300000) return -EFAULT; /* Timed out - should we print some message? */
+ return 0;
+}
+
+static void leo_loadcmap (struct fb_info_sbusfb *fb, struct display *p, int index, int count)
+{
+ struct leo_lx_krn *lx_krn = fb->s.leo.lx_krn;
+ int i;
+
+ lx_krn->krn_type = LEO_KRN_TYPE_CLUT0;
+ i = leo_wait (lx_krn);
+ if (i) return;
+ lx_krn->krn_type = LEO_KRN_TYPE_CLUTDATA;
+ for (i = 0; i < 256; i++)
+ lx_krn->krn_value = fb->color_map CM(i,0) |
+ (fb->color_map CM(i,1) << 8) |
+ (fb->color_map CM(i,2) << 16); /* Throw colors there :)) */
+ lx_krn->krn_type = LEO_KRN_TYPE_CLUT0;
+ lx_krn->krn_csr |= (LEO_KRN_CSR_UNK|LEO_KRN_CSR_UNK2);
+}
+
+static void leo_restore_palette (struct fb_info_sbusfb *fb)
+{
+ fb->s.leo.ld_ss1->ss1_misc &= ~(LEO_SS1_MISC_ENABLE);
+}
+
+static struct display_switch leo_dispsw __initdata = {
+ leo_setup, fbcon_redraw_bmove, leo_clear, leo_putc, leo_putcs, leo_revc,
+ NULL, NULL, NULL, FONTWIDTHRANGE(1,16) /* Allow fontwidths up to 16 */
+};
+
+static void leo_setcursormap (struct fb_info_sbusfb *fb, u8 *red, u8 *green, u8 *blue)
+{
+ struct leo_cursor *l = fb->s.leo.cursor;
+ int i;
+
+ for (i = 0; (l->cur_misc & LEO_CUR_PROGRESS) && i < 300000; i++)
+ udelay (1); /* Busy wait at most 0.3 sec */
+ if (i == 300000) return; /* Timed out - should we print some message? */
+ l->cur_type = LEO_CUR_TYPE_CMAP;
+ l->cur_data = (red[0] | (green[0]<<8) | (blue[0]<<16));
+ l->cur_data = (red[1] | (green[1]<<8) | (blue[1]<<16));
+ l->cur_misc = LEO_CUR_UPDATECMAP;
+}
+
+/* Set cursor shape */
+static void leo_setcurshape (struct fb_info_sbusfb *fb)
+{
+ int i, j, k;
+ u32 m, n, mask;
+ struct leo_cursor *l = fb->s.leo.cursor;
+
+ l->cur_misc &= ~LEO_CUR_ENABLE;
+ for (k = 0; k < 2; k ++) {
+ l->cur_type = (k * LEO_CUR_TYPE_IMAGE); /* LEO_CUR_TYPE_MASK is 0 */
+ for (i = 0; i < 32; i++) {
+ mask = 0;
+ m = fb->cursor.bits[k][i];
+ /* mask = m with reversed bit order */
+ for (j = 0, n = 1; j < 32; j++, n <<= 1)
+ if (m & n)
+ mask |= (0x80000000 >> j);
+ l->cur_data = mask;
+ }
+ }
+ l->cur_misc |= LEO_CUR_ENABLE;
+}
+
+/* Load cursor information */
+static void leo_setcursor (struct fb_info_sbusfb *fb)
+{
+ struct cg_cursor *c = &fb->cursor;
+ struct leo_cursor *l = fb->s.leo.cursor;
+
+ l->cur_misc &= ~LEO_CUR_ENABLE;
+ l->cur_cursxy = ((c->cpos.fbx - c->chot.fbx) & 0x7ff)
+ |(((c->cpos.fby - c->chot.fby) & 0x7ff) << 11);
+ l->cur_misc |= LEO_CUR_UPDATE;
+ if (c->enable)
+ l->cur_misc |= LEO_CUR_ENABLE;
+}
+
+static void leo_blank (struct fb_info_sbusfb *fb)
+{
+ fb->s.leo.lx_krn->krn_type = LEO_KRN_TYPE_VIDEO;
+ fb->s.leo.lx_krn->krn_csr &= ~LEO_KRN_CSR_ENABLE;
+}
+
+static void leo_unblank (struct fb_info_sbusfb *fb)
+{
+ fb->s.leo.lx_krn->krn_type = LEO_KRN_TYPE_VIDEO;
+ if (!(fb->s.leo.lx_krn->krn_csr & LEO_KRN_CSR_ENABLE))
+ fb->s.leo.lx_krn->krn_csr |= LEO_KRN_CSR_ENABLE;
+}
+
+__initfunc(static int
+leo_wid_put (struct fb_info_sbusfb *fb, struct fb_wid_list *wl))
+{
+ struct leo_lx_krn *lx_krn = fb->s.leo.lx_krn;
+ struct fb_wid_item *wi;
+ int i, j;
+
+ lx_krn->krn_type = LEO_KRN_TYPE_WID;
+ i = leo_wait (lx_krn);
+ if (i) return i;
+ for (i = 0, wi = wl->wl_list; i < wl->wl_count; i++, wi++) {
+ switch (wi->wi_type) {
+ case FB_WID_DBL_8: j = (wi->wi_index & 0xf) + 0x40; break;
+ case FB_WID_DBL_24: j = wi->wi_index & 0x3f; break;
+ default: return -EINVAL;
+ }
+ lx_krn->krn_type = 0x5800 + j;
+ lx_krn->krn_value = wi->wi_values[0];
+ }
+ return 0;
+}
+
+static void leo_margins (struct fb_info_sbusfb *fb, struct display *p, int x_margin, int y_margin)
+{
+ p->screen_base += 8192 * (y_margin - fb->y_margin) + 4 * (x_margin - fb->x_margin);
+}
+
+static char idstring[40] __initdata = { 0 };
+
+__initfunc(char *leofb_init(struct fb_info_sbusfb *fb))
+{
+ struct fb_fix_screeninfo *fix = &fb->fix;
+ struct fb_var_screeninfo *var = &fb->var;
+ struct display *disp = &fb->disp;
+ struct fbtype *type = &fb->type;
+ unsigned long phys = fb->sbdp->reg_addrs[0].phys_addr;
+ struct fb_wid_item wi;
+ struct fb_wid_list wl;
+ int i;
+
+ strcpy(fb->info.modename, "Leo");
+
+ strcpy(fix->id, "Leo");
+ fix->visual = 0xff; /* We only know how to do acceleration and know nothing
+ about the actual memory layout */
+ fix->line_length = 8192;
+ fix->accel = FB_ACCEL_SUN_LEO;
+
+ var->accel_flags = FB_ACCELF_TEXT;
+
+ disp->scrollmode = SCROLL_YREDRAW;
+ if (!disp->screen_base)
+ disp->screen_base = (char *)sparc_alloc_io(phys + LEO_OFF_SS0, 0,
+ 0x800000, "leo_ram", fb->iospace, 0);
+ disp->screen_base += 8192 * fb->y_margin + 4 * fb->x_margin;
+ fb->s.leo.lc_ss0_usr = (struct leo_lc_ss0_usr *)
+ sparc_alloc_io(phys + LEO_OFF_LC_SS0_USR, 0,
+ PAGE_SIZE, "leo_lc_ss0_usr", fb->iospace, 0);
+ fb->s.leo.ld_ss0 = (struct leo_ld_ss0 *)
+ sparc_alloc_io(phys + LEO_OFF_LD_SS0, 0,
+ PAGE_SIZE, "leo_ld_ss0", fb->iospace, 0);
+ fb->s.leo.ld_ss1 = (struct leo_ld_ss1 *)
+ sparc_alloc_io(phys + LEO_OFF_LD_SS1, 0,
+ PAGE_SIZE, "leo_ld_ss1", fb->iospace, 0);
+ fb->s.leo.lx_krn = (struct leo_lx_krn *)
+ sparc_alloc_io(phys + LEO_OFF_LX_KRN, 0,
+ PAGE_SIZE, "leo_lx_krn", fb->iospace, 0);
+ fb->s.leo.cursor = (struct leo_cursor *)
+ sparc_alloc_io(phys + LEO_OFF_LX_CURSOR, 0,
+ sizeof(struct leo_cursor), "leo_lx_cursor", fb->iospace, 0);
+ fb->dispsw = leo_dispsw;
+
+ fb->s.leo.extent = (type->fb_width-1) | ((type->fb_height-1) << 16);
+
+ fb->s.leo.ld_ss0->unk = 0xffff;
+ fb->s.leo.ld_ss0->unk2 = 0;
+ fb->s.leo.ld_ss0->unk3 = fb->s.leo.extent;
+ wl.wl_count = 1;
+ wl.wl_list = &wi;
+ wi.wi_type = FB_WID_DBL_8;
+ wi.wi_index = 0;
+ wi.wi_values [0] = 0x2c0;
+ leo_wid_put (fb, &wl);
+ wi.wi_index = 1;
+ wi.wi_values [0] = 0x30;
+ leo_wid_put (fb, &wl);
+ wi.wi_index = 2;
+ wi.wi_values [0] = 0x20;
+ leo_wid_put (fb, &wl);
+
+ fb->s.leo.ld_ss1->ss1_misc |= LEO_SS1_MISC_ENABLE;
+
+ fb->s.leo.ld_ss0->fg = 0x30703;
+ fb->s.leo.ld_ss0->planemask = 0xff000000;
+ fb->s.leo.ld_ss0->rop = 0xd0840;
+ fb->s.leo.lc_ss0_usr->extent = (type->fb_width-1) | ((type->fb_height-1) << 11);
+ i = fb->s.leo.lc_ss0_usr->attrs;
+ fb->s.leo.lc_ss0_usr->fill = (0) | ((0) << 11) | ((i & 3) << 29) | ((i & 8) ? 0x80000000 : 0);
+ do {
+ i = fb->s.leo.lc_ss0_usr->csr;
+ } while (i & 0x20000000);
+
+ fb->margins = leo_margins;
+ fb->loadcmap = leo_loadcmap;
+ fb->setcursor = leo_setcursor;
+ fb->setcursormap = leo_setcursormap;
+ fb->setcurshape = leo_setcurshape;
+ fb->restore_palette = leo_restore_palette;
+ fb->fill = leo_fill;
+ fb->blank = leo_blank;
+ fb->unblank = leo_unblank;
+
+ fb->physbase = phys;
+ fb->mmap_map = leo_mmap_map;
+
+#ifdef __sparc_v9__
+ sprintf(idstring, "leo at %016lx", phys);
+#else
+ sprintf(idstring, "leo at %x.%08lx", fb->iospace, phys);
+#endif
+
+ return idstring;
+}
#include <asm/macintosh.h>
#include <linux/fb.h>
-
/* conditionalize these ?? */
-#include "fbcon-mfb.h"
-#include "fbcon-cfb2.h"
-#include "fbcon-cfb4.h"
-#include "fbcon-cfb8.h"
+#include <video/fbcon-mfb.h>
+#include <video/fbcon-cfb2.h>
+#include <video/fbcon-cfb4.h>
+#include <video/fbcon-cfb8.h>
#define arraysize(x) (sizeof(x)/sizeof(*(x)))
break;
#endif
default:
- display->dispsw = NULL;
+ display->dispsw = &fbcon_dummy;
break;
}
}
if (console_loglevel < 7)
return -EINVAL;
if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc, 0 /*offb_getcolreg*/, info);
+ return fb_get_cmap(cmap, kspc, 0 /*offb_getcolreg*/, info);
else if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else
return err;
}
if (con == currcon) /* current console? */
- return fb_set_cmap(cmap, &fb_display[con].var, kspc, 1 /*offb_setcolreg*/, info);
+ return fb_set_cmap(cmap, kspc, 1 /*offb_setcolreg*/, info);
else
fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
#endif
#include <linux/fb.h>
#include <linux/string.h>
-#include "macmodes.h"
+#include <video/macmodes.h>
struct mac_mode {
int number;
int mac_var_to_vmode(const struct fb_var_screeninfo *var, int *vmode,
int *cmode)
{
- int i = 0;
+ unsigned int i;
if (var->bits_per_pixel <= 8)
*cmode = CMODE_8;
continue;
if (var->pixclock > mode->pixclock)
continue;
- if (var->vmode != mode->vmode)
+ if ((var->vmode & FB_VMODE_MASK) != mode->vmode)
continue;
*vmode = mode->number;
return 0;
* more details.
*/
-#include <linux/config.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/fs.h>
--- /dev/null
+/* $Id: newport_con.c,v 1.3 1998/09/01 21:43:18 tsbogend Exp $
+ *
+ * newport_con.c: Abscon for newport hardware
+ *
+ * (C) 1998 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
+ *
+ * This driver is based on sgicons.c and cons_newport.
+ *
+ * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Copyright (C) 1997 Miguel de Icaza (miguel@nuclecu.unam.mx)
+ */
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/tty.h>
+#include <linux/kd.h>
+#include <linux/selection.h>
+#include <linux/console.h>
+#include <linux/console_struct.h>
+#include <linux/vt_kern.h>
+#include <linux/mm.h>
+
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/newport.h>
+
+struct newport_regs *npregs;
+int newport_num_lines;
+int newport_num_columns;
+int topscan;
+
+extern unsigned char vga_font[];
+
+#define BMASK(c) (c << 24)
+
+#define RENDER(regs, cp) do { \
+(regs)->go.zpattern = BMASK((cp)[0x0]); (regs)->go.zpattern = BMASK((cp)[0x1]); \
+(regs)->go.zpattern = BMASK((cp)[0x2]); (regs)->go.zpattern = BMASK((cp)[0x3]); \
+(regs)->go.zpattern = BMASK((cp)[0x4]); (regs)->go.zpattern = BMASK((cp)[0x5]); \
+(regs)->go.zpattern = BMASK((cp)[0x6]); (regs)->go.zpattern = BMASK((cp)[0x7]); \
+(regs)->go.zpattern = BMASK((cp)[0x8]); (regs)->go.zpattern = BMASK((cp)[0x9]); \
+(regs)->go.zpattern = BMASK((cp)[0xa]); (regs)->go.zpattern = BMASK((cp)[0xb]); \
+(regs)->go.zpattern = BMASK((cp)[0xc]); (regs)->go.zpattern = BMASK((cp)[0xd]); \
+(regs)->go.zpattern = BMASK((cp)[0xe]); (regs)->go.zpattern = BMASK((cp)[0xf]); \
+} while(0)
+
+#define TESTVAL 0xdeadbeef
+#define XSTI_TO_FXSTART(val) (((val) & 0xffff) << 11)
+
+static inline void newport_render_background(int xpos, int ypos, int ci)
+{
+ newport_wait();
+ npregs->set.wrmask = 0xffffffff;
+ npregs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_BLOCK |
+ NPORT_DMODE0_DOSETUP | NPORT_DMODE0_STOPX |
+ NPORT_DMODE0_STOPY);
+ npregs->set.colori = ci;
+ npregs->set.xystarti = (xpos << 16) | ((ypos + topscan) & 0x3ff);
+ npregs->go.xyendi = ((xpos + 7) << 16) | ((ypos + topscan + 15) & 0x3ff);
+}
+
+static inline void newport_init_cmap(void)
+{
+ unsigned short i;
+
+ for(i = 0; i < 16; i++) {
+ newport_bfwait();
+ newport_cmap_setaddr(npregs, color_table[i]);
+ newport_cmap_setrgb(npregs,
+ default_red[i],
+ default_grn[i],
+ default_blu[i]);
+ }
+}
+
+static inline void newport_clear_screen(int xstart, int ystart, int xend, int yend)
+{
+ newport_wait();
+ npregs->set.wrmask = 0xffffffff;
+ npregs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_BLOCK |
+ NPORT_DMODE0_DOSETUP | NPORT_DMODE0_STOPX |
+ NPORT_DMODE0_STOPY);
+ npregs->set.colori = 0;
+ npregs->set.xystarti = (xstart << 16) | ystart;
+ npregs->go.xyendi = (xend << 16) | yend;
+}
+
+static inline void newport_clear_lines(int ystart, int yend)
+{
+ ystart = ((ystart << 4) + topscan) & 0x3ff;
+ yend = ((yend << 4) + topscan + 15) & 0x3ff;
+ newport_clear_screen (0, ystart, 1279, yend);
+}
+
+void newport_reset (void)
+{
+ unsigned short treg;
+ int i;
+
+ newport_wait();
+ treg = newport_vc2_get(npregs, VC2_IREG_CONTROL);
+ newport_vc2_set(npregs, VC2_IREG_CONTROL, (treg | VC2_CTRL_EVIDEO));
+
+ treg = newport_vc2_get(npregs, VC2_IREG_CENTRY);
+ newport_vc2_set(npregs, VC2_IREG_RADDR, treg);
+ npregs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_RAM |
+ NPORT_DMODE_W2 | VC2_PROTOCOL);
+ for(i = 0; i < 128; i++) {
+ newport_bfwait();
+ if (i == 92 || i == 94)
+ npregs->set.dcbdata0.hwords.s1 = 0xff00;
+ else
+ npregs->set.dcbdata0.hwords.s1 = 0x0000;
+ }
+
+ newport_init_cmap();
+ npregs->cset.topscan = topscan = 0;
+ npregs->cset.xywin = (4096 << 16) | 4096;
+ /* Clear the screen. */
+ newport_clear_screen(0,0,1280+63,1024);
+}
+
+__initfunc(static const char *newport_startup(void))
+{
+ struct newport_regs *p;
+
+ npregs = (struct newport_regs *) (KSEG1 + 0x1f0f0000);
+
+ p = npregs;
+ p->cset.config = NPORT_CFG_GD0;
+
+ if(newport_wait()) {
+ return NULL;
+ }
+
+ p->set.xstarti = TESTVAL; if(p->set._xstart.i != XSTI_TO_FXSTART(TESTVAL)) {
+ return NULL;
+ }
+
+ newport_reset ();
+
+ // gfx_init (display_desc);
+ newport_num_lines = ORIG_VIDEO_LINES;
+ newport_num_columns = ORIG_VIDEO_COLS;
+
+ return "SGI Newport";
+}
+
+static void newport_init(struct vc_data *vc, int init)
+{
+ vc->vc_cols = newport_num_columns;
+ vc->vc_rows = newport_num_lines;
+ vc->vc_can_do_color = 1;
+}
+
+static void newport_clear(struct vc_data *vc, int sy, int sx, int height, int width)
+{
+ int xend = ((sx + width) << 3) - 1;
+ int ystart = ((sy << 4) + topscan) & 0x3ff;
+ int yend = (((sy + height) << 4) + topscan - 1) & 0x3ff;
+
+ if (ystart < yend) {
+ newport_clear_screen(sx << 3, ystart, xend, yend);
+ } else {
+ newport_clear_screen(sx << 3, ystart, xend, 1023);
+ newport_clear_screen(sx << 3, 0, xend, yend);
+ }
+}
+
+static void newport_putc(struct vc_data *vc, int charattr, int ypos, int xpos)
+{
+ unsigned char *p;
+
+ p = &vga_font[(charattr & 0xff) << 4];
+ charattr = (charattr >> 8) & 0xff;
+ xpos <<= 3;
+ ypos <<= 4;
+
+ newport_render_background(xpos, ypos, (charattr & 0xf0) >> 4);
+
+ /* Set the color and drawing mode. */
+ newport_wait();
+ npregs->set.colori = charattr & 0xf;
+ npregs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_BLOCK |
+ NPORT_DMODE0_STOPX | NPORT_DMODE0_ZPENAB |
+ NPORT_DMODE0_L32);
+
+ /* Set coordinates for bitmap operation. */
+ npregs->set.xystarti = (xpos << 16) | ((ypos + topscan) & 0x3ff);
+ npregs->set.xyendi = ((xpos + 7) << 16);
+ newport_wait();
+
+ /* Go, baby, go... */
+ RENDER(npregs, p);
+}
+
+static void newport_putcs(struct vc_data *vc, const unsigned short *s, int count,
+ int ypos, int xpos)
+{
+ while (count--)
+ newport_putc (vc, *s++, ypos, xpos++);
+}
+
+static void newport_cursor(struct vc_data *vc, int mode)
+{
+ unsigned short treg;
+ int xcurs, ycurs;
+
+ switch (mode) {
+ case CM_ERASE:
+ treg = newport_vc2_get(npregs, VC2_IREG_CONTROL);
+ newport_vc2_set(npregs, VC2_IREG_CONTROL, (treg & ~(VC2_CTRL_ECDISP)));
+ break;
+
+ case CM_MOVE:
+ case CM_DRAW:
+ treg = newport_vc2_get(npregs, VC2_IREG_CONTROL);
+ newport_vc2_set(npregs, VC2_IREG_CONTROL, (treg | VC2_CTRL_ECDISP));
+ xcurs = (vc->vc_pos - vc->vc_visible_origin) / 2;
+ ycurs = ((xcurs / vc->vc_cols) << 4) + 31;
+ xcurs = ((xcurs % vc->vc_cols) << 3) + 21;
+ newport_vc2_set(npregs, VC2_IREG_CURSX, xcurs);
+ newport_vc2_set(npregs, VC2_IREG_CURSY, ycurs);
+ }
+}
+
+static int newport_switch(struct vc_data *vc)
+{
+ npregs->cset.topscan = topscan = 0;
+ return 1;
+}
+
+static int newport_blank(struct vc_data *c, int blank)
+{
+ unsigned short treg;
+
+ if (blank == 0) {
+ /* unblank console */
+ treg = newport_vc2_get(npregs, VC2_IREG_CONTROL);
+ newport_vc2_set(npregs, VC2_IREG_CONTROL, (treg | VC2_CTRL_EDISP));
+ } else {
+ /* blank console */
+ treg = newport_vc2_get(npregs, VC2_IREG_CONTROL);
+ newport_vc2_set(npregs, VC2_IREG_CONTROL, (treg & ~(VC2_CTRL_EDISP)));
+ }
+ return 1;
+}
+
+static int newport_font_op(struct vc_data *vc, struct console_font_op *f)
+{
+ return -ENOSYS;
+}
+
+static int newport_set_palette(struct vc_data *vc, unsigned char *table)
+{
+ return -EINVAL;
+}
+
+static int newport_scrolldelta(struct vc_data *vc, int lines)
+{
+ /* there is (nearly) no off-screen memory, so we can't scroll back */
+ return 0;
+}
+
+static int newport_scroll(struct vc_data *vc, int t, int b, int dir, int lines)
+{
+ int count,x,y;
+ unsigned short *s, *d;
+ unsigned short chattr;
+
+ if (t == 0 && b == vc->vc_rows) {
+ if (dir == SM_UP) {
+ npregs->cset.topscan = topscan = (topscan + (lines << 4)) & 0x3ff;
+ newport_clear_lines (vc->vc_rows-lines,vc->vc_rows-1);
+ } else {
+ npregs->cset.topscan = topscan = (topscan + (-lines << 4)) & 0x3ff;
+ newport_clear_lines (0,lines-1);
+ }
+ return 0;
+ }
+
+ count = (b-t-lines) * vc->vc_cols;
+ if (dir == SM_UP) {
+ x = 0; y = t;
+ s = (unsigned short *)(vc->vc_origin + vc->vc_size_row*(t+lines));
+ d = (unsigned short *)(vc->vc_origin + vc->vc_size_row*t);
+ while (count--) {
+ chattr = scr_readw (s++);
+ if (chattr != scr_readw(d)) {
+ newport_putc (vc, chattr, y, x);
+ scr_writew (chattr, d);
+ }
+ d++;
+ if (++x == vc->vc_cols) {
+ x = 0; y++;
+ }
+ }
+ d = (unsigned short *)(vc->vc_origin + vc->vc_size_row*(b-lines));
+ x = 0; y = b-lines;
+ for (count = 0; count < (lines * vc->vc_cols); count++) {
+ if (scr_readw(d) != vc->vc_video_erase_char) {
+ newport_putc (vc, chattr, y, x);
+ scr_writew (vc->vc_video_erase_char, d);
+ }
+ d++;
+ if (++x == vc->vc_cols) {
+ x = 0; y++;
+ }
+ }
+ } else {
+ x = vc->vc_cols-1; y = b-1;
+ s = (unsigned short *)(vc->vc_origin + vc->vc_size_row*(b-lines)-2);
+ d = (unsigned short *)(vc->vc_origin + vc->vc_size_row*b-2);
+ while (count--) {
+ chattr = scr_readw (s--);
+ if (chattr != scr_readw(d)) {
+ newport_putc (vc, chattr, y, x);
+ scr_writew (chattr, d);
+ }
+ d--;
+ if (x-- == 0) {
+ x = vc->vc_cols-1; y--;
+ }
+ }
+ d = (unsigned short *)(vc->vc_origin + vc->vc_size_row*t);
+ x = 0; y = t;
+ for (count = 0; count < (lines * vc->vc_cols); count++) {
+ if (scr_readw(d) != vc->vc_video_erase_char) {
+ newport_putc (vc, vc->vc_video_erase_char, y, x);
+ scr_writew (vc->vc_video_erase_char, d);
+ }
+ d++;
+ if (++x == vc->vc_cols) {
+ x = 0; y++;
+ }
+ }
+ }
+ return 1;
+}
+
+static void newport_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx, int h, int w)
+{
+ short xs, ys, xe, ye, xoffs, yoffs, tmp;
+
+ xs = sx << 3; xe = ((sx+w) << 3)-1;
+ /*
+ * as bmove is only used to move stuff around in the same line
+ * (h == 1), we don't care about wrap arounds caused by topscan != 0
+ */
+ ys = ((sy << 4) + topscan) & 0x3ff; ye = (((sy+h) << 4)-1+topscan) & 0x3ff;
+ xoffs = (dx - sx) << 3;
+ yoffs = (dy - sy) << 4;
+ if (xoffs > 0) {
+ /* move to the right, exchange starting points */
+ tmp = xe; xe = xs; xs = tmp;
+ }
+ newport_wait();
+ npregs->set.drawmode0 = (NPORT_DMODE0_S2S | NPORT_DMODE0_BLOCK |
+ NPORT_DMODE0_DOSETUP | NPORT_DMODE0_STOPX |
+ NPORT_DMODE0_STOPY);
+ npregs->set.xystarti = (xs << 16) | ys;
+ npregs->set.xyendi = (xe << 16) | ye;
+ npregs->go.xymove = (xoffs << 16) | yoffs;
+}
+
+static int newport_dummy(struct vc_data *c)
+{
+ return 0;
+}
+
+#define DUMMY (void *) newport_dummy
+
+struct consw newport_con = {
+ newport_startup,
+ newport_init,
+ DUMMY, /* con_deinit */
+ newport_clear,
+ newport_putc,
+ newport_putcs,
+ newport_cursor,
+ newport_scroll,
+ newport_bmove,
+ newport_switch,
+ newport_blank,
+ newport_font_op,
+ newport_set_palette,
+ newport_scrolldelta,
+ DUMMY, /* newport_set_origin, */
+ DUMMY, /* newport_save_screen */
+ NULL, /* newport_build_attr */
+ NULL /* newport_invert_region */
+};
#include <asm/io.h>
#include <asm/prom.h>
-#include "fbcon.h"
-#include "fbcon-cfb8.h"
-#include "macmodes.h"
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/macmodes.h>
static int currcon = 0;
struct fb_info *info)
{
struct display *display;
- int oldbpp = -1, err;
+ unsigned int oldbpp = 0;
+ int err;
int activate = var->activate;
struct fb_info_offb *info2 = (struct fb_info_offb *)info;
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc, offb_getcolreg,
- info);
+ return fb_get_cmap(cmap, kspc, offb_getcolreg, info);
else if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else
return err;
}
if (con == currcon) /* current console? */
- return fb_set_cmap(cmap, &fb_display[con].var, kspc, offb_setcolreg,
- info);
+ return fb_set_cmap(cmap, kspc, offb_setcolreg, info);
else
fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
return 0;
#ifdef CONFIG_FB_S3TRIO
extern void s3triofb_init_of(struct device_node *dp);
#endif /* CONFIG_FB_S3TRIO */
+#ifdef CONFIG_FB_IMSTT
+extern void imsttfb_of_init(struct device_node *dp);
+#endif
#ifdef CONFIG_FB_CT65550
extern void chips_of_init(struct device_node *dp);
#endif /* CONFIG_FB_CT65550 */
#ifdef CONFIG_FB_CONTROL
extern void control_of_init(struct device_node *dp);
#endif /* CONFIG_FB_CONTROL */
+#ifdef CONFIG_FB_VALKYRIE
+extern void valkyrie_of_init(struct device_node *dp);
+#endif /* CONFIG_FB_VALKYRIE */
#ifdef CONFIG_FB_PLATINUM
extern void platinum_of_init(struct device_node *dp);
#endif /* CONFIG_FB_PLATINUM */
__initfunc(void offb_init(void))
{
struct device_node *dp;
- int dpy, i, *pp, len;
+ int i, *pp;
+ unsigned int dpy, len;
unsigned *up, address;
struct fb_fix_screeninfo *fix;
struct fb_var_screeninfo *var;
if (s3triofb_init_of(dp))
continue;
#endif /* CONFIG_FB_S3TRIO */
+#ifdef CONFIG_FB_IMSTT
+ if (!strncmp(dp->name, "IMS,tt128mb", 11)) {
+ imsttfb_of_init(dp);
+ continue;
+ }
+#endif
#ifdef CONFIG_FB_CT65550
if (!strcmp(dp->name, "chips65550")) {
chips_of_init(dp);
continue;
}
#endif /* CONFIG_FB_CONTROL */
+#ifdef CONFIG_FB_VALKYRIE
+ if(!strcmp(dp->name, "valkyrie")) {
+ valkyrie_of_init(dp);
+ continue;
+ }
+#endif /* CONFIG_FB_VALKYRIE */
#ifdef CONFIG_FB_PLATINUM
if (!strncmp(dp->name, "platinum",8)) {
- printk("jonh: offb_init sees device node %s\n", dp->name);
platinum_of_init(dp);
continue;
}
}
info = kmalloc(sizeof(struct fb_info_offb), GFP_ATOMIC);
+ if (info == 0)
+ continue;
+ memset(info, 0, sizeof(*info));
+
fix = &info->fix;
var = &info->var;
disp = &info->disp;
continue;
}
address = (u_long)dp->addrs[i].address;
+
+ /* kludge for valkyrie */
+ if (strcmp(dp->name, "valkyrie") == 0)
+ address += 0x1000;
+
}
fix->smem_start = (char *)address;
fix->type = FB_TYPE_PACKED_PIXELS;
#ifdef FBCON_HAS_CFB8
disp->dispsw = &fbcon_cfb8;
#else
- disp->dispsw = NULL;
+ disp->dispsw = &fbcon_dummy;
#endif
disp->scrollmode = SCROLL_YREDRAW;
{
/* Do we have to save the colormap? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1,
- offb_getcolreg, info);
+ fb_get_cmap(&fb_display[currcon].cmap, 1, offb_getcolreg, info);
currcon = con;
/* Install new colormap */
if (!info2->cmap_adr || regno > 255)
return 1;
- *red = info2->palette[regno].red;
- *green = info2->palette[regno].green;
- *blue = info2->palette[regno].blue;
+
+ *red = (info2->palette[regno].red<<8) | info2->palette[regno].red;
+ *green = (info2->palette[regno].green<<8) | info2->palette[regno].green;
+ *blue = (info2->palette[regno].blue<<8) | info2->palette[regno].blue;
+ *transp = 0;
return 0;
}
if (!info2->cmap_adr || regno > 255)
return 1;
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
+
info2->palette[regno].red = red;
info2->palette[regno].green = green;
info2->palette[regno].blue = blue;
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- offb_setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, offb_setcolreg, info);
else
fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
- &fb_display[con].var, 1, offb_setcolreg,
- info);
+ 1, offb_setcolreg, info);
}
/*
* platinumfb.c -- frame buffer device for the PowerMac 'platinum' display
*
- * Created 12 July 1998 by Dan Jacobowitz <dan@debian.org>
- * Copyright (C) 1998 Dan Jacobowitz
+ * Copyright (C) 1998 Franz Sirl
*
* Frame buffer structure from:
- * drivers/video/chipsfb.c -- frame buffer device for
- * Chips & Technologies 65550 chip.
- *
- * Copyright (C) 1998 Paul Mackerras
- *
- * This file is derived from the Powermac "chips" driver:
- * Copyright (C) 1997 Fabio Riccardi.
- * And from the frame buffer device for Open Firmware-initialized devices:
- * Copyright (C) 1997 Geert Uytterhoeven.
+ * drivers/video/controlfb.c -- frame buffer device for
+ * Apple 'control' display chip.
+ * Copyright (C) 1998 Dan Jacobowitz
*
* Hardware information from:
* platinum.c: Console support for PowerMac "platinum" display adaptor.
#include <asm/prom.h>
#include <asm/pgtable.h>
#include <asm/adb.h>
-#include <asm/cuda.h>
-#include "fbcon.h"
-#include "fbcon-cfb8.h"
-#include "fbcon-cfb16.h"
-#include "fbcon-cfb32.h"
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
+#include <video/fbcon-cfb32.h>
+#include <video/macmodes.h>
-#include "macmodes.h"
#include "platinumfb.h"
+static char fontname[40] __initdata = { 0 };
+
static int currcon = 0;
-static int switching = 0;
+
+static int default_vmode = VMODE_NVRAM;
+static int default_cmode = CMODE_NVRAM;
struct fb_par_platinum {
int vmode, cmode;
};
struct fb_info_platinum {
- struct fb_info info;
- struct fb_fix_screeninfo fix;
- struct fb_var_screeninfo var;
+ struct fb_info fb_info;
struct display disp;
- struct fb_par_platinum par;
+ struct fb_par_platinum default_par;
+ struct fb_par_platinum current_par;
+
struct {
__u8 red, green, blue;
- } palette[256];
+ } palette[256];
volatile struct cmap_regs *cmap_regs;
- unsigned long cmap_regs_phys;
+ unsigned long cmap_regs_phys;
volatile struct platinum_regs *platinum_regs;
- unsigned long platinum_regs_phys;
+ unsigned long platinum_regs_phys;
- __u8 *frame_buffer;
- __u8 *base_frame_buffer;
- unsigned long frame_buffer_phys;
+ __u8 *frame_buffer;
+ volatile __u8 *base_frame_buffer;
+ unsigned long frame_buffer_phys;
- int sense;
- unsigned long total_vram;
+ unsigned long total_vram;
+ int clktype;
+ int dactype;
+
+ union {
+#ifdef FBCON_HAS_CFB16
+ u16 cfb16[16];
+#endif
+#ifdef FBCON_HAS_CFB32
+ u32 cfb32[16];
+#endif
+ } fbcon_cmap;
};
/*
- * Exported functions
+ * Frame buffer device API
*/
-void platinum_init(void);
-void platinum_of_init(struct device_node *dp);
static int platinum_open(struct fb_info *info, int user);
static int platinum_release(struct fb_info *info, int user);
static int platinum_get_fix(struct fb_fix_screeninfo *fix, int con,
- struct fb_info *info);
+ struct fb_info *fb);
static int platinum_get_var(struct fb_var_screeninfo *var, int con,
- struct fb_info *info);
+ struct fb_info *fb);
static int platinum_set_var(struct fb_var_screeninfo *var, int con,
- struct fb_info *info);
+ struct fb_info *fb);
static int platinum_pan_display(struct fb_var_screeninfo *var, int con,
- struct fb_info *info);
+ struct fb_info *fb);
static int platinum_get_cmap(struct fb_cmap *cmap, int kspc, int con,
- struct fb_info *info);
+ struct fb_info *info);
static int platinum_set_cmap(struct fb_cmap *cmap, int kspc, int con,
- struct fb_info *info);
+ struct fb_info *info);
static int platinum_ioctl(struct inode *inode, struct file *file, u_int cmd,
- u_long arg, int con, struct fb_info *info);
+ u_long arg, int con, struct fb_info *info);
+
+
+/*
+ * Interface to the low level console driver
+ */
+
+static int platinum_switch(int con, struct fb_info *fb);
+static int platinum_updatevar(int con, struct fb_info *fb);
+static void platinum_blank(int blank, struct fb_info *fb);
+
+
+/*
+ * internal functions
+ */
-static int read_platinum_sense(struct fb_info_platinum *p);
static inline int platinum_vram_reqd(int video_mode, int color_mode);
-static void set_platinum_clock(struct fb_info_platinum *p, unsigned char *params);
-static void platinum_set_hardware(struct fb_info_platinum *p);
-static void platinum_par_to_all(struct fb_info_platinum *p, int init);
-static inline void platinum_par_to_var(struct fb_par_platinum *par, struct fb_var_screeninfo *var);
-static int platinum_var_to_par(struct fb_var_screeninfo *var,
- struct fb_par_platinum *par, const struct fb_info *fb_info);
-
-static void platinum_init_info(struct fb_info *info, struct fb_info_platinum *p);
-static void platinum_par_to_display(struct fb_par_platinum *par,
- struct display *disp, struct fb_fix_screeninfo *fix, struct fb_info_platinum *p);
-static void platinum_init_display(struct display *disp);
-static void platinum_par_to_fix(struct fb_par_platinum *par, struct fb_fix_screeninfo *fix,
- struct fb_info_platinum *p);
-static void platinum_init_fix(struct fb_fix_screeninfo *fix, struct fb_info_platinum *p);
+static int read_platinum_sense(struct fb_info_platinum *info);
+static void set_platinum_clock(struct fb_info_platinum *info);
+static void platinum_set_par(const struct fb_par_platinum *par, struct fb_info_platinum *info);
+static int platinum_par_to_var(struct fb_var_screeninfo *var,
+ const struct fb_par_platinum *par,
+ const struct fb_info_platinum *info);
+static int platinum_var_to_par(const struct fb_var_screeninfo *var,
+ struct fb_par_platinum *par,
+ const struct fb_info_platinum *info);
+static int platinum_encode_fix(struct fb_fix_screeninfo *fix,
+ const struct fb_par_platinum *par,
+ const struct fb_info_platinum *info);
+static int platinum_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
+ u_int *transp, struct fb_info *fb);
+static int platinum_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+ u_int transp, struct fb_info *fb);
+static void do_install_cmap(int con, struct fb_info *info);
+
+
+/*
+ * Interface used by the world
+ */
+
+void platinum_init(void);
+#ifdef CONFIG_FB_OF
+void platinum_of_init(struct device_node *dp);
+#endif
+void platinum_setup(char *options, int *ints);
+
static struct fb_ops platinumfb_ops = {
platinum_open,
platinum_ioctl
};
-static int platinum_getcolreg(u_int regno, u_int *red, u_int *green,
- u_int *blue, u_int *transp, struct fb_info *info);
-static int platinum_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
- u_int transp, struct fb_info *info);
-static void do_install_cmap(int con, struct fb_info *info);
-
-#define FUNCID { printk(KERN_INFO "entering %s\n", __FUNCTION__); }
__openfirmware
}
static int platinum_get_fix(struct fb_fix_screeninfo *fix, int con,
- struct fb_info *info)
+ struct fb_info *fb)
{
- struct fb_info_platinum *cp = (struct fb_info_platinum *) info;
+ const struct fb_info_platinum *info = (struct fb_info_platinum *)fb;
+ struct fb_par_platinum par;
- *fix = cp->fix;
+ if (con == -1)
+ par = info->default_par;
+ else
+ platinum_var_to_par(&fb_display[con].var, &par, info);
+
+ platinum_encode_fix(fix, &par, info);
return 0;
}
static int platinum_get_var(struct fb_var_screeninfo *var, int con,
- struct fb_info *info)
+ struct fb_info *fb)
{
- struct fb_info_platinum *cp = (struct fb_info_platinum *) info;
+ const struct fb_info_platinum *info = (struct fb_info_platinum *)fb;
+
+ if (con == -1)
+ platinum_par_to_var(var, &info->default_par, info);
+ else
+ *var = fb_display[con].var;
- *var = cp->var;
return 0;
}
-/* Sets everything according to var */
static int platinum_set_var(struct fb_var_screeninfo *var, int con,
- struct fb_info *info)
+ struct fb_info *fb)
{
- struct fb_info_platinum *p = (struct fb_info_platinum *) info;
- struct display *disp;
+ struct fb_info_platinum *info = (struct fb_info_platinum *) fb;
struct fb_par_platinum par;
- int depthchange, err;
+ struct display *display;
+ int oldxres, oldyres, oldvxres, oldvyres, oldbpp, err;
+ int activate = var->activate;
+
+ display = (con >= 0) ? &fb_display[con] : fb->disp;
-// FUNCID;
- disp = (con >= 0) ? &fb_display[con] : &p->disp;
if((err = platinum_var_to_par(var, &par, info))) {
- printk (KERN_ERR "Error in platinum_set_var, calling platinum_var_to_par: %d.\n", err);
+ printk(KERN_ERR "platinum_set_var: error calling platinum_var_to_par: %d.\n", err);
return err;
}
- if ((var->activate & FB_ACTIVATE_MASK) != FB_ACTIVATE_NOW) {
- printk("Not activating, in platinum_set_var.\n");
- platinum_par_to_var(&par, var);
+ platinum_par_to_var(var, &par, info);
+
+ if ((activate & FB_ACTIVATE_MASK) != FB_ACTIVATE_NOW) {
+ printk(KERN_INFO "platinum_set_var: Not activating.\n");
return 0;
}
-/* I know, we want to use fb_display[con], but grab certain info from p->var instead. */
-#define DIRTY(x) (p->var.x != var->x)
- depthchange = DIRTY(bits_per_pixel);
- if(!DIRTY(xres) && !DIRTY(yres) && !DIRTY(xres_virtual) &&
- !DIRTY(yres_virtual) && !DIRTY(bits_per_pixel)) {
- platinum_par_to_var(&par, var);
- p->var = disp->var = *var;
- return 0;
+
+ oldxres = display->var.xres;
+ oldyres = display->var.yres;
+ oldvxres = display->var.xres_virtual;
+ oldvyres = display->var.yres_virtual;
+ oldbpp = display->var.bits_per_pixel;
+ display->var = *var;
+
+ if (oldxres != var->xres || oldyres != var->yres ||
+ oldvxres != var->xres_virtual || oldyres != var->yres_virtual ||
+ oldbpp != var->bits_per_pixel) {
+ struct fb_fix_screeninfo fix;
+
+ platinum_encode_fix(&fix, &par, info);
+ display->screen_base = (char *) info->frame_buffer + 0x1000;
+ display->visual = fix.visual;
+ display->type = fix.type;
+ display->type_aux = fix.type_aux;
+ display->ypanstep = fix.ypanstep;
+ display->ywrapstep = fix.ywrapstep;
+ display->line_length = fix.line_length;
+ display->can_soft_blank = 1;
+ display->inverse = 0;
+
+ switch(par.cmode) {
+#ifdef FBCON_HAS_CFB8
+ case CMODE_8:
+ display->dispsw = &fbcon_cfb8;
+ break;
+#endif
+#ifdef FBCON_HAS_CFB16
+ case CMODE_16:
+ display->dispsw = &fbcon_cfb16;
+ display->dispsw_data = info->fbcon_cmap.cfb16;
+ break;
+#endif
+#ifdef FBCON_HAS_CFB32
+ case CMODE_32:
+ display->dispsw = &fbcon_cfb32;
+ display->dispsw_data = info->fbcon_cmap.cfb32;
+ break;
+#endif
+ default:
+ display->dispsw = &fbcon_dummy;
+ break;
+ }
+
+ display->scrollmode = SCROLL_YREDRAW;
+ if (info->fb_info.changevar)
+ (*info->fb_info.changevar)(con);
}
- printk("Original bpp is %d, new bpp %d.\n", p->var.bits_per_pixel, var->bits_per_pixel);
- /* OK, we're getting here at the right times... */
- p->par = par;
- platinum_par_to_var(&par, var);
- p->var = *var;
- platinum_par_to_fix(&par, &p->fix, p);
- platinum_par_to_display(&par, disp, &p->fix, p);
- p->disp = *disp;
-
- if(info->changevar && !switching) /* Don't want to do this if just switching consoles. */
- (*info->changevar)(con);
- if(con == currcon)
- platinum_set_hardware(p);
- if(depthchange)
- if((err = fb_alloc_cmap(&disp->cmap, 0, 0)))
- return err;
- if(depthchange || switching)
- do_install_cmap(con, info);
+
+ if (con == currcon)
+ platinum_set_par(&par, info);
+
+ if (oldbpp != var->bits_per_pixel) {
+ if ((err = fb_alloc_cmap(&display->cmap, 0, 0)))
+ return err;
+ do_install_cmap(con, &info->fb_info);
+ }
+
return 0;
}
static int platinum_pan_display(struct fb_var_screeninfo *var, int con,
- struct fb_info *info)
+ struct fb_info *info)
{
/*
* Pan (or wrap, depending on the `vmode' field) the display using the
* If the values don't fit, return -EINVAL.
*/
-// FUNCID;
if (var->xoffset != 0 || var->yoffset != 0)
return -EINVAL;
return 0;
}
static int platinum_get_cmap(struct fb_cmap *cmap, int kspc, int con,
- struct fb_info *info)
+ struct fb_info *info)
{
-// FUNCID;
if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc,
- platinum_getcolreg, info);
+ return fb_get_cmap(cmap, kspc, platinum_getcolreg, info);
if (fb_display[con].cmap.len) /* non default colormap? */
- fb_copy_cmap(&fb_display[con].cmap, cmap, kspc? 0: 2);
+ fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else {
int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
fb_copy_cmap(fb_default_cmap(size), cmap, kspc ? 0 : 2);
}
static int platinum_set_cmap(struct fb_cmap *cmap, int kspc, int con,
- struct fb_info *info)
+ struct fb_info *info)
{
- struct display *disp = &fb_display[con];
int err;
-// FUNCID;
- if (disp->cmap.len == 0) {
+ if (!fb_display[con].cmap.len) {
int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
- err = fb_alloc_cmap(&disp->cmap, size, 0);
+ err = fb_alloc_cmap(&fb_display[con].cmap, size, 0);
if (err)
return err;
}
if (con == currcon)
- return fb_set_cmap(cmap, &disp->var, kspc, platinum_setcolreg,
- info);
- fb_copy_cmap(cmap, &disp->cmap, kspc ? 0 : 1);
+ return fb_set_cmap(cmap, kspc, platinum_setcolreg, info);
+ fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
return 0;
}
static int platinum_ioctl(struct inode *inode, struct file *file, u_int cmd,
- u_long arg, int con, struct fb_info *info)
+ u_long arg, int con, struct fb_info *info)
{
-// FUNCID;
+ printk(KERN_ERR "platinum_ioctl not yet implemented\n");
return -EINVAL;
}
-static int platinum_switch(int con, struct fb_info *info)
+static int platinum_switch(int con, struct fb_info *fb)
{
-// FUNCID;
+ struct fb_info_platinum *info = (struct fb_info_platinum *) fb;
+ struct fb_par_platinum par;
+
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap,
- &fb_display[currcon].var, 1, platinum_getcolreg,
- info);
+ fb_get_cmap(&fb_display[currcon].cmap, 1, platinum_getcolreg,
+ fb);
currcon = con;
-#if 0
+
platinum_var_to_par(&fb_display[currcon].var, &par, info);
- platinum_set_par(&par, info); /*STOPPEDHERE - did i define that? */
- do_install_cmap(con, info);
-#else
- /* I see no reason not to do this. Minus info->changevar(). */
- /* DOH. This makes platinum_set_var compare, you guessed it, */
- /* fb_display[con].var (first param), and fb_display[con].var! */
- /* Perhaps I just fixed that... */
- switching = 1;
- platinum_set_var(&fb_display[con].var, con, info);
- switching = 0;
-#endif
- return 0;
+ platinum_set_par(&par, info);
+ do_install_cmap(con, fb);
+
+ return 1;
}
-static int platinum_updatevar(int con, struct fb_info *info)
+static int platinum_updatevar(int con, struct fb_info *fb)
{
+ printk(KERN_ERR "platinum_updatevar is doing nothing yet.\n");
return 0;
}
-static void platinum_blank(int blank_mode, struct fb_info *info)
+static void platinum_blank(int blank, struct fb_info *fb)
{
/*
* Blank the screen if blank_mode != 0, else unblank. If blank == NULL
*/
/* [danj] I think there's something fishy about those constants... */
/*
- struct fb_info_platinum *p = (struct fb_info_platinum *) info;
+ struct fb_info_platinum *info = (struct fb_info_platinum *) fb;
int ctrl;
- ctrl = ld_le32(&p->platinum_regs->ctrl.r) | 0x33;
- if (blank_mode)
+ ctrl = ld_le32(&info->platinum_regs->ctrl.r) | 0x33;
+ if (blank)
--blank_mode;
- if (blank_mode & VESA_VSYNC_SUSPEND)
+ if (blank & VESA_VSYNC_SUSPEND)
ctrl &= ~3;
- if (blank_mode & VESA_HSYNC_SUSPEND)
+ if (blank & VESA_HSYNC_SUSPEND)
ctrl &= ~0x30;
- out_le32(&p->platinum_regs->ctrl.r, ctrl);
+ out_le32(&info->platinum_regs->ctrl.r, ctrl);
*/
/* TODO: Figure out how the heck to powerdown this thing! */
-//FUNCID;
return;
}
static int platinum_getcolreg(u_int regno, u_int *red, u_int *green,
- u_int *blue, u_int *transp, struct fb_info *info)
+ u_int *blue, u_int *transp, struct fb_info *fb)
{
- struct fb_info_platinum *p = (struct fb_info_platinum *) info;
+ struct fb_info_platinum *info = (struct fb_info_platinum *) fb;
-// FUNCID;
- if (regno > 255 || regno < 0)
+ if (regno > 255)
return 1;
- *red = p->palette[regno].red;
- *green = p->palette[regno].green;
- *blue = p->palette[regno].blue;
+
+ *red = (info->palette[regno].red<<8) | info->palette[regno].red;
+ *green = (info->palette[regno].green<<8) | info->palette[regno].green;
+ *blue = (info->palette[regno].blue<<8) | info->palette[regno].blue;
+ *transp = 0;
return 0;
}
static int platinum_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
- u_int transp, struct fb_info *info)
+ u_int transp, struct fb_info *fb)
{
- struct fb_info_platinum *p = (struct fb_info_platinum *) info;
+ struct fb_info_platinum *info = (struct fb_info_platinum *) fb;
+ volatile struct cmap_regs *cmap_regs = info->cmap_regs;
+ int scale;
-// FUNCID;
- if (regno > 255 || regno < 0)
+ if (regno > 255)
return 1;
- p->palette[regno].red = red;
- p->palette[regno].green = green;
- p->palette[regno].blue = blue;
- out_8(&p->cmap_regs->addr, regno); /* tell clut what addr to fill */
- out_8(&p->cmap_regs->lut, red); /* send one color channel at */
- out_8(&p->cmap_regs->lut, green); /* a time... */
- out_8(&p->cmap_regs->lut, blue);
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
+
+ info->palette[regno].red = red;
+ info->palette[regno].green = green;
+ info->palette[regno].blue = blue;
+
+ scale = (info->current_par.cmode == CMODE_16) ? 3 : 0;
+
+ out_8(&cmap_regs->addr, regno); /* tell clut what addr to fill */
+ out_8(&cmap_regs->lut, red<<scale); /* send one color channel at */
+ out_8(&cmap_regs->lut, green<<scale); /* a time... */
+ out_8(&cmap_regs->lut, blue<<scale);
if(regno < 16) {
-#if 0
-#ifdef FBCON_HAS_CFB16
- fbcon_cfb16_cmap[regno] = (red << 10) | (green << 5) | blue;
-#endif
-#ifdef FBCON_HAS_CFB32
- fbcon_cfb32_cmap[regno] = (red << 16) | (green << 8) | blue;
- /* I think. */
-#endif
-#else
#ifdef FBCON_HAS_CFB16
- fbcon_cfb16_cmap[regno] = (regno << 10) | (regno << 5) | regno;
+ info->fbcon_cmap.cfb16[regno] = (regno << 10) | (regno << 5) | (regno << 0);
#endif
#ifdef FBCON_HAS_CFB32
- fbcon_cfb32_cmap[regno] = (regno << 24) | (regno << 16) | (regno << 8) | regno;
- /* I think. */
-#endif
+ info->fbcon_cmap.cfb32[regno] = (regno << 24) | (regno << 16) | (regno << 8) | regno;
#endif
}
return 0;
static void do_install_cmap(int con, struct fb_info *info)
{
-// FUNCID;
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- platinum_setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, platinum_setcolreg,
+ info);
else {
int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
- fb_set_cmap(fb_default_cmap(size), &fb_display[con].var, 1,
- platinum_setcolreg, info);
+ fb_set_cmap(fb_default_cmap(size), 1, platinum_setcolreg,
+ info);
}
}
-#ifdef CONFIG_FB_COMPAT_XPMAC
-extern struct vc_mode display_info;
-extern struct fb_info *console_fb_info;
-#if 0
-extern int (*console_setmode_ptr)(struct vc_mode *, int);
-extern int (*console_set_cmap_ptr)(struct fb_cmap *, int, int,
- struct fb_info *);
-int console_setmode(struct vc_mode *, int);
-#endif
-#endif /* CONFIG_FB_COMPAT_XPMAC */
-
static inline int platinum_vram_reqd(int video_mode, int color_mode)
{
- return vmode_attrs[video_mode - 1].vres
- * platinum_reg_init[video_mode-1]->pitch[color_mode];
+ return vmode_attrs[video_mode-1].vres *
+ (vmode_attrs[video_mode-1].hres * (1<<color_mode) + 0x20) +0x1000;
}
#define STORE_D2(a, d) { \
- out_8(&p->cmap_regs->addr, (a+32)); \
- out_8(&p->cmap_regs->d2, (d)); \
+ out_8(&cmap_regs->addr, (a+32)); \
+ out_8(&cmap_regs->d2, (d)); \
}
-static void set_platinum_clock(struct fb_info_platinum *p, unsigned char *clock_params)
+static void set_platinum_clock(struct fb_info_platinum *info)
{
-// FUNCID;
+ volatile struct cmap_regs *cmap_regs = info->cmap_regs;
+ struct platinum_regvals *init;
+
+ init = platinum_reg_init[info->current_par.vmode-1];
+
STORE_D2(6, 0xc6);
- out_8(&p->cmap_regs->addr,3+32);
- if (in_8(&p->cmap_regs->d2) == 2) {
- STORE_D2(7, clock_params[0]);
- STORE_D2(8, clock_params[1]);
+ out_8(&cmap_regs->addr,3+32);
+
+ if (in_8(&cmap_regs->d2) == 2) {
+ STORE_D2(7, init->clock_params[info->clktype][0]);
+ STORE_D2(8, init->clock_params[info->clktype][1]);
STORE_D2(3, 3);
} else {
- STORE_D2(4, clock_params[0]);
- STORE_D2(5, clock_params[1]);
+ STORE_D2(4, init->clock_params[info->clktype][0]);
+ STORE_D2(5, init->clock_params[info->clktype][1]);
STORE_D2(3, 2);
}
}
-__initfunc(static void init_platinum(struct fb_info_platinum *p))
-{
- struct fb_par_platinum *par = &p->par;
-
-// FUNCID;
- p->sense = read_platinum_sense(p);
- printk("Monitor sense value = 0x%x, ", p->sense);
- /* Try to pick a video mode out of NVRAM if we have one. */
- par->vmode = nvram_read_byte(NV_VMODE);
- if(par->vmode <= 0 || par->vmode > VMODE_MAX || !platinum_reg_init[par->vmode - 1])
- par->vmode = VMODE_CHOOSE;
- if(par->vmode == VMODE_CHOOSE)
- par->vmode = mac_map_monitor_sense(p->sense);
- if(!platinum_reg_init[par->vmode - 1])
- par->vmode = VMODE_640_480_67;
-
- par->cmode = nvram_read_byte(NV_CMODE);
- if(par->cmode < CMODE_8 || par->cmode > CMODE_32)
- par->cmode = CMODE_8;
- /*
- * Reduce the pixel size if we don't have enough VRAM.
- */
- while(par->cmode > CMODE_8 && platinum_vram_reqd(par->vmode, par->cmode) > p->total_vram)
- par->cmode--;
-
- printk("using video mode %d and color mode %d.\n", par->vmode, par->cmode);
-
- par->vxres = par->xres = vmode_attrs[par->vmode - 1].hres;
- par->vyres = par->yres = vmode_attrs[par->vmode - 1].vres;
- par->xoffset = par->yoffset = 0;
-
- platinum_par_to_all(p, 1);
-
- if (register_framebuffer(&p->info) < 0) {
- kfree(p);
- return;
- }
- platinum_set_hardware(p);
-
- printk("fb%d: platinum display adapter\n", GET_FB_IDX(p->info.node));
-}
-
/* Now how about actually saying, Make it so! */
/* Some things in here probably don't need to be done each time. */
-static void platinum_set_hardware(struct fb_info_platinum *p)
+static void platinum_set_par(const struct fb_par_platinum *par, struct fb_info_platinum *info)
{
- struct platinum_regvals *init;
- int i, dtype, clkmode;
- int vmode, cmode;
+ volatile struct platinum_regs *platinum_regs = info->platinum_regs;
+ volatile struct cmap_regs *cmap_regs = info->cmap_regs;
+ struct platinum_regvals *init;
+ int i;
+ int vmode, cmode;
-// FUNCID;
- vmode = p->par.vmode;
- cmode = p->par.cmode;
+ info->current_par = *par;
+
+ vmode = par->vmode;
+ cmode = par->cmode;
init = platinum_reg_init[vmode - 1];
/* Initialize display timing registers */
- out_be32(&p->platinum_regs->reg[24].r, 7); /* turn display off */
+ out_be32(&platinum_regs->reg[24].r, 7); /* turn display off */
for (i = 0; i < 26; ++i)
- out_be32(&p->platinum_regs->reg[i+32].r, init->regs[i]);
- out_be32(&p->platinum_regs->reg[26+32].r, (p->total_vram == 0x100000 ?
- init->offset[cmode] + 4 - cmode :
- init->offset[cmode]));
- out_be32(&p->platinum_regs->reg[16].r, (unsigned) p->frame_buffer_phys + init->fb_offset);
- out_be32(&p->platinum_regs->reg[18].r, init->pitch[cmode]);
- out_be32(&p->platinum_regs->reg[19].r, (p->total_vram == 0x100000 ?
- init->mode[cmode+1] :
- init->mode[cmode]));
- out_be32(&p->platinum_regs->reg[20].r, (p->total_vram == 0x100000 ? 0x11 : 0x1011));
- out_be32(&p->platinum_regs->reg[21].r, 0x100);
- out_be32(&p->platinum_regs->reg[22].r, 1);
- out_be32(&p->platinum_regs->reg[23].r, 1);
- out_be32(&p->platinum_regs->reg[26].r, 0xc00);
- out_be32(&p->platinum_regs->reg[27].r, 0x235);
- /* out_be32(&p->platinum_regs->reg[27].r, 0x2aa); */
-
- STORE_D2(0, (p->total_vram == 0x100000 ?
+ out_be32(&platinum_regs->reg[i+32].r, init->regs[i]);
+
+ out_be32(&platinum_regs->reg[26+32].r, (info->total_vram == 0x100000 ?
+ init->offset[cmode] + 4 - cmode :
+ init->offset[cmode]));
+ out_be32(&platinum_regs->reg[16].r, (unsigned) info->frame_buffer_phys + 0x1000 - 0x10);
+ out_be32(&platinum_regs->reg[18].r, init->pitch[cmode]);
+ out_be32(&platinum_regs->reg[19].r, (info->total_vram == 0x100000 ?
+ init->mode[cmode+1] :
+ init->mode[cmode]));
+ out_be32(&platinum_regs->reg[20].r, (info->total_vram == 0x100000 ? 0x11 : 0x1011));
+ out_be32(&platinum_regs->reg[21].r, 0x100);
+ out_be32(&platinum_regs->reg[22].r, 1);
+ out_be32(&platinum_regs->reg[23].r, 1);
+ out_be32(&platinum_regs->reg[26].r, 0xc00);
+ out_be32(&platinum_regs->reg[27].r, 0x235);
+ /* out_be32(&platinum_regs->reg[27].r, 0x2aa); */
+
+ STORE_D2(0, (info->total_vram == 0x100000 ?
init->dacula_ctrl[cmode] & 0xf :
init->dacula_ctrl[cmode]));
STORE_D2(1, 4);
STORE_D2(2, 0);
- /*
- * Try to determine whether we have an old or a new DACula.
- */
- out_8(&p->cmap_regs->addr, 0x40);
- dtype = in_8(&p->cmap_regs->d2);
- switch (dtype) {
- case 0x3c:
- clkmode = 1;
- break;
- case 0x84:
- clkmode = 0;
- break;
- default:
- clkmode = 0;
- printk("Unknown DACula type: %x\n", dtype);
- }
- set_platinum_clock(p, init->clock_params[clkmode]);
+ set_platinum_clock(info);
- out_be32(&p->platinum_regs->reg[24].r, 0); /* turn display on */
+ out_be32(&platinum_regs->reg[24].r, 0); /* turn display on */
#ifdef CONFIG_FB_COMPAT_XPMAC
- /* And let the world know the truth. */
- if (!console_fb_info || console_fb_info == &p->info) {
- display_info.height = p->var.yres;
- display_info.width = p->var.xres;
+ if (console_fb_info == &info->fb_info) {
+ display_info.height = par->yres;
+ display_info.width = par->xres;
display_info.depth = ( (cmode == CMODE_32) ? 32 :
((cmode == CMODE_16) ? 16 : 8));
- display_info.pitch = p->fix.line_length;
+ display_info.pitch = vmode_attrs[vmode-1].hres * (1<<cmode) + 0x20;
display_info.mode = vmode;
strncpy(display_info.name, "platinum",
sizeof(display_info.name));
- display_info.fb_address = p->frame_buffer_phys
- + init->fb_offset
- + 0x10;
- display_info.cmap_adr_address = p->cmap_regs_phys;
- display_info.cmap_data_address = p->cmap_regs_phys + 0x30;
- display_info.disp_reg_address = p->platinum_regs_phys;
- console_fb_info = &p->info;
+ display_info.fb_address = info->frame_buffer_phys + 0x1000;
+ display_info.cmap_adr_address = info->cmap_regs_phys;
+ display_info.cmap_data_address = info->cmap_regs_phys + 0x30;
+ display_info.disp_reg_address = info->platinum_regs_phys;
+
}
#endif /* CONFIG_FB_COMPAT_XPMAC */
}
+
+__initfunc(static int init_platinum(struct fb_info_platinum *info))
+{
+ struct fb_var_screeninfo var;
+ struct display *disp;
+ int sense;
+ int j,k;
+
+ sense = read_platinum_sense(info);
+ printk(KERN_INFO "Monitor sense value = 0x%x, ", sense);
+
+ if (default_vmode == VMODE_NVRAM) {
+ default_vmode = nvram_read_byte(NV_VMODE);
+ if (default_vmode <= 0 || default_vmode > VMODE_MAX ||
+ !platinum_reg_init[default_vmode-1])
+ default_vmode = VMODE_CHOOSE;
+ }
+ if (default_vmode == VMODE_CHOOSE) {
+ default_vmode = mac_map_monitor_sense(sense);
+ }
+ if (default_vmode <= 0 || default_vmode > VMODE_MAX)
+ default_vmode = VMODE_640_480_60;
+ if (default_cmode == CMODE_NVRAM)
+ default_cmode = nvram_read_byte(NV_CMODE);
+ if (default_cmode < CMODE_8 || default_cmode > CMODE_32)
+ default_cmode = CMODE_8;
+ /*
+ * Reduce the pixel size if we don't have enough VRAM.
+ */
+ while(default_cmode > CMODE_8 && platinum_vram_reqd(default_vmode, default_cmode) > info->total_vram)
+ default_cmode--;
+
+ printk("using video mode %d and color mode %d.\n", default_vmode, default_cmode);
+
+ mac_vmode_to_var(default_vmode, default_cmode, &var);
+
+ if (platinum_var_to_par(&var, &info->default_par, info)) {
+ printk(KERN_ERR "platinumfb: can't set default video mode\n");
+ return 0;
+ }
+
+ disp = &info->disp;
+
+ strcpy(info->fb_info.modename, "platinum");
+ info->fb_info.node = -1;
+ info->fb_info.fbops = &platinumfb_ops;
+ info->fb_info.disp = disp;
+ strcpy(info->fb_info.fontname, fontname);
+ info->fb_info.changevar = NULL;
+ info->fb_info.switch_con = &platinum_switch;
+ info->fb_info.updatevar = &platinum_updatevar;
+ info->fb_info.blank = &platinum_blank;
+
+ for (j = 0; j < 16; j++) {
+ k = color_table[j];
+ info->palette[j].red = default_red[k];
+ info->palette[j].green = default_grn[k];
+ info->palette[j].blue = default_blu[k];
+ }
+ platinum_set_var(&var, -1, &info->fb_info);
+
+ if (register_framebuffer(&info->fb_info) < 0)
+ return 0;
+
+ printk(KERN_INFO "fb%d: platinum frame buffer device\n",
+ GET_FB_IDX(info->fb_info.node));
+
+ return 1;
+}
+
__initfunc(void platinum_init(void))
{
#ifndef CONFIG_FB_OF
#endif /* CONFIG_FB_OF */
}
+#ifdef __powerpc__
+#define invalidate_cache(addr) \
+ asm volatile("eieio; dcbi 0,%1" \
+ : "=m" (*(addr)) : "r" (addr) : "memory");
+#else
+#define invalidate_cache(addr)
+#endif
+
__initfunc(void platinum_of_init(struct device_node *dp))
{
- struct fb_info_platinum *p;
+ struct fb_info_platinum *info;
unsigned long addr, size;
int i, bank0, bank1, bank2, bank3;
-//FUNCID;
+
if(dp->n_addrs != 2)
panic("expecting 2 address for platinum (got %d)", dp->n_addrs);
- p = kmalloc(sizeof(*p), GFP_ATOMIC);
- if (p == 0)
+
+ info = kmalloc(sizeof(*info), GFP_ATOMIC);
+ if (info == 0)
return;
+ memset(info, 0, sizeof(*info));
/* Map in frame buffer and registers */
for (i = 0; i < dp->n_addrs; ++i) {
size = dp->addrs[i].size;
if (size >= 0x400000) {
/* frame buffer - map only 4MB */
- p->frame_buffer_phys = addr;
- p->frame_buffer = __ioremap(addr, 0x400000, _PAGE_WRITETHRU);
- p->base_frame_buffer = p->frame_buffer;
+ info->frame_buffer_phys = addr;
+ info->frame_buffer = __ioremap(addr, 0x400000, _PAGE_WRITETHRU);
+ info->base_frame_buffer = info->frame_buffer;
} else {
/* registers */
- p->platinum_regs_phys = addr;
- p->platinum_regs = ioremap(addr, size);
+ info->platinum_regs_phys = addr;
+ info->platinum_regs = ioremap(addr, size);
}
}
- p->cmap_regs_phys = 0xf301b000; /* XXX not in prom? */
- p->cmap_regs = ioremap(p->cmap_regs_phys, 0x1000);
+
+ info->cmap_regs_phys = 0xf301b000; /* XXX not in prom? */
+ info->cmap_regs = ioremap(info->cmap_regs_phys, 0x1000);
/* Grok total video ram */
- out_be32(&p->platinum_regs->reg[16].r, (unsigned)p->frame_buffer_phys);
- out_be32(&p->platinum_regs->reg[20].r, 0x1011); /* select max vram */
- out_be32(&p->platinum_regs->reg[24].r, 0); /* switch in vram */
- eieio();
- p->frame_buffer[0x100000] = 0x34;
- asm volatile("eieio; dcbi 0,%0" : : "r" (&p->frame_buffer[0x100000]) : "memory");
- p->frame_buffer[0x200000] = 0x56;
- asm volatile("eieio; dcbi 0,%0" : : "r" (&p->frame_buffer[0x200000]) : "memory");
- p->frame_buffer[0x300000] = 0x78;
- asm volatile("eieio; dcbi 0,%0" : : "r" (&p->frame_buffer[0x300000]) : "memory");
+ out_be32(&info->platinum_regs->reg[16].r, (unsigned)info->frame_buffer_phys);
+ out_be32(&info->platinum_regs->reg[20].r, 0x1011); /* select max vram */
+ out_be32(&info->platinum_regs->reg[24].r, 0); /* switch in vram */
+
+ info->base_frame_buffer[0x100000] = 0x34;
+ info->base_frame_buffer[0x100008] = 0x0;
+ invalidate_cache(&info->base_frame_buffer[0x100000]);
+ info->base_frame_buffer[0x200000] = 0x56;
+ info->base_frame_buffer[0x200008] = 0x0;
+ invalidate_cache(&info->base_frame_buffer[0x200000]);
+ info->base_frame_buffer[0x300000] = 0x78;
+ info->base_frame_buffer[0x300008] = 0x0;
+ invalidate_cache(&info->base_frame_buffer[0x300000]);
bank0 = 1; /* builtin 1MB vram, always there */
- bank1 = p->frame_buffer[0x100000] == 0x34;
- bank2 = p->frame_buffer[0x200000] == 0x56;
- bank3 = p->frame_buffer[0x300000] == 0x78;
- p->total_vram = (bank0 + bank1 + bank2 + bank3) * 0x100000;
- printk("Total VRAM = %dMB\n", p->total_vram / 1024 / 1024);
+ bank1 = info->base_frame_buffer[0x100000] == 0x34;
+ bank2 = info->base_frame_buffer[0x200000] == 0x56;
+ bank3 = info->base_frame_buffer[0x300000] == 0x78;
+ info->total_vram = (bank0 + bank1 + bank2 + bank3) * 0x100000;
+ printk(KERN_INFO "Total VRAM = %dMB %d%d%d%d\n", (int) (info->total_vram / 1024 / 1024), bank3, bank2, bank1, bank0);
-// p->frame_buffer = p->base_frame_buffer
-// + platinum_reg_init[p->par.vmode-1]->fb_offset;
+ /*
+ * Try to determine whether we have an old or a new DACula.
+ */
+ out_8(&info->cmap_regs->addr, 0x40);
+ info->dactype = in_8(&info->cmap_regs->d2);
+ switch (info->dactype) {
+ case 0x3c:
+ info->clktype = 1;
+ break;
+ case 0x84:
+ info->clktype = 0;
+ break;
+ default:
+ info->clktype = 0;
+ printk(KERN_INFO "Unknown DACula type: %x\n", info->dactype);
+ break;
+ }
+
+ if (!init_platinum(info)) {
+ kfree(info);
+ return;
+ }
#ifdef CONFIG_FB_COMPAT_XPMAC
-#if 0
- console_set_cmap_ptr = platinum_set_cmap;
- console_setmode_ptr = platinum_console_setmode;
+ if (!console_fb_info)
+ console_fb_info = &info->fb_info;
#endif
-#endif /* CONFIG_FB_COMPAT_XPMAC */
-
- init_platinum(p);
}
/*
* Note that this can be called before calibrate_delay,
* so we can't use udelay.
*/
-static int read_platinum_sense(struct fb_info_platinum *p)
+static int read_platinum_sense(struct fb_info_platinum *info)
{
+ volatile struct platinum_regs *platinum_regs = info->platinum_regs;
int sense;
- out_be32(&p->platinum_regs->reg[23].r, 7); /* turn off drivers */
+ out_be32(&platinum_regs->reg[23].r, 7); /* turn off drivers */
__delay(2000);
- sense = (~in_be32(&p->platinum_regs->reg[23].r) & 7) << 8;
+ sense = (~in_be32(&platinum_regs->reg[23].r) & 7) << 8;
/* drive each sense line low in turn and collect the other 2 */
- out_be32(&p->platinum_regs->reg[23].r, 3); /* drive A low */
+ out_be32(&platinum_regs->reg[23].r, 3); /* drive A low */
__delay(2000);
- sense |= (~in_be32(&p->platinum_regs->reg[23].r) & 3) << 4;
- out_be32(&p->platinum_regs->reg[23].r, 5); /* drive B low */
+ sense |= (~in_be32(&platinum_regs->reg[23].r) & 3) << 4;
+ out_be32(&platinum_regs->reg[23].r, 5); /* drive B low */
__delay(2000);
- sense |= (~in_be32(&p->platinum_regs->reg[23].r) & 4) << 1;
- sense |= (~in_be32(&p->platinum_regs->reg[23].r) & 1) << 2;
- out_be32(&p->platinum_regs->reg[23].r, 6); /* drive C low */
+ sense |= (~in_be32(&platinum_regs->reg[23].r) & 4) << 1;
+ sense |= (~in_be32(&platinum_regs->reg[23].r) & 1) << 2;
+ out_be32(&platinum_regs->reg[23].r, 6); /* drive C low */
__delay(2000);
- sense |= (~in_be32(&p->platinum_regs->reg[23].r) & 6) >> 1;
+ sense |= (~in_be32(&platinum_regs->reg[23].r) & 6) >> 1;
- out_be32(&p->platinum_regs->reg[23].r, 7); /* turn off drivers */
+ out_be32(&platinum_regs->reg[23].r, 7); /* turn off drivers */
return sense;
}
-#if 0
/* This routine takes a user-supplied var, and picks the best vmode/cmode from it. */
-static int platinum_var_to_par(struct fb_var_screeninfo *var,
- struct fb_par_platinum *par, const struct fb_info *fb_info)
-{
- int xres = var->xres;
- int yres = var->yres;
- int bpp = var->bits_per_pixel;
-
- struct platinum_regvals *init;
- struct fb_info_platinum *p = (struct fb_info_platinum *) fb_info;
-
-// FUNCID;
- /*
- * Get the video params out of 'var'. If a value doesn't fit, round it up,
- * if it's too big, return -EINVAL.
- *
- * Suggestion: Round up in the following order: bits_per_pixel, xres,
- * yres, xres_virtual, yres_virtual, xoffset, yoffset, grayscale,
- * bitfields, horizontal timing, vertical timing.
- */
- /* swiped by jonh from atyfb.c */
- if (xres <= 512 && yres <= 384)
- par->vmode = VMODE_512_384_60; /* 512x384, 60Hz */
- else if (xres <= 640 && yres <= 480)
- par->vmode = VMODE_640_480_67; /* 640x480, 67Hz */
- else if (xres <= 640 && yres <= 870)
- par->vmode = VMODE_640_870_75P; /* 640x870, 75Hz (portrait) */
- else if (xres <= 768 && yres <= 576)
- par->vmode = VMODE_768_576_50I; /* 768x576, 50Hz (PAL full frame) */
- else if (xres <= 800 && yres <= 600)
- par->vmode = VMODE_800_600_75; /* 800x600, 75Hz */
- else if (xres <= 832 && yres <= 624)
- par->vmode = VMODE_832_624_75; /* 832x624, 75Hz */
- else if (xres <= 1024 && yres <= 768)
- par->vmode = VMODE_1024_768_75; /* 1024x768, 75Hz */
- else if (xres <= 1152 && yres <= 870)
- par->vmode = VMODE_1152_870_75; /* 1152x870, 75Hz */
- else if (xres <= 1280 && yres <= 960)
- par->vmode = VMODE_1280_960_75; /* 1280x960, 75Hz */
- else if (xres <= 1280 && yres <= 1024)
- par->vmode = VMODE_1280_1024_75; /* 1280x1024, 75Hz */
- else {
- printk(KERN_ERR "Bad resolution in platinum_var_to_par()!\n");
+static int platinum_var_to_par(const struct fb_var_screeninfo *var,
+ struct fb_par_platinum *par,
+ const struct fb_info_platinum *info)
+{
+ if(mac_var_to_vmode(var, &par->vmode, &par->cmode) != 0) {
+ printk(KERN_ERR "platinum_var_to_par: mac_var_to_vmode unsuccessful.\n");
+ printk(KERN_ERR "platinum_var_to_par: var->xres = %d\n", var->xres);
+ printk(KERN_ERR "platinum_var_to_par: var->yres = %d\n", var->yres);
+ printk(KERN_ERR "platinum_var_to_par: var->xres_virtual = %d\n", var->xres_virtual);
+ printk(KERN_ERR "platinum_var_to_par: var->yres_virtual = %d\n", var->yres_virtual);
+ printk(KERN_ERR "platinum_var_to_par: var->bits_per_pixel = %d\n", var->bits_per_pixel);
+ printk(KERN_ERR "platinum_var_to_par: var->pixclock = %d\n", var->pixclock);
+ printk(KERN_ERR "platinum_var_to_par: var->vmode = %d\n", var->vmode);
return -EINVAL;
}
- xres = vmode_attrs[par->vmode - 1].hres;
- yres = vmode_attrs[par->vmode - 1].vres;
-/*
- if (var->xres_virtual <= xres)
- par->vxres = xres;
- else
- par->vxres = (var->xres_virtual+7) & ~7;
- if (var->yres_virtual <= yres)
- par->vyres = yres;
- else
- par->vyres = var->yres_virtual;
-
- par->xoffset = (var->xoffset+7) & ~7;
- par->yoffset = var->yoffset;
- if (par->xoffset+xres > par->vxres || par->yoffset+yres > par->vyres)
+ if(!platinum_reg_init[par->vmode-1]) {
+ printk(KERN_ERR "platinum_var_to_par, vmode %d not valid.\n", par->vmode);
return -EINVAL;
-*/
+ }
- /* I'm too chicken to think about virtual */
- /* resolutions just yet. Bok bok. */
-
- /* And I'm too chicken to even figure out what they are. Awk awk. [danj] */
- if (var->xres_virtual > xres || var->yres_virtual > yres
- || var->xoffset != 0 || var->yoffset != 0) {
- printk(KERN_ERR "Bad virtual resolution in platinum_var_to_par()!\n");
+ if (platinum_vram_reqd(par->vmode, par->cmode) > info->total_vram) {
+ printk(KERN_ERR "platinum_var_to_par, not enough ram for vmode %d, cmode %d.\n", par->vmode, par->cmode);
return -EINVAL;
}
- par->xres = xres;
- par->yres = yres;
- par->vxres = xres;
- par->vyres = yres;
+ par->xres = vmode_attrs[par->vmode-1].hres;
+ par->yres = vmode_attrs[par->vmode-1].vres;
par->xoffset = 0;
par->yoffset = 0;
-
- if (bpp <= 8)
- par->cmode = CMODE_8;
- else if (bpp <= 16)
- par->cmode = CMODE_16;
- else if (bpp <= 32)
- par->cmode = CMODE_32;
- else {
- printk(KERN_ERR "Bad color mode in platinum_var_to_par()!\n");
- return -EINVAL;
- }
-
- if (platinum_vram_reqd(par->vmode, par->cmode) > p->total_vram) {
- printk(KERN_ERR "Bad vram size requested in platinum_var_to_par()!\n");
- return -EINVAL;
- }
- /* Check if we know about the wanted video mode */
- init = platinum_reg_init[par->vmode-1];
- if (init == NULL) {
- /* I'm not sure if platinum has any specific requirements -- */
- /* if we have a regvals struct, we're good to go? */
- printk(KERN_ERR "platinum_reg_init failed platinum_var_to_par()!\n");
- return -EINVAL;
- }
-
- return 0;
-}
-#else
-/* This routine takes a user-supplied var, and picks the best vmode/cmode from it. */
-static int platinum_var_to_par(struct fb_var_screeninfo *var,
- struct fb_par_platinum *par, const struct fb_info *fb_info)
-{
- struct fb_info_platinum *p = (struct fb_info_platinum *) fb_info;
-
-// FUNCID;
- if(mac_var_to_vmode(var, &par->vmode, &par->cmode) != 0)
- return -EINVAL;
- par->xres = par->vxres = vmode_attrs[par->vmode - 1].hres;
- par->yres = par->vyres = vmode_attrs[par->vmode - 1].vres;
- par->xoffset = par->yoffset = 0;
+ par->vxres = par->xres;
+ par->vyres = par->yres;
- if (platinum_vram_reqd(par->vmode, par->cmode) > p->total_vram)
- return -EINVAL;
-
- /* Check if we know about the wanted video mode */
- if(!platinum_reg_init[par->vmode-1]) {
- /* I'm not sure if platinum has any specific requirements -- */
- /* if we have a regvals struct, we're good to go? */
- return -EINVAL;
- }
return 0;
}
-#endif
-#if 0
-static void platinum_par_to_var(struct fb_par_platinum *par, struct fb_var_screeninfo *var)
-{
- memset(var, 0, sizeof(*var));
- var->xres = vmode_attrs[par->vmode - 1].hres;
- var->yres = vmode_attrs[par->vmode - 1].vres;
- var->xres_virtual = var->xres;
- var->yres_virtual = var->yres; /* For now. */
- var->xoffset = par->xoffset;
- var->yoffset = par->yoffset;
- var->grayscale = 0;
-
- if(par->cmode != CMODE_8 && par->cmode != CMODE_16 && par->cmode != CMODE_32) {
- printk(KERN_ERR "Bad color mode in platinum_par_to_var()!\n");
- par->cmode = CMODE_8;
- }
- switch(par->cmode) {
- case CMODE_8:
- var->bits_per_pixel = 8;
- var->red.offset = 0;
- var->red.length = 8;
- var->green.offset = 0;
- var->green.length = 8;
- var->blue.offset = 0;
- var->blue.length = 8;
- var->transp.offset = 0;
- var->transp.length = 0;
- break;
- case CMODE_16: /* RGB 555 */
- var->bits_per_pixel = 16;
- var->red.offset = 10;
- var->red.length = 5;
- var->green.offset = 5;
- var->green.length = 5;
- var->blue.offset = 0;
- var->blue.length = 5;
- var->transp.offset = 0;
- var->transp.length = 0;
- break;
- case CMODE_32: /* RGB 888 */
- var->bits_per_pixel = 32;
- var->red.offset = 16;
- var->red.length = 8;
- var->green.offset = 8;
- var->green.length = 8;
- var->blue.offset = 0;
- var->blue.length = 8;
- var->transp.offset = 24;
- var->transp.length = 8;
- break;
- }
- var->red.msb_right = 0;
- var->green.msb_right = 0;
- var->blue.msb_right = 0;
- var->transp.msb_right = 0;
- var->nonstd = 0;
- var->activate = 0;
- var->height = -1;
- var->width = -1;
- var->vmode = FB_VMODE_NONINTERLACED;
-
- /* these are total guesses, copied right out of atyfb.c */
- var->left_margin = var->right_margin = 64;
- var->upper_margin = var->lower_margin = 32;
- var->hsync_len = 8;
- var->vsync_len = 8;
- var->sync = 0;
-
-#if 1
-/* jonh's pixclocks...*/
- /* no long long support in the kernel :-( */
- /* this splittig trick will work if xres > 232 */
- var->pixclock = 1000000000/
- (var->left_margin+var->xres+var->right_margin+var->hsync_len);
- var->pixclock *= 1000;
- var->pixclock /= vmode_attrs[par->vmode-1].vfreq*
- (var->upper_margin+var->yres+var->lower_margin+var->vsync_len);
-#else
-/* danj's */
- /* 10^12 * clock_params[0] / (3906400 * clock_params[1] * 2^clock_params[2]) */
- /* (10^12 * clock_params[0] / (3906400 * clock_params[1])) >> clock_params[2] */
- /* (255990.17 * clock_params[0] / clock_params[1]) >> clock_params[2] */
- var->pixclock = 255990 * platinum_reg_init[par->vmode-1]->clock_params[0];
- var->pixclock /= platinum_reg_init[par->vmode-1]->clock_params[1];
- var->pixclock >>= platinum_reg_init[par->vmode-1]->clock_params[2];
-#endif
-}
-#else
-static inline void platinum_par_to_var(struct fb_par_platinum *par, struct fb_var_screeninfo *var)
+static int platinum_par_to_var(struct fb_var_screeninfo *var,
+ const struct fb_par_platinum *par,
+ const struct fb_info_platinum *info)
{
-// FUNCID;
- mac_vmode_to_var(par->vmode, par->cmode, var);
+ return mac_vmode_to_var(par->vmode, par->cmode, var);
}
-#endif
-static void platinum_init_fix(struct fb_fix_screeninfo *fix, struct fb_info_platinum *p)
+static int platinum_encode_fix(struct fb_fix_screeninfo *fix,
+ const struct fb_par_platinum *par,
+ const struct fb_info_platinum *info)
{
-// FUNCID;
memset(fix, 0, sizeof(*fix));
strcpy(fix->id, "platinum");
- fix->mmio_start = (char *)p->platinum_regs_phys;
+ fix->smem_start = (void *) (info->frame_buffer_phys + 0x1000);
+ fix->smem_len = (u32) info->total_vram - 0x1000;
+ fix->mmio_start = (char *) (info->platinum_regs_phys);
fix->mmio_len = 0x1000;
fix->type = FB_TYPE_PACKED_PIXELS;
-
fix->type_aux = 0;
fix->ywrapstep = 0;
fix->xpanstep = 0;
fix->ypanstep = 0;
-}
-
-/* Fix must already be inited ^^^^^^^ */
-static void platinum_par_to_fix(struct fb_par_platinum *par,
- struct fb_fix_screeninfo *fix,
- struct fb_info_platinum *p)
-{
-// FUNCID;
- fix->smem_start = (void *)(p->frame_buffer_phys);
- fix->smem_len = platinum_vram_reqd(par->vmode, par->cmode);
- /* Hmm, jonh used total_vram here. */
fix->visual = (par->cmode == CMODE_8) ?
FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR;
-// fix->line_length = par->vxres << par->cmode;
- fix->line_length = platinum_reg_init[par->vmode-1]->pitch[par->cmode];
-
-}
+ fix->line_length = vmode_attrs[par->vmode-1].hres * (1<<par->cmode) + 0x20;
-static void platinum_init_display(struct display *disp)
-{
- memset(disp, 0, sizeof(*disp));
- disp->type = /* fix->type */ FB_TYPE_PACKED_PIXELS;
- disp->can_soft_blank = 1;
- disp->scrollmode = SCROLL_YREDRAW;
-#if 0
- disp->type_aux = fix->type_aux;
- disp->cmap.red = NULL; /* ??? danj */
- disp->cmap.green = NULL;
- disp->cmap.blue = NULL;
- disp->cmap.transp = NULL;
- /* Yeah, I realize I just set 0 = 0. */
-#endif
-}
-
-static void platinum_par_to_display(struct fb_par_platinum *par,
- struct display *disp, struct fb_fix_screeninfo *fix, struct fb_info_platinum *p)
-{
-// FUNCID;
- disp->var = p->var;
- disp->screen_base = (char *) p->frame_buffer
- + platinum_reg_init[par->vmode-1]->fb_offset
- + ((par->yres % 16) / 2) * fix->line_length + 0x10;
- disp->visual = fix->visual;
- disp->line_length = fix->line_length;
-
- if(disp->scrollmode != SCROLL_YREDRAW) {
- printk(KERN_ERR "Scroll mode not YREDRAW in platinum_par_to_display!!\n");
- disp->scrollmode = SCROLL_YREDRAW;
- }
-
- switch(par->cmode) {
-#ifdef FBCON_HAS_CFB8
- case CMODE_8:
- disp->dispsw = &fbcon_cfb8;
- break;
-#endif
-#ifdef FBCON_HAS_CFB16
- case CMODE_16:
- disp->dispsw = &fbcon_cfb16;
- break;
-#endif
-#ifdef FBCON_HAS_CFB32
- case CMODE_32:
- disp->dispsw = &fbcon_cfb32;
- break;
-#endif
- default:
- disp->dispsw = NULL;
- break;
- }
+ return 0;
}
-static void platinum_init_info(struct fb_info *info, struct fb_info_platinum *p)
-{
-// FUNCID;
- strcpy(info->modename, p->fix.id);
- info->node = -1; /* ??? danj */
- info->fbops = &platinumfb_ops;
- info->disp = &p->disp;
- info->fontname[0] = 0;
- info->changevar = NULL;
- info->switch_con = &platinum_switch;
- info->updatevar = &platinum_updatevar;
- info->blank = &platinum_blank;
-}
-/* danj: Oh, I HOPE I didn't miss anything major in here... */
-static void platinum_par_to_all(struct fb_info_platinum *p, int init)
+/*
+ * Parse user speficied options (`video=platinumfb:')
+ */
+__initfunc(void platinum_setup(char *options, int *ints))
{
-// FUNCID;
- if(init) {
- platinum_init_fix(&p->fix, p);
- }
- platinum_par_to_fix(&p->par, &p->fix, p);
+ char *this_opt;
- platinum_par_to_var(&p->par, &p->var);
+ if (!options || !*options)
+ return;
- if(init) {
- platinum_init_display(&p->disp);
- }
- platinum_par_to_display(&p->par, &p->disp, &p->fix, p);
-
- if(init) {
- platinum_init_info(&p->info, p);
+ for (this_opt = strtok(options, ","); this_opt;
+ this_opt = strtok(NULL, ",")) {
+ if (!strncmp(this_opt, "font:", 5)) {
+ char *p;
+ int i;
+
+ p = this_opt + 5;
+ for (i = 0; i < sizeof(fontname) - 1; i++)
+ if (!*p || *p == ' ' || *p == ',')
+ break;
+ memcpy(fontname, this_opt + 5, i);
+ fontname[i] = 0;
+ }
+ if (!strncmp(this_opt, "vmode:", 6)) {
+ int vmode = simple_strtoul(this_opt+6, NULL, 0);
+ if (vmode > 0 && vmode <= VMODE_MAX)
+ default_vmode = vmode;
+ } else if (!strncmp(this_opt, "cmode:", 6)) {
+ int depth = simple_strtoul(this_opt+6, NULL, 0);
+ switch (depth) {
+ case 8:
+ default_cmode = CMODE_8;
+ break;
+ case 15:
+ case 16:
+ default_cmode = CMODE_16;
+ break;
+ case 24:
+ case 32:
+ default_cmode = CMODE_32;
+ break;
+ }
+ }
}
}
-
-#if 0
-__initfunc(void platinum_setup(char *options, int *ints))
-{
- /* Parse user speficied options (`video=platinumfb:') */
- FUNCID;
-}
-
-#endif
-
{{ 94, 5 + DIV16 }, { 48, 7 + DIV8 }}
};
-#define VMODE_MAX 20
-
static struct platinum_regvals *platinum_reg_init[VMODE_MAX] = {
&platinum_reg_init_1,
&platinum_reg_init_2,
{1280, 1024, 75}
};
-/* this stuff should probably be shared by the various vmode-based */
-/* drivers in a vmode.h header. */
-
-#define VMODE_NVRAM 0 /* use value stored in nvram */
-#define VMODE_512_384_60I 1 /* 512x384, 60Hz interlaced (NTSC) */
-#define VMODE_512_384_60 2 /* 512x384, 60Hz */
-#define VMODE_640_480_50I 3 /* 640x480, 50Hz interlaced (PAL) */
-#define VMODE_640_480_60I 4 /* 640x480, 60Hz interlaced (NTSC) */
-#define VMODE_640_480_60 5 /* 640x480, 60Hz (VGA) */
-#define VMODE_640_480_67 6 /* 640x480, 67Hz */
-#define VMODE_640_870_75P 7 /* 640x870, 75Hz (portrait) */
-#define VMODE_768_576_50I 8 /* 768x576, 50Hz (PAL full frame) */
-#define VMODE_800_600_56 9 /* 800x600, 56Hz */
-#define VMODE_800_600_60 10 /* 800x600, 60Hz */
-#define VMODE_800_600_72 11 /* 800x600, 72Hz */
-#define VMODE_800_600_75 12 /* 800x600, 75Hz */
-#define VMODE_832_624_75 13 /* 832x624, 75Hz */
-#define VMODE_1024_768_60 14 /* 1024x768, 60Hz */
-#define VMODE_1024_768_70 15 /* 1024x768, 70Hz (or 72Hz?) */
-#define VMODE_1024_768_75V 16 /* 1024x768, 75Hz (VESA) */
-#define VMODE_1024_768_75 17 /* 1024x768, 75Hz */
-#define VMODE_1152_870_75 18 /* 1152x870, 75Hz */
-#define VMODE_1280_960_75 19 /* 1280x960, 75Hz */
-#define VMODE_1280_1024_75 20 /* 1280x1024, 75Hz */
-#define VMODE_MAX 20
-#define VMODE_CHOOSE 99 /* choose based on monitor sense */
-
-#define CMODE_NVRAM -1 /* use value stored in nvram */
-#define CMODE_8 0 /* 8 bits/pixel */
-#define CMODE_16 1 /* 16 (actually 15) bits/pixel */
-#define CMODE_32 2 /* 32 (actually 24) bits/pixel */
-/* $Id: promcon.c,v 1.10 1998/07/24 15:31:53 jj Exp $
+/* $Id: promcon.c,v 1.12 1998/08/23 20:19:01 mj Exp $
* Console driver utilizing PROM sun terminal emulation
*
* Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
if (!init) {
if (conp->vc_cols != pw + 1 || conp->vc_rows != ph + 1)
vc_resize_con(ph + 1, pw + 1, conp->vc_num);
- else if (conp->vc_num == fg_console)
- update_screen(fg_console);
}
}
#include <asm/irq.h>
#include <asm/pgtable.h>
-#include "retz3fb.h"
-#include "fbcon.h"
-#include "fbcon-cfb8.h"
-#include "fbcon-cfb16.h"
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
+#include "retz3fb.h"
/* #define DEBUG if(1) */
#define DEBUG if(0)
static char retz3fb_name[16] = "RetinaZ3";
-static unsigned char retz3_color_table [256][4];
+static unsigned char retz3_color_table [256][3];
static unsigned long z3_mem;
static unsigned long z3_fbmem;
static unsigned long z3_size;
retz3_color_table [i][0] = i;
retz3_color_table [i][1] = i;
retz3_color_table [i][2] = i;
- retz3_color_table [i][3] = 0;
}
}
}
#endif
- retz3_setcolreg (255, 56, 100, 160, 0, NULL /* unused */);
+ retz3_setcolreg (255, 56<<8, 100<<8, 160<<8, 0, NULL /* unused */);
retz3_setcolreg (254, 0, 0, 0, 0, NULL /* unused */);
return 0;
if (par->bpp == 8)
fix->visual = FB_VISUAL_PSEUDOCOLOR;
else
- fix->visual = FB_VISUAL_DIRECTCOLOR;
+ fix->visual = FB_VISUAL_TRUECOLOR;
fix->xpanstep = 0;
fix->ypanstep = 0;
/*
- * Set a single color register. The values supplied are already
- * rounded down to the hardware's capabilities (according to the
- * entries in the var structure). Return != 0 for invalid regno.
+ * Set a single color register. Return != 0 for invalid regno.
*/
static int retz3_setcolreg(unsigned int regno, unsigned int red,
if (regno > 255)
return 1;
- retz3_color_table [regno][0] = red & 0xff;
- retz3_color_table [regno][1] = green & 0xff;
- retz3_color_table [regno][2] = blue & 0xff;
- retz3_color_table [regno][3] = transp;
+ red >>= 10;
+ green >>= 10;
+ blue >>= 10;
+
+ retz3_color_table [regno][0] = red;
+ retz3_color_table [regno][1] = green;
+ retz3_color_table [regno][2] = blue;
reg_w(VDAC_ADDRESS_W, regno);
- reg_w(VDAC_DATA, (red & 0xff) >> 2);
- reg_w(VDAC_DATA, (green & 0xff) >> 2);
- reg_w(VDAC_DATA, (blue & 0xff) >> 2);
+ reg_w(VDAC_DATA, red);
+ reg_w(VDAC_DATA, green);
+ reg_w(VDAC_DATA, blue);
return 0;
}
unsigned int *green, unsigned int *blue,
unsigned int *transp, struct fb_info *info)
{
+ int t;
+
if (regno > 255)
return 1;
- *red = retz3_color_table [regno][0];
- *green = retz3_color_table [regno][1];
- *blue = retz3_color_table [regno][2];
- *transp = retz3_color_table [regno][3];
+ t = retz3_color_table [regno][0];
+ *red = (t<<10) | (t<<4) | (t>>2);
+ t = retz3_color_table [regno][1];
+ *green = (t<<10) | (t<<4) | (t>>2);
+ t = retz3_color_table [regno][2];
+ *blue = (t<<10) | (t<<4) | (t>>2);
+ *transp = 0;
return 0;
}
else
for (i = 0; i < 256; i++){
reg_w(VDAC_ADDRESS_W, i);
- reg_w(VDAC_DATA, retz3_color_table [i][0] >> 2);
- reg_w(VDAC_DATA, retz3_color_table [i][1] >> 2);
- reg_w(VDAC_DATA, retz3_color_table [i][2] >> 2);
+ reg_w(VDAC_DATA, retz3_color_table [i][0]);
+ reg_w(VDAC_DATA, retz3_color_table [i][1]);
+ reg_w(VDAC_DATA, retz3_color_table [i][2]);
}
}
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- fbhw->setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, fbhw->setcolreg, info);
else
fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
- &fb_display[con].var, 1,
- fbhw->setcolreg, info);
+ 1, fbhw->setcolreg, info);
}
display->ywrapstep = fix.ywrapstep;
display->can_soft_blank = 1;
display->inverse = z3fb_inverse;
+
+ /*
+ * This seems to be about 20% faster.
+ */
+ display->scrollmode = SCROLL_YREDRAW;
+
switch (display->var.bits_per_pixel) {
#ifdef FBCON_HAS_CFB8
case 8:
break;
#endif
default:
- display->dispsw = NULL;
+ display->dispsw = &fbcon_dummy;
break;
}
}
break;
#endif
default:
- display->dispsw = NULL;
+ display->dispsw = &fbcon_dummy;
break;
}
/*
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return(fb_get_cmap(cmap, &fb_display[con].var, kspc,
- fbhw->getcolreg, info));
+ return(fb_get_cmap(cmap, kspc, fbhw->getcolreg, info));
else if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else
return err;
}
if (con == currcon) /* current console? */
- return(fb_set_cmap(cmap, &fb_display[con].var, kspc,
- fbhw->setcolreg, info));
+ return(fb_set_cmap(cmap, kspc, fbhw->setcolreg, info));
else
fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
return 0;
{
/* Do we have to save the colormap? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap,
- &fb_display[currcon].var, 1, fbhw->getcolreg,
+ fb_get_cmap(&fb_display[currcon].cmap, 1, fbhw->getcolreg,
info);
do_fb_set_var(&fb_display[con].var, 1);
static void fbcon_retz3_8_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width)
{
- int fontwidth = p->fontwidth;
+ int fontwidth = fontwidth(p);
sx *= fontwidth;
dx *= fontwidth;
retz3_bitblt(&p->var,
(unsigned short)sx,
- (unsigned short)(sy*p->fontheight),
+ (unsigned short)(sy*fontheight(p)),
(unsigned short)dx,
- (unsigned short)(dy*p->fontheight),
+ (unsigned short)(dy*fontheight(p)),
(unsigned short)width,
- (unsigned short)(height*p->fontheight),
+ (unsigned short)(height*fontheight(p)),
Z3BLTcopy,
0xffff);
}
sy, int sx, int height, int width)
{
unsigned short col;
- int fontwidth = p->fontwidth;
+ int fontwidth = fontwidth(p);
sx *= fontwidth;
width *= fontwidth;
retz3_bitblt(&p->var,
(unsigned short)sx,
- (unsigned short)(sy*p->fontheight),
+ (unsigned short)(sy*fontheight(p)),
(unsigned short)sx,
- (unsigned short)(sy*p->fontheight),
+ (unsigned short)(sy*fontheight(p)),
(unsigned short)width,
- (unsigned short)(height*p->fontheight),
+ (unsigned short)(height*fontheight(p)),
Z3BLTset,
col);
}
#include <asm/uaccess.h>
-#include "sbusfb.h"
+#include <video/sbusfb.h>
+
+#define DEFAULT_CURSOR_BLINK_RATE (2*HZ/5)
/*
* Interface used by the world
static int currcon;
static int defx_margin = -1, defy_margin = -1;
static char fontname[40] __initdata = { 0 };
+static int curblink __initdata = 1;
static struct {
int depth;
int xres, yres;
if (user) {
if (fb->vtconsole != -1) {
vt_cons[fb->vtconsole]->vc_mode = KD_TEXT;
- if (fb->mmaped)
+ if (fb->mmaped) {
+ fb->graphmode--;
sbusfb_clear_margin(&fb_display[fb->vtconsole], 0);
+ }
}
if (fb->reset)
fb->reset(fb);
fb->mmaped = 1;
if (fb->consolecnt && fb_display[lastconsole].fb_info == info) {
fb->vtconsole = lastconsole;
+ fb->graphmode++;
vt_cons [lastconsole]->vc_mode = KD_GRAPHICS;
+ vc_cons[lastconsole].d->vc_sw->con_cursor(vc_cons[lastconsole].d,CM_ERASE);
} else if (fb->unblank && !fb->blanked)
(*fb->unblank)(fb);
}
{
struct fb_info_sbusfb *fb = sbusfbinfod(p);
+ if (fb->switch_from_graph)
+ (*fb->switch_from_graph)(fb);
if (fb->fill) {
unsigned short rects [16];
fb_base -= (skip_bytes + fb->x_margin) / 8;
skip_bytes /= 8;
scr_size /= 8;
- memset (fb_base, ~0, skip_bytes - fb->x_margin / 8);
- memset (fb_base + scr_size - skip_bytes + fb->x_margin / 8, ~0, skip_bytes - fb->x_margin / 8);
+ mymemset (fb_base, skip_bytes - fb->x_margin / 8);
+ mymemset (fb_base + scr_size - skip_bytes + fb->x_margin / 8, skip_bytes - fb->x_margin / 8);
incr = fb->var.xres_virtual / 8;
size = fb->x_margin / 8 * 2;
for (q = fb_base + skip_bytes - fb->x_margin / 8, h = 0;
h <= he; q += incr, h++)
- memset (q, ~0, size);
+ mymemset (q, size);
} else {
fb_base -= (skip_bytes + fb->x_margin);
memset (fb_base, attr_bgcol(p,s), skip_bytes - fb->x_margin);
memset (q, attr_bgcol(p,s), size);
}
}
- if (fb->switch_from_graph)
- (*fb->switch_from_graph)(fb);
}
static void sbusfb_disp_setup(struct display *p)
static unsigned char hw_cursor_cmap[2] = { 0, 0xff };
+static void
+sbusfb_cursor_timer_handler(unsigned long dev_addr)
+{
+ struct fb_info_sbusfb *fb = (struct fb_info_sbusfb *)dev_addr;
+
+ if (!fb->setcursor) return;
+
+ if (fb->cursor.mode != 2) {
+ fb->cursor.enable ^= 1;
+ fb->setcursor(fb);
+ }
+
+ fb->cursor.timer.expires = jiffies + fb->cursor.blink_rate;
+ add_timer(&fb->cursor.timer);
+}
+
static void sbusfb_cursor(struct display *p, int mode, int x, int y)
{
struct fb_info_sbusfb *fb = sbusfbinfod(p);
switch (mode) {
case CM_ERASE:
+ fb->cursor.mode = 2;
fb->cursor.enable = 0;
(*fb->setcursor)(fb);
- fb->hw_cursor_shown = 0;
break;
case CM_MOVE:
case CM_DRAW:
- if (!fb->hw_cursor_shown) {
- fb->cursor.size.fbx = p->fontwidth;
- fb->cursor.size.fby = p->fontheight;
+ if (fb->cursor.mode) {
+ fb->cursor.size.fbx = fontwidth(p);
+ fb->cursor.size.fby = fontheight(p);
fb->cursor.chot.fbx = 0;
fb->cursor.chot.fby = 0;
fb->cursor.enable = 1;
memset (fb->cursor.bits, 0, sizeof (fb->cursor.bits));
- fb->cursor.bits[0][p->fontheight - 2] = (0xffffffff << (32 - p->fontwidth));
- fb->cursor.bits[1][p->fontheight - 2] = (0xffffffff << (32 - p->fontwidth));
- fb->cursor.bits[0][p->fontheight - 1] = (0xffffffff << (32 - p->fontwidth));
- fb->cursor.bits[1][p->fontheight - 1] = (0xffffffff << (32 - p->fontwidth));
+ fb->cursor.bits[0][fontheight(p) - 2] = (0xffffffff << (32 - fontwidth(p)));
+ fb->cursor.bits[1][fontheight(p) - 2] = (0xffffffff << (32 - fontwidth(p)));
+ fb->cursor.bits[0][fontheight(p) - 1] = (0xffffffff << (32 - fontwidth(p)));
+ fb->cursor.bits[1][fontheight(p) - 1] = (0xffffffff << (32 - fontwidth(p)));
(*fb->setcursormap) (fb, hw_cursor_cmap, hw_cursor_cmap, hw_cursor_cmap);
(*fb->setcurshape) (fb);
- fb->hw_cursor_shown = 1;
+ fb->cursor.mode = 0;
}
- if (p->fontwidthlog)
- fb->cursor.cpos.fbx = (x << p->fontwidthlog) + fb->x_margin;
+ if (fontwidthlog(p))
+ fb->cursor.cpos.fbx = (x << fontwidthlog(p)) + fb->x_margin;
else
- fb->cursor.cpos.fbx = (x * p->fontwidth) + fb->x_margin;
- if (p->fontheightlog)
- fb->cursor.cpos.fby = (y << p->fontheightlog) + fb->y_margin;
+ fb->cursor.cpos.fbx = (x * fontwidth(p)) + fb->x_margin;
+ if (fontheightlog(p))
+ fb->cursor.cpos.fby = (y << fontheightlog(p)) + fb->y_margin;
else
- fb->cursor.cpos.fby = (y * p->fontheight) + fb->y_margin;
+ fb->cursor.cpos.fby = (y * fontheight(p)) + fb->y_margin;
(*fb->setcursor)(fb);
break;
}
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc, sbusfb_getcolreg, info);
+ return fb_get_cmap(cmap, kspc, sbusfb_getcolreg, info);
else if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else
return err;
}
if (con == currcon) { /* current console? */
- err = fb_set_cmap(cmap, &fb_display[con].var, kspc, sbusfb_setcolreg, info);
+ err = fb_set_cmap(cmap, kspc, sbusfb_setcolreg, info);
if (!err) {
struct fb_info_sbusfb *fb = sbusfbinfo(info);
if (fb->loadcmap)
- (*fb->loadcmap)(fb, cmap->start, cmap->len);
+ (*fb->loadcmap)(fb, &fb_display[con], cmap->start, cmap->len);
}
return err;
} else
__put_user_ret(fb->color_map CM(i,2), bp, -EFAULT);
rp++; gp++; bp++;
}
- (*fb->loadcmap)(fb, index, count);
+ (*fb->loadcmap)(fb, NULL, index, count);
break;
}
case FBIOPUTCMAP_SPARC: { /* load color map entries */
__get_user_ret(fb->color_map CM(i,2), bp, -EFAULT);
rp++; gp++; bp++;
}
- (*fb->loadcmap)(fb, index, count);
+ (*fb->loadcmap)(fb, NULL, index, count);
break;
}
case FBIOGCURMAX: {
lastconsole = info->display_fg->vc_num;
if (vt_cons[lastconsole]->vc_mode == KD_TEXT)
return -EINVAL; /* Don't let graphics programs hide our nice text cursor */
- fb->hw_cursor_shown = 0; /* Forget state of our text cursor */
+ fb->cursor.mode = 2; /* Forget state of our text cursor */
}
return sbus_hw_scursor ((struct fbcursor *) arg, fb);
(*fb->setcursor) (fb);
break;
default:
- /* FIXME: Call here possible fb specific ioctl */
+ if (fb->ioctl)
+ return fb->ioctl(fb, cmd, arg);
return -EINVAL;
}
return 0;
break;
memcpy(fontname, p+5, i);
fontname[i] = 0;
- }
+ } else if (!strncmp(p, "noblink", 7))
+ curblink = 0;
while (*p && *p != ' ' && *p != ',') p++;
if (*p != ',') break;
p++;
/* Do we have to save the colormap? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1, sbusfb_getcolreg, info);
-
- lastconsole = info->display_fg->vc_num;
- if (lastconsole != con &&
- (fb_display[lastconsole].fontwidth != fb_display[con].fontwidth ||
- fb_display[lastconsole].fontheight != fb_display[con].fontheight))
- fb->hw_cursor_shown = 0;
+ fb_get_cmap(&fb_display[currcon].cmap, 1, sbusfb_getcolreg, info);
+
+ if (info->display_fg) {
+ lastconsole = info->display_fg->vc_num;
+ if (lastconsole != con &&
+ (fontwidth(&fb_display[lastconsole]) != fontwidth(&fb_display[con]) ||
+ fontheight(&fb_display[lastconsole]) != fontheight(&fb_display[con])))
+ fb->cursor.mode = 1;
+ }
x_margin = (fb_display[con].var.xres_virtual - fb_display[con].var.xres) / 2;
y_margin = (fb_display[con].var.yres_virtual - fb_display[con].var.yres) / 2;
if (fb->margins)
fb->margins(fb, &fb_display[con], x_margin, y_margin);
- if (fb->x_margin != x_margin || fb->y_margin != y_margin) {
+ if (fb->graphmode || fb->x_margin != x_margin || fb->y_margin != y_margin) {
fb->x_margin = x_margin; fb->y_margin = y_margin;
sbusfb_clear_margin(&fb_display[con], 0);
}
if (!fb->color_map || regno > 255)
return 1;
- *red = fb->color_map CM(regno, 0);
- *green = fb->color_map CM(regno, 1);
- *blue = fb->color_map CM(regno, 2);
+ *red = (fb->color_map CM(regno, 0)<<8) | fb->color_map CM(regno, 0);
+ *green = (fb->color_map CM(regno, 1)<<8) | fb->color_map CM(regno, 1);
+ *blue = (fb->color_map CM(regno, 2)<<8) | fb->color_map CM(regno, 2);
+ *transp = 0;
return 0;
}
if (!fb->color_map || regno > 255)
return 1;
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
fb->color_map CM(regno, 0) = red;
fb->color_map CM(regno, 1) = green;
fb->color_map CM(regno, 2) = blue;
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- sbusfb_setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, sbusfb_setcolreg, info);
else
fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
- &fb_display[con].var, 1, sbusfb_setcolreg, info);
+ 1, sbusfb_setcolreg, info);
if (fb->loadcmap)
- (*fb->loadcmap)(fb, 0, 256);
+ (*fb->loadcmap)(fb, &fb_display[con], 0, 256);
}
static int sbusfb_set_font(struct display *p, int width, int height)
p->var.xres = w - 2*x_margin;
p->var.yres = h - 2*y_margin;
- fb->hw_cursor_shown = 0;
+ fb->cursor.mode = 1;
if (fb->margins)
fb->margins(fb, p, x_margin, y_margin);
goto sizechange;
disp->dispsw = &fb->dispsw;
- if (fb->setcursor)
+ if (fb->setcursor) {
fb->dispsw.cursor = sbusfb_cursor;
+ if (curblink) {
+ fb->cursor.blink_rate = DEFAULT_CURSOR_BLINK_RATE;
+ init_timer(&fb->cursor.timer);
+ fb->cursor.timer.expires = jiffies + fb->cursor.blink_rate;
+ fb->cursor.timer.data = (unsigned long)fb;
+ fb->cursor.timer.function = sbusfb_cursor_timer_handler;
+ add_timer(&fb->cursor.timer);
+ }
+ }
fb->dispsw.set_font = sbusfb_set_font;
fb->setup = fb->dispsw.setup;
fb->dispsw.setup = sbusfb_disp_setup;
-/* $Id: tcxfb.c,v 1.1 1998/07/21 14:50:44 jj Exp $
+/* $Id: tcxfb.c,v 1.6 1998/09/04 15:43:46 jj Exp $
* tcxfb.c: TCX 24/8bit frame buffer driver
*
* Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz)
#include <linux/init.h>
#include <linux/selection.h>
-#include "sbusfb.h"
+#include <video/sbusfb.h>
#include <asm/io.h>
-#include "fbcon-cfb8.h"
+#include <video/fbcon-cfb8.h>
/* THC definitions */
#define TCX_THC_MISC_REV_SHIFT 16
tcx_set_control_plane (fb);
}
-static void tcx_loadcmap (struct fb_info_sbusfb *fb, int index, int count)
+static void tcx_loadcmap (struct fb_info_sbusfb *fb, struct display *p, int index, int count)
{
struct bt_regs *bt = fb->s.tcx.bt;
int i;
bt->color_map = fb->color_map CM(i,1) << 24;
bt->color_map = fb->color_map CM(i,2) << 24;
}
+ bt->addr = 0;
}
static void tcx_restore_palette (struct fb_info_sbusfb *fb)
struct display *disp = &fb->disp;
struct fbtype *type = &fb->type;
unsigned long phys = fb->sbdp->reg_addrs[0].phys_addr;
- int lowdepth;
+ int lowdepth, i, j;
#ifndef FBCON_HAS_CFB8
return NULL;
fb->blank = tcx_blank;
fb->unblank = tcx_unblank;
fb->reset = tcx_reset;
-
+
fb->physbase = 0;
+ for (i = 0; i < 13; i++) {
+ /* tcx_mmap_map has to be sorted by voff, while
+ order of phys registers from PROM differs a little
+ bit. Here is the correction */
+ switch (i) {
+ case 10: j = 12; break;
+ case 11:
+ case 12: j = i - 1; break;
+ default: j = i; break;
+ }
+ tcx_mmap_map[i].poff = fb->sbdp->reg_addrs[j].phys_addr;
+ }
fb->mmap_map = tcx_mmap_map;
-
+
/* Initialize Brooktree DAC */
fb->s.tcx.bt->addr = 0x04 << 24; /* color planes */
fb->s.tcx.bt->control = 0xff << 24;
fb->s.tcx.bt->control = 0x73 << 24;
fb->s.tcx.bt->addr = 0x07 << 24;
fb->s.tcx.bt->control = 0x00 << 24;
-
+
sprintf(idstring, "tcx at %x.%08lx Rev %d.%d %s", fb->iospace, phys,
(fb->s.tcx.thc->thc_rev >> TCX_THC_REV_REV_SHIFT) & TCX_THC_REV_REV_MASK,
(fb->s.tcx.thc->thc_rev >> TCX_THC_REV_MINREV_SHIFT) & TCX_THC_REV_MINREV_MASK,
lowdepth ? "8-bit only" : "24-bit depth");
tcx_reset(fb);
-
+
return idstring;
}
/* KNOWN PROBLEMS/TO DO ===================================================== *
*
- * - How to set a single color register?
+ * - How to set a single color register on 24-plane cards?
*
* - Hardware cursor (useful for other graphics boards too)
*
#include <linux/selection.h>
#include <asm/io.h>
-#include "fbcon.h"
-#include "fbcon-cfb8.h"
-#include "fbcon-cfb32.h"
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb32.h>
/* TGA hardware description (minimal) */
static struct display disp;
static struct fb_info fb_info;
static struct { u_char red, green, blue, pad; } palette[256];
+static u32 fbcon_cfb32_cmap[16];
static struct fb_fix_screeninfo fb_fix = { { "DEC TGA ", } };
static struct fb_var_screeninfo fb_var = { 0, };
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc, tgafb_getcolreg,
- info);
+ return fb_get_cmap(cmap, kspc, tgafb_getcolreg, info);
else if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else
- fb_copy_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
- cmap, kspc ? 0 : 2);
+ fb_copy_cmap(fb_default_cmap(256), cmap, kspc ? 0 : 2);
return 0;
}
int err;
if (!fb_display[con].cmap.len) { /* no colormap allocated? */
- if ((err = fb_alloc_cmap(&fb_display[con].cmap,
- 1<<fb_display[con].var.bits_per_pixel, 0)))
+ if ((err = fb_alloc_cmap(&fb_display[con].cmap, 256, 0)))
return err;
}
if (con == currcon) { /* current console? */
- err = fb_set_cmap(cmap, &fb_display[con].var, kspc, tgafb_setcolreg,
- info);
+ err = fb_set_cmap(cmap, kspc, tgafb_setcolreg, info);
#if 1
- tga_update_palette();
+ if (tga_type != 0)
+ tga_update_palette();
#endif
return err;
} else
TGA_WRITE_REG(temp & 0x000fffff, TGA_CURSOR_BASE_REG);
}
- /* finally, enable video scan & cursor
+ /* finally, enable video scan
(and pray for the monitor... :-) */
- TGA_WRITE_REG(0x05, TGA_VALID_REG); /* SCANNING and CURSOR */
+ TGA_WRITE_REG(0x01, TGA_VALID_REG); /* SCANNING */
fb_var.xres = fb_var.xres_virtual = 640;
fb_var.yres = fb_var.yres_virtual = 480;
case 1: /* 24-plane */
case 3: /* 24plusZ */
disp.dispsw = &fbcon_cfb32;
+ disp.dispsw_data = &fbcon_cfb32_cmap;
break;
#endif
default:
- disp.dispsw = NULL;
+ disp.dispsw = &fbcon_dummy;
}
disp.scrollmode = SCROLL_YREDRAW;
{
/* Do we have to save the colormap? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1,
- tgafb_getcolreg, info);
+ fb_get_cmap(&fb_display[currcon].cmap, 1, tgafb_getcolreg, info);
currcon = con;
/* Install new colormap */
static void tgafbcon_blank(int blank, struct fb_info *info)
{
- /* Nothing */
+ /* Should also do stuff here for vesa blanking -tor */
+
+ if (blank > 0) {
+ TGA_WRITE_REG(0x03, TGA_VALID_REG); /* SCANNING and BLANK */
+ } else {
+ TGA_WRITE_REG(0x01, TGA_VALID_REG); /* SCANNING */
+ }
}
/*
{
if (regno > 255)
return 1;
- *red = palette[regno].red;
- *green = palette[regno].green;
- *blue = palette[regno].blue;
+ *red = (palette[regno].red<<8) | palette[regno].red;
+ *green = (palette[regno].green<<8) | palette[regno].green;
+ *blue = (palette[regno].blue<<8) | palette[regno].blue;
+ *transp = 0;
return 0;
}
{
if (regno > 255)
return 1;
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
palette[regno].red = red;
palette[regno].green = green;
palette[regno].blue = blue;
fbcon_cfb32_cmap[regno] = (red << 16) | (green << 8) | blue;
#endif
- /* How to set a single color register?? */
+ if (tga_type == 0) { /* 8-plane */
+ BT485_WRITE(regno, BT485_ADDR_PAL_WRITE);
+ TGA_WRITE_REG(BT485_DATA_PAL, TGA_RAMDAC_SETUP_REG);
+ TGA_WRITE_REG(red|(BT485_DATA_PAL<<8),TGA_RAMDAC_REG);
+ TGA_WRITE_REG(green|(BT485_DATA_PAL<<8),TGA_RAMDAC_REG);
+ TGA_WRITE_REG(blue|(BT485_DATA_PAL<<8),TGA_RAMDAC_REG);
+ }
+ /* How to set a single color register on 24-plane cards?? */
return 0;
}
#if 1
/*
- * FIXME: since I don't know how to set a single arbitrary color register,
- * all color palette registers have to be updated
+ * FIXME: since I don't know how to set a single arbitrary color register
+ * on 24-plane cards, all color palette registers have to be updated
*/
static void tga_update_palette(void)
{
int i;
- if (tga_type == 0) { /* 8-plane */
- BT485_WRITE(0x00, BT485_ADDR_PAL_WRITE);
- TGA_WRITE_REG(BT485_DATA_PAL, TGA_RAMDAC_SETUP_REG);
- for (i = 0; i < 256; i++) {
- TGA_WRITE_REG(palette[i].red|(BT485_DATA_PAL<<8),TGA_RAMDAC_REG);
- TGA_WRITE_REG(palette[i].green|(BT485_DATA_PAL<<8),TGA_RAMDAC_REG);
- TGA_WRITE_REG(palette[i].blue|(BT485_DATA_PAL<<8),TGA_RAMDAC_REG);
- }
- } else {
- BT463_LOAD_ADDR(0x0000);
- TGA_WRITE_REG((BT463_PALETTE<<2), TGA_RAMDAC_REG);
+ BT463_LOAD_ADDR(0x0000);
+ TGA_WRITE_REG((BT463_PALETTE<<2), TGA_RAMDAC_REG);
- for (i = 0; i < 256; i++) {
- TGA_WRITE_REG(palette[i].red|(BT463_PALETTE<<10), TGA_RAMDAC_REG);
- TGA_WRITE_REG(palette[i].green|(BT463_PALETTE<<10), TGA_RAMDAC_REG);
- TGA_WRITE_REG(palette[i].blue|(BT463_PALETTE<<10), TGA_RAMDAC_REG);
- }
+ for (i = 0; i < 256; i++) {
+ TGA_WRITE_REG(palette[i].red|(BT463_PALETTE<<10), TGA_RAMDAC_REG);
+ TGA_WRITE_REG(palette[i].green|(BT463_PALETTE<<10), TGA_RAMDAC_REG);
+ TGA_WRITE_REG(palette[i].blue|(BT463_PALETTE<<10), TGA_RAMDAC_REG);
}
}
#endif
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- tgafb_setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, tgafb_setcolreg, info);
else
- fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
- &fb_display[con].var, 1, tgafb_setcolreg,
- info);
+ fb_set_cmap(fb_default_cmap(256), 1, tgafb_setcolreg, info);
#if 1
- tga_update_palette();
+ if (tga_type != 0)
+ tga_update_palette();
#endif
}
--- /dev/null
+/*
+ * valkyriefb.c -- frame buffer device for the PowerMac 'valkyrie' display
+ *
+ * Created 8 August 1998 by Martin Costabel and Kevin Schoedel
+ *
+ * Vmode-switching changes and vmode 15/17 modifications created 29 August
+ * 1998 by Barry Nathan <barryn@pobox.com>.
+ *
+ * Derived directly from:
+ *
+ * controlfb.c -- frame buffer device for the PowerMac 'control' display
+ * Copyright (C) 1998 Dan Jacobowitz <dan@debian.org>
+ *
+ * pmc-valkyrie.c -- Console support for PowerMac "valkyrie" display adaptor.
+ * Copyright (C) 1997 Paul Mackerras.
+ *
+ * and indirectly:
+ *
+ * Frame buffer structure from:
+ * drivers/video/chipsfb.c -- frame buffer device for
+ * Chips & Technologies 65550 chip.
+ *
+ * Copyright (C) 1998 Paul Mackerras
+ *
+ * This file is derived from the Powermac "chips" driver:
+ * Copyright (C) 1997 Fabio Riccardi.
+ * And from the frame buffer device for Open Firmware-initialized devices:
+ * Copyright (C) 1997 Geert Uytterhoeven.
+ *
+ * Hardware information from:
+ * control.c: Console support for PowerMac "control" display adaptor.
+ * Copyright (C) 1996 Paul Mackerras
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive for
+ * more details.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/tty.h>
+#include <linux/malloc.h>
+#include <linux/vmalloc.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/fb.h>
+#include <linux/selection.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/nvram.h>
+#ifdef CONFIG_FB_COMPAT_XPMAC
+#include <asm/vc_ioctl.h>
+#endif
+#include <asm/io.h>
+#include <asm/prom.h>
+#include <asm/pgtable.h>
+#include <asm/adb.h>
+#include <asm/cuda.h>
+
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
+#include <video/macmodes.h>
+
+#include "valkyriefb.h"
+
+static int can_soft_blank = 1;
+
+static int default_vmode = VMODE_NVRAM;
+static int default_cmode = CMODE_NVRAM;
+static char fontname[40] __initdata = { 0 };
+
+static int currcon = 0;
+static int switching = 0;
+
+struct fb_par_valkyrie {
+ int vmode, cmode;
+ int xres, yres;
+ int vxres, vyres;
+ int xoffset, yoffset;
+};
+
+struct fb_info_valkyrie {
+ struct fb_info info;
+ struct fb_fix_screeninfo fix;
+ struct fb_var_screeninfo var;
+ struct display disp;
+ struct fb_par_valkyrie par;
+ struct {
+ __u8 red, green, blue;
+ } palette[256];
+
+ struct cmap_regs *cmap_regs;
+ unsigned long cmap_regs_phys;
+
+ struct valkyrie_regs *valkyrie_regs;
+ unsigned long valkyrie_regs_phys;
+
+ __u8 *frame_buffer;
+ unsigned long frame_buffer_phys;
+
+ int sense;
+ unsigned long total_vram;
+#ifdef FBCON_HAS_CFB16
+ u16 fbcon_cfb16_cmap[16];
+#endif
+};
+
+/*
+ * Exported functions
+ */
+void valkyriefb_init(void);
+void valkyrie_of_init(struct device_node *dp);
+void valkyriefb_setup(char *options, int *ints);
+
+static int valkyrie_open(struct fb_info *info, int user);
+static int valkyrie_release(struct fb_info *info, int user);
+static int valkyrie_get_fix(struct fb_fix_screeninfo *fix, int con,
+ struct fb_info *info);
+static int valkyrie_get_var(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info);
+static int valkyrie_set_var(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info);
+static int valkyrie_pan_display(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info);
+static int valkyrie_get_cmap(struct fb_cmap *cmap, int kspc, int con,
+ struct fb_info *info);
+static int valkyrie_set_cmap(struct fb_cmap *cmap, int kspc, int con,
+ struct fb_info *info);
+static int valkyrie_ioctl(struct inode *inode, struct file *file, u_int cmd,
+ u_long arg, int con, struct fb_info *info);
+
+static int read_valkyrie_sense(struct fb_info_valkyrie *p);
+static inline int valkyrie_vram_reqd(int video_mode, int color_mode);
+static void set_valkyrie_clock(unsigned char *params);
+static void valkyrie_set_par(const struct fb_par_valkyrie *p, struct fb_info_valkyrie *info);
+static inline int valkyrie_par_to_var(struct fb_par_valkyrie *par, struct fb_var_screeninfo *var);
+static int valkyrie_var_to_par(struct fb_var_screeninfo *var,
+ struct fb_par_valkyrie *par, const struct fb_info *fb_info);
+
+static void valkyrie_init_info(struct fb_info *info, struct fb_info_valkyrie *p);
+static void valkyrie_par_to_display(struct fb_par_valkyrie *par,
+ struct display *disp, struct fb_fix_screeninfo *fix, struct fb_info_valkyrie *p);
+static void valkyrie_init_display(struct display *disp);
+static void valkyrie_par_to_fix(struct fb_par_valkyrie *par, struct fb_fix_screeninfo *fix,
+ struct fb_info_valkyrie *p);
+static void valkyrie_init_fix(struct fb_fix_screeninfo *fix, struct fb_info_valkyrie *p);
+
+static struct fb_ops valkyriefb_ops = {
+ valkyrie_open,
+ valkyrie_release,
+ valkyrie_get_fix,
+ valkyrie_get_var,
+ valkyrie_set_var,
+ valkyrie_get_cmap,
+ valkyrie_set_cmap,
+ valkyrie_pan_display,
+ valkyrie_ioctl
+};
+
+static int valkyriefb_getcolreg(u_int regno, u_int *red, u_int *green,
+ u_int *blue, u_int *transp, struct fb_info *info);
+static int valkyriefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+ u_int transp, struct fb_info *info);
+static void do_install_cmap(int con, struct fb_info *info);
+
+
+__openfirmware
+
+
+static int valkyrie_open(struct fb_info *info, int user)
+{
+ MOD_INC_USE_COUNT;
+ return 0;
+}
+
+static int valkyrie_release(struct fb_info *info, int user)
+{
+ MOD_DEC_USE_COUNT;
+ return 0;
+}
+
+static int valkyrie_get_fix(struct fb_fix_screeninfo *fix, int con,
+ struct fb_info *info)
+{
+ struct fb_info_valkyrie *cp = (struct fb_info_valkyrie *) info;
+
+ *fix = cp->fix;
+ return 0;
+}
+
+static int valkyrie_get_var(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info)
+{
+ struct fb_info_valkyrie *cp = (struct fb_info_valkyrie *) info;
+
+ *var = cp->var;
+ return 0;
+}
+
+/* Sets everything according to var */
+static int valkyrie_set_var(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info)
+{
+ struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info;
+ struct display *disp;
+ struct fb_par_valkyrie par;
+ int depthchange, err;
+
+ disp = (con >= 0) ? &fb_display[con] : &p->disp;
+ if ((err = valkyrie_var_to_par(var, &par, info))) {
+ /* printk (KERN_ERR "Error in valkyrie_set_var, calling valkyrie_var_to_par: %d.\n", err); */
+ return err;
+ }
+
+ if ((var->activate & FB_ACTIVATE_MASK) != FB_ACTIVATE_NOW) {
+ /* printk("Not activating, in valkyrie_set_var.\n"); */
+ valkyrie_par_to_var(&par, var);
+ return 0;
+ }
+
+ /*
+ * I know, we want to use fb_display[con], but grab certain info
+ * from p->var instead.
+ */
+#define DIRTY(x) (p->var.x != var->x)
+ depthchange = DIRTY(bits_per_pixel);
+ /* adding "&& !DIRTY(pixclock)" corrects vmode-switching problems */
+ if(!DIRTY(xres) && !DIRTY(yres) && !DIRTY(xres_virtual) &&
+ !DIRTY(yres_virtual) && !DIRTY(bits_per_pixel) && !DIRTY(pixclock)) {
+ valkyrie_par_to_var(&par, var);
+ p->var = disp->var = *var;
+ return 0;
+ }
+
+ p->par = par;
+ valkyrie_par_to_var(&par, var);
+ p->var = *var;
+ valkyrie_par_to_fix(&par, &p->fix, p);
+ valkyrie_par_to_display(&par, disp, &p->fix, p);
+ p->disp = *disp;
+
+ if (info->changevar && !switching) {
+ /* Don't want to do this if just switching consoles. */
+ (*info->changevar)(con);
+ }
+ if (con == currcon)
+ valkyrie_set_par(&par, p);
+ if (depthchange)
+ if ((err = fb_alloc_cmap(&disp->cmap, 0, 0)))
+ return err;
+ if (depthchange || switching)
+ do_install_cmap(con, info);
+ return 0;
+}
+
+static int valkyrie_pan_display(struct fb_var_screeninfo *var, int con,
+ struct fb_info *info)
+{
+ if (var->xoffset != 0 || var->yoffset != 0)
+ return -EINVAL;
+ return 0;
+}
+
+static int valkyrie_get_cmap(struct fb_cmap *cmap, int kspc, int con,
+ struct fb_info *info)
+{
+ if (con == currcon) {
+ /* current console? */
+ return fb_get_cmap(cmap, kspc, valkyriefb_getcolreg, info);
+ }
+ if (fb_display[con].cmap.len) { /* non default colormap? */
+ fb_copy_cmap(&fb_display[con].cmap, cmap, kspc? 0: 2);
+ }
+ else {
+ int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
+ fb_copy_cmap(fb_default_cmap(size), cmap, kspc ? 0 : 2);
+ }
+ return 0;
+}
+
+static int valkyrie_set_cmap(struct fb_cmap *cmap, int kspc, int con,
+ struct fb_info *info)
+{
+ struct display *disp = &fb_display[con];
+ int err;
+
+ if (disp->cmap.len == 0) {
+ int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
+ err = fb_alloc_cmap(&disp->cmap, size, 0);
+ if (err) {
+ return err;
+ }
+ }
+
+ if (con == currcon) {
+ return fb_set_cmap(cmap, kspc, valkyriefb_setcolreg, info);
+ }
+ fb_copy_cmap(cmap, &disp->cmap, kspc ? 0 : 1);
+ return 0;
+}
+
+static int valkyrie_ioctl(struct inode *inode, struct file *file, u_int cmd,
+ u_long arg, int con, struct fb_info *info)
+{
+ return -EINVAL;
+}
+
+static int valkyriefb_switch(int con, struct fb_info *fb)
+{
+ struct fb_info_valkyrie *info = (struct fb_info_valkyrie *) fb;
+ struct fb_par_valkyrie par;
+
+ if (fb_display[currcon].cmap.len)
+ fb_get_cmap(&fb_display[currcon].cmap, 1, valkyriefb_getcolreg,
+ fb);
+ currcon = con;
+#if 1
+ valkyrie_var_to_par(&fb_display[currcon].var, &par, fb);
+ valkyrie_set_par(&par, info);
+ do_install_cmap(con, fb);
+#else
+ /* I see no reason not to do this. Minus info->changevar(). */
+ /* DOH. This makes valkyrie_set_var compare, you guessed it, */
+ /* fb_display[con].var (first param), and fb_display[con].var! */
+ /* Perhaps I just fixed that... */
+ switching = 1;
+ valkyrie_set_var(&fb_display[con].var, con, info);
+ switching = 0;
+#endif
+ return 0;
+}
+
+static int valkyriefb_updatevar(int con, struct fb_info *info)
+{
+ return 0;
+}
+
+static void valkyriefb_blank(int blank_mode, struct fb_info *info)
+{
+/*
+ * Blank the screen if blank_mode != 0, else unblank. If blank_mode == NULL
+ * then the caller blanks by setting the CLUT (Color Look Up Table) to all
+ * black. Return 0 if blanking succeeded, != 0 if un-/blanking failed due
+ * to e.g. a video mode which doesn't support it. Implements VESA suspend
+ * and powerdown modes on hardware that supports disabling hsync/vsync:
+ * blank_mode == 2: suspend vsync
+ * blank_mode == 3: suspend hsync
+ * blank_mode == 4: powerdown
+ */
+ struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info;
+ struct valkyrie_regvals *init;
+ unsigned char vmode;
+
+ if (p->disp.can_soft_blank
+ && ((vmode = p->par.vmode) > 0)
+ && (vmode <= VMODE_MAX)
+ && ((init = valkyrie_reg_init[vmode - 1]) != NULL)) {
+ if (blank_mode)
+ --blank_mode;
+ switch (blank_mode) {
+ default: /* unblank */
+ out_8(&p->valkyrie_regs->mode.r, init->mode);
+ break;
+ case VESA_VSYNC_SUSPEND:
+ case VESA_HSYNC_SUSPEND:
+ /*
+ * [kps] Value extracted from MacOS. I don't know
+ * whether this bit disables hsync or vsync, or
+ * whether the hardware can do the other as well.
+ */
+ out_8(&p->valkyrie_regs->mode.r, init->mode | 0x40);
+ break;
+ case VESA_POWERDOWN:
+ out_8(&p->valkyrie_regs->mode.r, 0x66);
+ break;
+ }
+ }
+}
+
+static int valkyriefb_getcolreg(u_int regno, u_int *red, u_int *green,
+ u_int *blue, u_int *transp, struct fb_info *info)
+{
+ struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info;
+
+ if (regno > 255)
+ return 1;
+ *red = (p->palette[regno].red<<8) | p->palette[regno].red;
+ *green = (p->palette[regno].green<<8) | p->palette[regno].green;
+ *blue = (p->palette[regno].blue<<8) | p->palette[regno].blue;
+
+ return 0;
+}
+
+static int valkyriefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+ u_int transp, struct fb_info *info)
+{
+ struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info;
+ volatile struct cmap_regs *cmap_regs = p->cmap_regs;
+
+
+ if (regno > 255)
+ return 1;
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
+ p->palette[regno].red = red;
+ p->palette[regno].green = green;
+ p->palette[regno].blue = blue;
+
+ /* tell clut which address to fill */
+ out_8(&p->cmap_regs->addr, regno);
+ udelay(1);
+ /* send one color channel at a time */
+ out_8(&cmap_regs->lut, red);
+ out_8(&cmap_regs->lut, green);
+ out_8(&cmap_regs->lut, blue);
+
+ if (regno < 16) {
+#ifdef FBCON_HAS_CFB16
+ p->fbcon_cfb16_cmap[regno] = (regno << 10) | (regno << 5) | regno;
+#endif
+ }
+
+ return 0;
+}
+
+static void do_install_cmap(int con, struct fb_info *info)
+{
+ if (con != currcon)
+ return;
+ if (fb_display[con].cmap.len) {
+ fb_set_cmap(&fb_display[con].cmap, 1, valkyriefb_setcolreg,
+ info);
+ }
+ else {
+ int size = fb_display[con].var.bits_per_pixel == 16 ? 32 : 256;
+ fb_set_cmap(fb_default_cmap(size), 1, valkyriefb_setcolreg,
+ info);
+ }
+}
+
+#ifdef CONFIG_FB_COMPAT_XPMAC
+extern struct vc_mode display_info;
+extern struct fb_info *console_fb_info;
+#endif /* CONFIG_FB_COMPAT_XPMAC */
+
+static int valkyrie_vram_reqd(int video_mode, int color_mode)
+{
+ int pitch;
+
+ if ((pitch = valkyrie_reg_init[video_mode-1]->pitch[color_mode]) == 0)
+ pitch = 2 * valkyrie_reg_init[video_mode-1]->pitch[0];
+ return valkyrie_reg_init[video_mode-1]->vres * pitch;
+}
+
+static void set_valkyrie_clock(unsigned char *params)
+{
+ struct adb_request req;
+ int i;
+
+ for (i = 0; i < 3; ++i) {
+ cuda_request(&req, NULL, 5, CUDA_PACKET, CUDA_GET_SET_IIC,
+ 0x50, i + 1, params[i]);
+ while (!req.complete)
+ cuda_poll();
+ }
+}
+
+__initfunc(static void init_valkyrie(struct fb_info_valkyrie *p))
+{
+ struct fb_par_valkyrie *par = &p->par;
+ struct fb_var_screeninfo var;
+ int j, k;
+
+ p->sense = read_valkyrie_sense(p);
+ printk("Monitor sense value = 0x%x, ", p->sense);
+
+ /* Try to pick a video mode out of NVRAM if we have one. */
+ if (default_vmode == VMODE_NVRAM) {
+ default_vmode = nvram_read_byte(NV_VMODE);
+ if (default_vmode <= 0
+ || default_vmode > VMODE_MAX
+ || !valkyrie_reg_init[default_vmode - 1])
+ default_vmode = VMODE_CHOOSE;
+ }
+ if (default_vmode == VMODE_CHOOSE)
+ default_vmode = mac_map_monitor_sense(p->sense);
+ if (!valkyrie_reg_init[default_vmode - 1])
+ default_vmode = VMODE_640_480_67;
+ if (default_cmode == CMODE_NVRAM)
+ default_cmode = nvram_read_byte(NV_CMODE);
+
+ /*
+ * Reduce the pixel size if we don't have enough VRAM or bandwitdh.
+ */
+ if (default_cmode < CMODE_8
+ || default_cmode > CMODE_16
+ || valkyrie_reg_init[default_vmode-1]->pitch[default_cmode] == 0
+ || valkyrie_vram_reqd(default_vmode, default_cmode) > p->total_vram)
+ default_cmode = CMODE_8;
+
+ printk("using video mode %d and color mode %d.\n", default_vmode, default_cmode);
+
+ mac_vmode_to_var(default_vmode, default_cmode, &var);
+ if (valkyrie_var_to_par(&var, par, &p->info)) {
+ printk(KERN_ERR "valkyriefb: can't set default video mode\n");
+ return ;
+ }
+
+ valkyrie_init_fix(&p->fix, p);
+ valkyrie_par_to_fix(&p->par, &p->fix, p);
+ valkyrie_par_to_var(&p->par, &p->var);
+ valkyrie_init_display(&p->disp);
+ valkyrie_par_to_display(&p->par, &p->disp, &p->fix, p);
+ valkyrie_init_info(&p->info, p);
+
+ /* Initialize colormap */
+ for (j = 0; j < 16; j++) {
+ k = color_table[j];
+ p->palette[j].red = default_red[k];
+ p->palette[j].green = default_grn[k];
+ p->palette[j].blue = default_blu[k];
+ }
+
+ valkyrie_set_var (&var, -1, &p->info);
+
+ if (register_framebuffer(&p->info) < 0) {
+ kfree(p);
+ return;
+ }
+
+ printk("fb%d: valkyrie frame buffer device\n", GET_FB_IDX(p->info.node));
+}
+
+static void valkyrie_set_par(const struct fb_par_valkyrie *par,
+ struct fb_info_valkyrie *p)
+{
+ struct valkyrie_regvals *init;
+ volatile struct valkyrie_regs *valkyrie_regs = p->valkyrie_regs;
+ int vmode, cmode;
+
+ vmode = par->vmode;
+ cmode = par->cmode;
+
+ if (vmode <= 0
+ || vmode > VMODE_MAX
+ || (init = valkyrie_reg_init[vmode - 1]) == NULL)
+ panic("valkyrie: display mode %d not supported", vmode);
+
+ /* Reset the valkyrie */
+ out_8(&valkyrie_regs->status.r, 0);
+ udelay(100);
+
+ /* Initialize display timing registers */
+ out_8(&valkyrie_regs->mode.r, init->mode | 0x80);
+ out_8(&valkyrie_regs->depth.r, cmode + 3);
+ set_valkyrie_clock(init->clock_params);
+ udelay(100);
+
+ /* Turn on display */
+ out_8(&valkyrie_regs->mode.r, init->mode);
+
+#ifdef CONFIG_FB_COMPAT_XPMAC
+ /* And let the world know the truth. */
+ if (!console_fb_info || console_fb_info == &p->info) {
+ display_info.height = p->var.yres;
+ display_info.width = p->var.xres;
+ display_info.depth = (cmode == CMODE_16) ? 16 : 8;
+ display_info.pitch = p->fix.line_length;
+ display_info.mode = vmode;
+ strncpy(display_info.name, "valkyrie",
+ sizeof(display_info.name));
+ display_info.fb_address = p->frame_buffer_phys + 0x1000;
+ display_info.cmap_adr_address = p->cmap_regs_phys;
+ display_info.cmap_data_address = p->cmap_regs_phys + 8;
+ display_info.disp_reg_address = p->valkyrie_regs_phys;
+ console_fb_info = &p->info;
+ }
+#endif /* CONFIG_FB_COMPAT_XPMAC */
+}
+
+__initfunc(void valkyriefb_init(void))
+{
+#ifndef CONFIG_FB_OF
+ struct device_node *dp;
+
+ dp = find_devices("valkyrie");
+ if (dp != 0)
+ valkyrie_of_init(dp);
+#endif /* CONFIG_FB_OF */
+}
+
+__initfunc(void valkyrie_of_init(struct device_node *dp))
+{
+ struct fb_info_valkyrie *p;
+ unsigned long addr, size;
+
+ if(dp->n_addrs != 1)
+ panic("expecting 1 address for valkyrie (got %d)", dp->n_addrs);
+
+ p = kmalloc(sizeof(*p), GFP_ATOMIC);
+ if (p == 0)
+ return;
+ memset(p, 0, sizeof(*p));
+
+ /* Map in frame buffer and registers */
+ addr = dp->addrs[0].address;
+ size = 4096;
+ p->frame_buffer_phys = addr;
+ p->frame_buffer = __ioremap(addr, 0x100000, _PAGE_WRITETHRU);
+ p->cmap_regs_phys = addr + 0x304000;
+ p->cmap_regs = ioremap(p->cmap_regs_phys, size);
+ p->valkyrie_regs_phys = addr + 0x30a000;
+ p->valkyrie_regs = ioremap(p->valkyrie_regs_phys, size);
+
+ /*
+ * kps: As far as I know, all Valkyries have fixed usable VRAM.
+ */
+ p->total_vram = 0x100000;
+
+ init_valkyrie(p);
+}
+
+/*
+ * Get the monitor sense value.
+ */
+static int read_valkyrie_sense(struct fb_info_valkyrie *p)
+{
+ int sense, in;
+
+ out_8(&p->valkyrie_regs->msense.r, 0); /* release all lines */
+ __delay(20000);
+ sense = ((in = in_8(&p->valkyrie_regs->msense.r)) & 0x70) << 4;
+ /* drive each sense line low in turn and collect the other 2 */
+ out_8(&p->valkyrie_regs->msense.r, 4); /* drive A low */
+ __delay(20000);
+ sense |= ((in = in_8(&p->valkyrie_regs->msense.r)) & 0x30);
+ out_8(&p->valkyrie_regs->msense.r, 2); /* drive B low */
+ __delay(20000);
+ sense |= ((in = in_8(&p->valkyrie_regs->msense.r)) & 0x40) >> 3;
+ sense |= (in & 0x10) >> 2;
+ out_8(&p->valkyrie_regs->msense.r, 1); /* drive C low */
+ __delay(20000);
+ sense |= ((in = in_8(&p->valkyrie_regs->msense.r)) & 0x60) >> 5;
+
+ out_8(&p->valkyrie_regs->msense.r, 7);
+
+ return sense;
+}
+
+/*
+ * This routine takes a user-supplied var,
+ * and picks the best vmode/cmode from it.
+ */
+static int valkyrie_var_to_par(struct fb_var_screeninfo *var,
+ struct fb_par_valkyrie *par, const struct fb_info *fb_info)
+
+/* [bkn] I did a major overhaul of this function.
+ *
+ * Much of the old code was "swiped by jonh from atyfb.c". Because
+ * macmodes has mac_var_to_vmode, I felt that it would be better to
+ * rework this function to use that, instead of reinventing the wheel to
+ * add support for vmode 17. This was reinforced by the fact that
+ * the previously swiped atyfb.c code is no longer there.
+ *
+ * So, I swiped and adapted platinum_var_to_par (from platinumfb.c), replacing
+ * most, but not all, of the old code in the process. One side benefit of
+ * swiping the platinumfb code is that we now have more comprehensible error
+ * messages when a vmode/cmode switch fails. (Most of the error messages are
+ * platinumfb.c, but I added two of my own, and I also changed some commas
+ * into colons to make the messages more consistent with other Linux error
+ * messages.) In addition, I think the new code *might* fix some vmode-
+ * switching oddities, but I'm not sure.
+ *
+ * There may be some more opportunities for cleanup in here, but this is a
+ * good start...
+ */
+
+{
+ int bpp = var->bits_per_pixel;
+ struct valkyrie_regvals *init;
+ struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) fb_info;
+
+ /* these are old variables that are no longer needed with my new code
+ [bkn]
+
+ int xres = var->xres;
+ int yres = var->yres;
+ */
+
+ /*
+ * Get the video params out of 'var'. If a value doesn't fit, round it up,
+ * if it's too big, return -EINVAL.
+ *
+ * Suggestion: Round up in the following order: bits_per_pixel, xres,
+ * yres, xres_virtual, yres_virtual, xoffset, yoffset, grayscale,
+ * bitfields, horizontal timing, vertical timing.
+ */
+
+ if(mac_var_to_vmode(var, &par->vmode, &par->cmode) != 0) {
+ printk(KERN_ERR "valkyrie_var_to_par: mac_var_to_vmode unsuccessful.\n");
+ printk(KERN_ERR "valkyrie_var_to_par: var->xres = %d\n", var->xres);
+ printk(KERN_ERR "valkyrie_var_to_par: var->yres = %d\n", var->yres);
+ printk(KERN_ERR "valkyrie_var_to_par: var->xres_virtual = %d\n", var->xres_virtual);
+ printk(KERN_ERR "valkyrie_var_to_par: var->yres_virtual = %d\n", var->yres_virtual);
+ printk(KERN_ERR "valkyrie_var_to_par: var->bits_per_pixel = %d\n", var->bits_per_pixel);
+ printk(KERN_ERR "valkyrie_var_to_par: var->pixclock = %d\n", var->pixclock);
+ printk(KERN_ERR "valkyrie_var_to_par: var->vmode = %d\n", var->vmode);
+ return -EINVAL;
+ }
+
+ /* Check if we know about the wanted video mode */
+ if(!valkyrie_reg_init[par->vmode-1]) {
+ printk(KERN_ERR "valkyrie_var_to_par: vmode %d not valid.\n", par->vmode);
+ return -EINVAL;
+ }
+
+ par->xres = var->xres;
+ par->yres = var->yres;
+ par->xoffset = 0;
+ par->yoffset = 0;
+ par->vxres = par->xres;
+ par->vyres = par->yres;
+
+ if (var->xres_virtual > var->xres || var->yres_virtual > var->yres
+ || var->xoffset != 0 || var->yoffset != 0) {
+ return -EINVAL;
+ }
+
+ if (bpp <= 8)
+ par->cmode = CMODE_8;
+ else if (bpp <= 16)
+ par->cmode = CMODE_16;
+ else {
+ printk(KERN_ERR "valkyrie_var_to_par: cmode %d not supported.\n", par->cmode);
+ return -EINVAL;
+ }
+
+ init = valkyrie_reg_init[par->vmode-1];
+ if (init->pitch[par->cmode] == 0) {
+ printk(KERN_ERR "valkyrie_var_to_par: vmode %d does not support cmode %d.\n", par->vmode, par->cmode);
+ return -EINVAL;
+ }
+
+ if (valkyrie_vram_reqd(par->vmode, par->cmode) > p->total_vram) {
+ printk(KERN_ERR "valkyrie_var_to_par: not enough ram for vmode %d, cmode %d.\n", par->vmode, par->cmode);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int valkyrie_par_to_var(struct fb_par_valkyrie *par, struct fb_var_screeninfo *var)
+{
+ return mac_vmode_to_var(par->vmode, par->cmode, var);
+}
+
+static void valkyrie_init_fix(struct fb_fix_screeninfo *fix, struct fb_info_valkyrie *p)
+{
+ memset(fix, 0, sizeof(*fix));
+ strcpy(fix->id, "valkyrie");
+ fix->mmio_start = (char *)p->valkyrie_regs_phys;
+ fix->mmio_len = sizeof(struct valkyrie_regs);
+ fix->type = FB_TYPE_PACKED_PIXELS;
+
+ fix->type_aux = 0;
+ fix->ywrapstep = 0;
+ fix->ypanstep = 0;
+ fix->xpanstep = 0;
+
+}
+
+/* Fix must already be inited above */
+static void valkyrie_par_to_fix(struct fb_par_valkyrie *par,
+ struct fb_fix_screeninfo *fix,
+ struct fb_info_valkyrie *p)
+{
+ fix->smem_start = (void *)(p->frame_buffer_phys + 0x1000);
+#if 1
+ fix->smem_len = valkyrie_vram_reqd(par->vmode, par->cmode);
+#else
+ fix->smem_len = p->total_vram;
+#endif
+ fix->visual = (par->cmode == CMODE_8) ?
+ FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR;
+ fix->line_length = par->vxres << par->cmode;
+ /* ywrapstep, xpanstep, ypanstep */
+}
+
+static void valkyrie_init_display(struct display *disp)
+{
+ memset(disp, 0, sizeof(*disp));
+ disp->type = /* fix->type */ FB_TYPE_PACKED_PIXELS;
+ disp->can_soft_blank = can_soft_blank;
+ disp->scrollmode = SCROLL_YREDRAW;
+}
+
+static void valkyrie_par_to_display(struct fb_par_valkyrie *par,
+ struct display *disp, struct fb_fix_screeninfo *fix, struct fb_info_valkyrie *p)
+{
+ disp->var = p->var;
+ disp->screen_base = (char *) p->frame_buffer + 0x1000;
+ disp->visual = fix->visual;
+ disp->line_length = fix->line_length;
+
+ if(disp->scrollmode != SCROLL_YREDRAW) {
+ printk(KERN_ERR "Scroll mode not YREDRAW in valkyrie_par_to_display\n");
+ disp->scrollmode = SCROLL_YREDRAW;
+ }
+ switch (par->cmode) {
+#ifdef FBCON_HAS_CFB8
+ case CMODE_8:
+ disp->dispsw = &fbcon_cfb8;
+ break;
+#endif
+#ifdef FBCON_HAS_CFB16
+ case CMODE_16:
+ disp->dispsw = &fbcon_cfb16;
+ disp->dispsw_data = p->fbcon_cfb16_cmap;
+ break;
+#endif
+ default:
+ disp->dispsw = &fbcon_dummy;
+ break;
+ }
+}
+
+static void valkyrie_init_info(struct fb_info *info, struct fb_info_valkyrie *p)
+{
+ strcpy(info->modename, p->fix.id);
+ info->node = -1; /* ??? danj */
+ info->fbops = &valkyriefb_ops;
+ info->disp = &p->disp;
+ strcpy(info->fontname, fontname);
+ info->changevar = NULL;
+ info->switch_con = &valkyriefb_switch;
+ info->updatevar = &valkyriefb_updatevar;
+ info->blank = &valkyriefb_blank;
+}
+
+
+/*
+ * Parse user speficied options (`video=valkyriefb:')
+ */
+__initfunc(void valkyriefb_setup(char *options, int *ints))
+{
+ char *this_opt;
+
+ if (!options || !*options)
+ return;
+
+ for (this_opt = strtok(options, ","); this_opt;
+ this_opt = strtok(NULL, ",")) {
+ if (!strncmp(this_opt, "font:", 5)) {
+ char *p;
+ int i;
+
+ p = this_opt + 5;
+ for (i = 0; i < sizeof(fontname) - 1; i++)
+ if (!*p || *p == ' ' || *p == ',')
+ break;
+ memcpy(fontname, this_opt + 5, i);
+ fontname[i] = 0;
+ }
+ else if (!strncmp(this_opt, "vmode:", 6)) {
+ int vmode = simple_strtoul(this_opt+6, NULL, 0);
+ if (vmode > 0 && vmode <= VMODE_MAX)
+ default_vmode = vmode;
+ }
+ else if (!strncmp(this_opt, "cmode:", 6)) {
+ int depth = simple_strtoul(this_opt+6, NULL, 0);
+ switch (depth) {
+ case 8:
+ default_cmode = CMODE_8;
+ break;
+ case 15:
+ case 16:
+ default_cmode = CMODE_16;
+ break;
+ }
+ }
+ /* XXX - remove these options once blanking has been tested */
+ else if (!strncmp(this_opt, "noblank", 7)) {
+ can_soft_blank = 0;
+ }
+ else if (!strncmp(this_opt, "blank", 5)) {
+ can_soft_blank = 1;
+ }
+ }
+}
--- /dev/null
+/*
+ * valkyriefb.h: Constants of all sorts for valkyriefb
+ *
+ * Created 8 August 1998 by Martin Costabel and Kevin Schoedel
+ *
+ * Vmode-switching changes and vmode 15/17 modifications created 29 August
+ * 1998 by Barry Nathan <barryn@pobox.com>.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Based directly on:
+ *
+ * controlfb.h: Constants of all sorts for controlfb
+ * Copyright (C) 1998 Daniel Jacobowitz <dan@debian.org>
+ *
+ * pmc-valkyrie.h: Console support for PowerMac "control" display adaptor.
+ * Copyright (C) 1997 Paul Mackerras.
+ *
+ * pmc-valkyrie.c: Console support for PowerMac "control" display adaptor.
+ * Copyright (C) 1997 Paul Mackerras.
+ *
+ * and indirectly from:
+ *
+ * pmc-control.h: Console support for PowerMac "control" display adaptor.
+ * Copyright (C) 1997 Paul Mackerras.
+ *
+ * pmc-control.c: Console support for PowerMac "control" display adaptor.
+ * Copyright (C) 1996 Paul Mackerras.
+ *
+ * platinumfb.c: Console support for PowerMac "platinum" display adaptor.
+ * Copyright (C) 1998 Jon Howell
+ */
+
+/*
+ * Structure of the registers for the Valkyrie colormap registers.
+ */
+struct cmap_regs {
+ unsigned char addr;
+ char pad1[7];
+ unsigned char lut;
+};
+
+/*
+ * Structure of the registers for the "valkyrie" display adaptor.
+ */
+
+struct vpreg { /* padded register */
+ unsigned char r;
+ char pad[7];
+};
+
+
+struct valkyrie_regs {
+ struct vpreg mode;
+ struct vpreg depth;
+ struct vpreg status;
+ struct vpreg reg3;
+ struct vpreg intr;
+ struct vpreg reg5;
+ struct vpreg intr_enb;
+ struct vpreg msense;
+};
+
+/*
+ * Register initialization tables for the valkyrie display.
+ *
+ * Dot clock rate is
+ * 3.9064MHz * 2**clock_params[2] * clock_params[1] / clock_params[0].
+ */
+struct valkyrie_regvals {
+ unsigned char mode;
+ unsigned char clock_params[3];
+ int pitch[2]; /* bytes/line, indexed by color_mode */
+ int hres;
+ int vres;
+};
+
+/* Register values for 1024x768, 75Hz mode (17) */
+/* I'm not sure which mode this is (16 or 17), so I'm defining it as 17,
+ * since the equivalent mode in controlfb (which I adapted this from) is
+ * also 17. Just because MacOS can't do this on Valkyrie doesn't mean we
+ * can't! :)
+ *
+ * I was going to use 12, 31, 3, which I found by myself, but instead I'm
+ * using 11, 28, 3 like controlfb, for consistency's sake.
+ */
+
+static struct valkyrie_regvals valkyrie_reg_init_17 = {
+ 15,
+ { 11, 28, 3 }, /* pixel clock = 79.55MHz for V=74.50Hz */
+ { 1024, 0 },
+ 1024, 768
+};
+
+/* Register values for 1024x768, 72Hz mode (15) */
+/* This used to be 12, 30, 3 for pixel clock = 78.12MHz for V=72.12Hz, but
+ * that didn't match MacOS in the same video mode on this chip, and it also
+ * caused the 15" Apple Studio Display to not work in this mode. While this
+ * mode still doesn't match MacOS exactly (as far as I can tell), it's a lot
+ * closer now, and it works with the Apple Studio Display.
+ *
+ * Yes, even though MacOS calls it "72Hz", in reality it's about 70Hz.
+ */
+static struct valkyrie_regvals valkyrie_reg_init_15 = {
+ 15,
+ { 12, 29, 3 }, /* pixel clock = 75.52MHz for V=69.71Hz? */
+ /* I interpolated the V=69.71 from the vmode 14 and old 15
+ * numbers. Is this result correct?
+ */
+ { 1024, 0 },
+ 1024, 768
+};
+
+/* Register values for 1024x768, 60Hz mode (14) */
+static struct valkyrie_regvals valkyrie_reg_init_14 = {
+ 14,
+ { 15, 31, 3 }, /* pixel clock = 64.58MHz for V=59.62Hz */
+ { 1024, 0 },
+ 1024, 768
+};
+
+/* Register values for 832x624, 75Hz mode (13) */
+static struct valkyrie_regvals valkyrie_reg_init_13 = {
+ 9,
+ { 23, 42, 3 }, /* pixel clock = 57.07MHz for V=74.27Hz */
+ { 832, 0 },
+ 832, 624
+};
+
+/* Register values for 800x600, 72Hz mode (11) */
+static struct valkyrie_regvals valkyrie_reg_init_11 = {
+ 13,
+ { 17, 27, 3 }, /* pixel clock = 49.63MHz for V=71.66Hz */
+ { 800, 0 },
+ 800, 600
+};
+
+/* Register values for 800x600, 60Hz mode (10) */
+static struct valkyrie_regvals valkyrie_reg_init_10 = {
+ 12,
+ { 20, 53, 2 }, /* pixel clock = 41.41MHz for V=59.78Hz */
+ { 800, 1600 },
+ 800, 600
+};
+
+/* Register values for 640x480, 67Hz mode (6) */
+static struct valkyrie_regvals valkyrie_reg_init_6 = {
+ 6,
+ { 14, 27, 2 }, /* pixel clock = 30.13MHz for V=66.43Hz */
+ { 640, 1280 },
+ 640, 480
+};
+
+/* Register values for 640x480, 60Hz mode (5) */
+static struct valkyrie_regvals valkyrie_reg_init_5 = {
+ 11,
+ { 23, 37, 2 }, /* pixel clock = 25.14MHz for V=59.85Hz */
+ { 640, 1280 },
+ 640, 480
+};
+
+static struct valkyrie_regvals *valkyrie_reg_init[VMODE_MAX] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &valkyrie_reg_init_5,
+ &valkyrie_reg_init_6,
+ NULL,
+ NULL,
+ NULL,
+ &valkyrie_reg_init_10,
+ &valkyrie_reg_init_11,
+ NULL,
+ &valkyrie_reg_init_13,
+ &valkyrie_reg_init_14,
+ &valkyrie_reg_init_15,
+ NULL,
+ &valkyrie_reg_init_17,
+ NULL,
+ NULL,
+ NULL
+};
#include <linux/fb.h>
#include <linux/init.h>
-#include "fbcon-mfb.h"
-#include "fbcon-cfb2.h"
-#include "fbcon-cfb4.h"
-#include "fbcon-cfb8.h"
-#include "fbcon-cfb16.h"
-#include "fbcon-cfb24.h"
-#include "fbcon-cfb32.h"
+#include <video/fbcon.h>
+#include <video/fbcon-mfb.h>
+#include <video/fbcon-cfb2.h>
+#include <video/fbcon-cfb4.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
+#include <video/fbcon-cfb24.h>
+#include <video/fbcon-cfb32.h>
#define arraysize(x) (sizeof(x)/sizeof(*(x)))
static struct display disp;
static struct fb_info fb_info;
static struct { u_char red, green, blue, pad; } palette[256];
+static union {
+#ifdef FBCON_HAS_CFB16
+ u16 cfb16[16];
+#endif
+#ifdef FBCON_HAS_CFB24
+ u32 cfb24[16];
+#endif
+#ifdef FBCON_HAS_CFB32
+ u32 cfb32[16];
+#endif
+} fbcon_cmap;
static char vfb_name[16] = "Virtual FB";
static struct fb_var_screeninfo vfb_default = {
#ifdef FBCON_HAS_CFB16
case 16:
display->dispsw = &fbcon_cfb16;
+ display->dispsw_data = fbcon_cmap.cfb16;
break;
#endif
#ifdef FBCON_HAS_CFB24
case 24:
display->dispsw = &fbcon_cfb24;
+ display->dispsw_data = fbcon_cmap.cfb24;
break;
#endif
#ifdef FBCON_HAS_CFB32
case 32:
display->dispsw = &fbcon_cfb32;
+ display->dispsw_data = fbcon_cmap.cfb32;
break;
#endif
default:
- display->dispsw = NULL;
+ display->dispsw = &fbcon_dummy;
break;
}
if (fb_info.changevar)
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return fb_get_cmap(cmap, &fb_display[con].var, kspc, vfb_getcolreg,
- info);
+ return fb_get_cmap(cmap, kspc, vfb_getcolreg, info);
else if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else
return err;
}
if (con == currcon) /* current console? */
- return fb_set_cmap(cmap, &fb_display[con].var, kspc, vfb_setcolreg,
- info);
+ return fb_set_cmap(cmap, kspc, vfb_setcolreg, info);
else
fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
return 0;
{
/* Do we have to save the colormap? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1,
- vfb_getcolreg, info);
+ fb_get_cmap(&fb_display[currcon].cmap, 1, vfb_getcolreg, info);
currcon = con;
/* Install new colormap */
{
if (regno > 255)
return 1;
- *red = palette[regno].red;
- *green = palette[regno].green;
- *blue = palette[regno].blue;
+ *red = (palette[regno].red<<8) | palette[regno].red;
+ *green = (palette[regno].green<<8) | palette[regno].green;
+ *blue = (palette[regno].blue<<8) | palette[regno].blue;
+ *transp = 0;
return 0;
}
{
if (regno > 255)
return 1;
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
palette[regno].red = red;
palette[regno].green = green;
palette[regno].blue = blue;
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- vfb_setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, vfb_setcolreg, info);
else
- fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
- &fb_display[con].var, 1, vfb_setcolreg, info);
+ fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel), 1,
+ vfb_setcolreg, info);
}
#include <asm/pgtable.h>
#include <asm/amigahw.h>
-#include "s3blit.h"
-#include "fbcon.h"
-#include "fbcon-cfb8.h"
-#include "fbcon-cfb16.h"
+#include <video/s3blit.h>
+#include <video/fbcon.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
#ifdef VIRGEFBDEBUG
static unsigned int CyberKey = 0;
-static unsigned char Cyber_colour_table [256][4];
+static unsigned char Cyber_colour_table [256][3];
static unsigned long CyberMem;
static unsigned long CyberSize;
static volatile char *CyberRegs;
Cyber_colour_table [i][0] = i;
Cyber_colour_table [i][1] = i;
Cyber_colour_table [i][2] = i;
- Cyber_colour_table [i][3] = 0;
}
/*
if (par->bpp == 8)
fix->visual = FB_VISUAL_PSEUDOCOLOR;
else
- fix->visual = FB_VISUAL_DIRECTCOLOR;
+ fix->visual = FB_VISUAL_TRUECOLOR;
fix->xpanstep = 0;
fix->ypanstep = 0;
if (par->bpp == 8) {
var->red.offset = 0;
- var->red.length = 8;
+ var->red.length = 6;
var->red.msb_right = 0;
var->blue = var->green = var->red;
} else {
*/
vgawb_3d(0x3c8, (unsigned char) regno);
- Cyber_colour_table [regno][0] = red & 0xff;
- Cyber_colour_table [regno][1] = green & 0xff;
- Cyber_colour_table [regno][2] = blue & 0xff;
- Cyber_colour_table [regno][3] = transp;
+ red >>= 10;
+ green >>= 10;
+ blue >>= 10;
- vgawb_3d(0x3c9, ((red & 0xff) >> 2));
- vgawb_3d(0x3c9, ((green & 0xff) >> 2));
- vgawb_3d(0x3c9, ((blue & 0xff) >> 2));
+ Cyber_colour_table [regno][0] = red;
+ Cyber_colour_table [regno][1] = green;
+ Cyber_colour_table [regno][2] = blue;
+
+ vgawb_3d(0x3c9, red);
+ vgawb_3d(0x3c9, green);
+ vgawb_3d(0x3c9, blue);
return (0);
}
static int Cyber_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
u_int *transp, struct fb_info *info)
{
+ int t;
+
if (regno >= 256)
return (1);
- *red = Cyber_colour_table [regno][0];
- *green = Cyber_colour_table [regno][1];
- *blue = Cyber_colour_table [regno][2];
- *transp = Cyber_colour_table [regno][3];
+ t = Cyber_colour_table [regno][0];
+ *red = (t<<10) | (t<<4) | (t>>2);
+ t = Cyber_colour_table [regno][1];
+ *green = (t<<10) | (t<<4) | (t>>2);
+ t = Cyber_colour_table [regno][2];
+ *blue = (t<<10) | (t<<4) | (t>>2);
+ *transp = 0;
return (0);
}
for (i = 0; i < 256; i++)
{
vgawb_3d(0x3c8, (unsigned char) i);
- vgawb_3d(0x3c9, Cyber_colour_table[i][0] >> 2);
- vgawb_3d(0x3c9, Cyber_colour_table[i][1] >> 2);
- vgawb_3d(0x3c9, Cyber_colour_table[i][2] >> 2);
+ vgawb_3d(0x3c9, Cyber_colour_table[i][0]);
+ vgawb_3d(0x3c9, Cyber_colour_table[i][1]);
+ vgawb_3d(0x3c9, Cyber_colour_table[i][2]);
}
}
}
if (con != currcon)
return;
if (fb_display[con].cmap.len)
- fb_set_cmap(&fb_display[con].cmap, &fb_display[con].var, 1,
- fbhw->setcolreg, info);
+ fb_set_cmap(&fb_display[con].cmap, 1, fbhw->setcolreg, info);
else
fb_set_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
- &fb_display[con].var, 1, fbhw->setcolreg, info);
+ 1, fbhw->setcolreg, info);
}
break;
#endif
default:
- display->dispsw = NULL;
+ display->dispsw = &fbcon_dummy;
break;
}
}
struct fb_info *info)
{
if (con == currcon) /* current console? */
- return(fb_get_cmap(cmap, &fb_display[con].var,
- kspc, fbhw->getcolreg, info));
+ return(fb_get_cmap(cmap, kspc, fbhw->getcolreg, info));
else if (fb_display[con].cmap.len) /* non default colormap? */
fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
else
return(err);
}
if (con == currcon) /* current console? */
- return(fb_set_cmap(cmap, &fb_display[con].var,
- kspc, fbhw->setcolreg, info));
+ return(fb_set_cmap(cmap, kspc, fbhw->setcolreg, info));
else
fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
return(0);
{
/* Do we have to save the colormap? */
if (fb_display[currcon].cmap.len)
- fb_get_cmap(&fb_display[currcon].cmap, &fb_display[currcon].var, 1,
- fbhw->getcolreg, info);
+ fb_get_cmap(&fb_display[currcon].cmap, 1, fbhw->getcolreg,
+ info);
do_fb_set_var(&fb_display[con].var, 1);
currcon = con;
int dx, int height, int width)
{
sx *= 8; dx *= 8; width *= 8;
- Cyber3D_BitBLT((u_short)sx, (u_short)(sy*p->fontheight), (u_short)dx,
- (u_short)(dy*p->fontheight), (u_short)width,
- (u_short)(height*p->fontheight));
+ Cyber3D_BitBLT((u_short)sx, (u_short)(sy*fontheight(p)), (u_short)dx,
+ (u_short)(dy*fontheight(p)), (u_short)width,
+ (u_short)(height*fontheight(p)));
}
static void fbcon_virge8_clear(struct vc_data *conp, struct display *p, int sy,
sx *= 8; width *= 8;
bg = attr_bgcol_ec(p,conp);
- Cyber3D_RectFill((u_short)sx, (u_short)(sy*p->fontheight),
- (u_short)width, (u_short)(height*p->fontheight),
+ Cyber3D_RectFill((u_short)sx, (u_short)(sy*fontheight(p)),
+ (u_short)width, (u_short)(height*fontheight(p)),
(u_short)bg);
}
blocks = rblocks;
}
- if (block + blocks > size)
+ if (block + blocks > size) {
blocks = size - block;
+ if (blocks == 0)
+ return 0;
+ }
/* We do this in a two stage process. We first try to request
as many blocks as we can, then we wait for the first one to
entry = *p++ - '0';
for ( i = dentry->d_name.len-1 ; i ; i-- ) {
- if ( *p < '0' || *p > '9' )
+ unsigned int nentry = *p++ - '0';
+ if ( nentry > 9 )
return 0;
- entry *= 10;
- entry += (*p++ - '0');
+ nentry += entry * 10;
+ if (nentry < entry)
+ return 0;
+ entry = nentry;
}
}
-/* $Id: linux_logo.h,v 1.6 1998/07/07 13:34:56 jj Exp $
+/* $Id: linux_logo.h,v 1.8 1998/07/30 16:30:24 jj Exp $
* include/asm-i386/linux_logo.h: This is a linux logo
* to be displayed on boot.
*
#define linux_logo_banner "Linux/ia32 version " UTS_RELEASE
-#define LINUX_LOGO_COLORS 221
+#define LINUX_LOGO_COLORS 214
#ifdef INCLUDE_LINUX_LOGO_DATA
+#define INCLUDE_LINUX_LOGOBW
#define INCLUDE_LINUX_LOGO16
#include <linux/linux_logo.h>
{
return -ENODEV;
}
-static __inline__ mtrr_del (int reg, unsigned long base, unsigned long size)
+static __inline__ int mtrr_del (int reg, unsigned long base,
+ unsigned long size)
{
return -ENODEV;
}
/*
* FPU lazy state save handling..
*/
+#define save_fpu(tsk) do { \
+ asm volatile("fnsave %0\n\tfwait":"=m" (tsk->tss.i387)); \
+ tsk->flags &= ~PF_USEDFPU; \
+ stts(); \
+} while (0)
+
#define unlazy_fpu(tsk) do { \
- if (tsk->flags & PF_USEDFPU) { \
- asm volatile("fnsave %0\n\tfwait":"=m" (tsk->tss.i387)); \
- tsk->flags &= ~PF_USEDFPU; \
- stts(); \
- } \
+ if (tsk->flags & PF_USEDFPU) \
+ save_fpu(tsk); \
} while (0)
#define clear_fpu(tsk) do { \
* but should contain %s to display the version
*/
+#include <linux/config.h>
#include <linux/init.h>
#include <linux/version.h>
#define linux_logo_banner "Linux/m68k version " UTS_RELEASE
-#define LINUX_LOGO_COLORS 221
+#ifdef CONFIG_MAC
+
+#define LINUX_LOGO_COLORS 95
#ifdef INCLUDE_LINUX_LOGO_DATA
+
unsigned char linux_logo_red[] __initdata = {
- 0xF3, 0xF6, 0xF8, 0xF7, 0xEF, 0xE7, 0xE5, 0xE3,
- 0xCA, 0xD4, 0xDD, 0xC8, 0xC7, 0xC4, 0xC2, 0xE5,
- 0xF1, 0xED, 0xEE, 0xE6, 0xC6, 0xDA, 0xDD, 0xE5,
- 0xD9, 0xC6, 0xE3, 0xD0, 0xC6, 0xBA, 0xB0, 0xB6,
- 0xBB, 0xBE, 0xB9, 0xB8, 0xB3, 0xB2, 0xB0, 0xAD,
- 0xAC, 0xA9, 0xA8, 0xA6, 0xA4, 0xA1, 0xA0, 0x9D,
- 0x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 0x3C, 0x1C,
+ 0xA4, 0x04, 0x24, 0xDC, 0x04, 0x84, 0x4C, 0x0C,
+ 0x04, 0xE4, 0xA4, 0x04, 0x64, 0x04, 0x94, 0x14,
+ 0x0C, 0xB4, 0x74, 0x14, 0x24, 0xFC, 0x14, 0xAC,
+ 0xCC, 0x9C, 0x0C, 0x8C, 0x14, 0x14, 0x04, 0x6C,
+ 0xBC, 0xD4, 0x7C, 0x5C, 0xD4, 0x14, 0x3C
};
unsigned char linux_logo[] __initdata = {
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, 0x57,
- 0x58, 0x58, 0x59, 0x5C, 0x5D, 0x5F, 0x60, 0x61,
- 0x62, 0x61, 0x61, 0x62, 0x62, 0x62, 0x63, 0x63,
- 0x61, 0x61, 0x61, 0x61, 0x61, 0x60, 0x5E, 0x5E,
- 0x5E, 0x5D, 0x5D, 0x5C, 0x5D, 0x5B, 0x58, 0x58,
- 0x58, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x58,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, 0x57,
- 0x54, 0x56, 0x57, 0x67, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x67, 0x4C,
- 0x4A, 0x49, 0x4A, 0x49, 0x4A, 0x49, 0x49, 0x4A,
- 0x4A, 0x4B, 0x4B, 0x4B, 0x4C, 0x50, 0x51, 0x52,
- 0x54, 0x54, 0x56, 0x57, 0x57, 0x57, 0x57, 0x58,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x58, 0x56, 0x56, 0x53,
- 0x52, 0x53, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0xFB, 0xFB,
- 0x4B, 0x4B, 0x4B, 0x4A, 0x49, 0x4A, 0x4A, 0x49,
- 0x49, 0x49, 0x48, 0x49, 0x49, 0x4A, 0x4A, 0x4B,
- 0x4C, 0x4D, 0x52, 0x54, 0x56, 0x55, 0x57, 0x58,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x55, 0x54, 0x53, 0x52, 0x51, 0x50,
- 0x50, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF8, 0xF0, 0xF4, 0xFB,
- 0xFC, 0x67, 0x53, 0x50, 0x4D, 0x4C, 0x4C, 0x4C,
- 0x4B, 0x4A, 0x4A, 0x48, 0x49, 0x48, 0x48, 0x49,
- 0x49, 0x49, 0x4B, 0x4C, 0x50, 0x52, 0x53, 0x56,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x55, 0x54, 0x53, 0x51, 0x51, 0x50, 0x4C, 0x4D,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0xD2, 0xD7, 0xF5,
- 0xFC, 0xFC, 0x5D, 0x5D, 0x5C, 0x5C, 0x59, 0x58,
- 0x58, 0x56, 0x52, 0x4C, 0x4B, 0x4A, 0x4A, 0x48,
- 0x48, 0x48, 0x48, 0x48, 0x49, 0x4B, 0x4D, 0x51,
- 0x54, 0x56, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x55, 0x54,
- 0x53, 0x52, 0x51, 0x4D, 0x4D, 0x4D, 0x50, 0x50,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0x64, 0xD9, 0xF5,
- 0xF9, 0xFC, 0xFC, 0x64, 0x63, 0x62, 0x61, 0x61,
- 0x61, 0x60, 0x5E, 0x5B, 0x5A, 0x54, 0x52, 0x4C,
- 0x4B, 0x49, 0x49, 0x47, 0x47, 0x48, 0x49, 0x4B,
- 0x4C, 0x51, 0x53, 0x56, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x55, 0x53, 0x53,
- 0x51, 0x50, 0x50, 0x50, 0x50, 0x50, 0x53, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0xF5, 0xF9, 0xFC,
- 0xFC, 0xFC, 0xFC, 0x64, 0x64, 0x64, 0x64, 0x64,
- 0x64, 0x64, 0x64, 0x63, 0x61, 0x61, 0x5E, 0x59,
- 0x55, 0x52, 0x4C, 0x4A, 0x49, 0x47, 0x48, 0x48,
- 0x49, 0x4B, 0x4D, 0x51, 0x54, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x55, 0x54, 0x54, 0x52, 0x51,
- 0x51, 0x51, 0x51, 0x51, 0x53, 0x54, 0x59, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF7, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0x60, 0x60, 0x60, 0x61,
- 0x62, 0x63, 0x64, 0x64, 0x65, 0x65, 0x64, 0x63,
- 0x61, 0x5E, 0x59, 0x56, 0x4D, 0x4B, 0x48, 0x48,
- 0x48, 0x48, 0x49, 0x4B, 0x50, 0x53, 0x56, 0x56,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x56, 0x54, 0x53, 0x52, 0x51, 0x51,
- 0x51, 0x52, 0x53, 0x55, 0x59, 0x5D, 0x5E, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFB, 0xFB, 0xFB, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0x4C, 0x4E, 0x51, 0x52,
- 0x57,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0x47, 0x47, 0x48, 0x4A,
- 0x4C, 0x52, 0x54, 0x56, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x55,
- 0x54, 0x53, 0x53, 0x54, 0x54, 0x55, 0x58, 0x5B,
- 0x5C, 0x5D, 0x5E, 0x5D, 0x5D, 0x5B, 0x58, 0xFC,
- 0xFC, 0xD8, 0x4C, 0x60, 0xFC, 0xF5, 0xFC, 0xFC,
- 0xFC, 0xF7, 0x5F, 0x48, 0x48, 0x2C, 0xF8, 0xF9,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x4B, 0x4A, 0x49,
- 0x49, 0x49, 0x49, 0x47, 0x3E, 0x44, 0x42, 0x3F,
- 0x3E, 0x4B, 0x54, 0x5C, 0x61, 0x64, 0xCB, 0xCB,
- 0x64, 0x61, 0x5D, 0x53, 0x4B, 0x49, 0x47, 0x47,
- 0x49, 0x4B, 0x50, 0x53, 0x56, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x55, 0x55, 0x54,
- 0x53, 0x53, 0x54, 0x56, 0x58, 0x5A, 0x5B, 0x5D,
- 0x5D, 0x5D, 0x5C, 0x5A, 0x54, 0x52, 0x4C, 0xFC,
- 0xF7, 0x4E, 0x2D, 0x29, 0x4E, 0xFC, 0xFC, 0xFC,
- 0xFB, 0x5F, 0x26, 0x24, 0x20, 0x2E, 0x65, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x45, 0x3F, 0x45,
- 0x3E, 0x47, 0x47, 0x47, 0x47, 0x47, 0x3E, 0x44,
- 0x43, 0x40, 0x44, 0x49, 0x51, 0x5C, 0x62, 0x64,
- 0xCB, 0xCB, 0x63, 0x60, 0x58, 0x50, 0x49, 0x48,
- 0x48, 0x48, 0x4A, 0x4D, 0x53, 0x54, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x55, 0x54, 0x54, 0x54,
- 0x54, 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, 0x32, 0x32,
- 0x31, 0x32, 0x30, 0x32, 0x32, 0x32, 0x32, 0x30,
- 0x31, 0x31, 0x31, 0x32, 0x33, 0x33, 0x3C, 0x41,
- 0x41, 0x2E, 0x2D, 0x45, 0x4D, 0x5D, 0x63, 0xCC,
- 0x65, 0x62, 0x5D, 0x51, 0x49, 0x47, 0x47, 0x4A,
- 0x59, 0x57, 0x57, 0x57, 0x57, 0x58, 0x58, 0x58,
- 0x5A, 0x5A, 0x58, 0x55, 0x53, 0x53, 0x5C, 0x5E,
- 0x59, 0x51, 0x4E, 0x54, 0x59, 0x5E, 0x62, 0xFC,
- 0xFC, 0xDB, 0xAA, 0xA1, 0x95, 0x9C, 0x8C, 0x88,
- 0x82, 0x83, 0x83, 0x8C, 0x88, 0xAE, 0xB9, 0xFB,
- 0xFC, 0xFC, 0xFC, 0x3C, 0x3B, 0x72, 0x38, 0x33,
- 0x33, 0x33, 0x31, 0x33, 0x31, 0x31, 0x31, 0x31,
- 0x33, 0x33, 0x38, 0x33, 0x72, 0x3B, 0x44, 0x2E,
- 0x41, 0x2E, 0x2E, 0x2D, 0x43, 0x4B, 0x5B, 0x63,
- 0xCB, 0xCC, 0x63, 0x5D, 0x51, 0x49, 0x47, 0x49,
- 0x5C, 0x58, 0x57, 0x57, 0x57, 0x57, 0x58, 0x58,
- 0x58, 0x58, 0x57, 0x53, 0x58, 0x5D, 0x5E, 0x55,
- 0x51, 0x53, 0x58, 0x5E, 0x60, 0x63, 0x64, 0xFC,
- 0xFC, 0xC0, 0xA6, 0x9D, 0x8B, 0x9C, 0x8C, 0x8C,
- 0x6E, 0x83, 0x88, 0x8C, 0x8C, 0x8C, 0x83, 0xE8,
- 0xFB, 0xFC, 0xFC, 0xFC, 0x33, 0x70, 0x70, 0x6F,
- 0x6F, 0x6F, 0x6F, 0x3A, 0x6F, 0x6D, 0x6F, 0x6F,
- 0x70, 0x6F, 0x6F, 0x70, 0x6F, 0x32, 0x5A, 0x48,
- 0x41, 0x2D, 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C, 0xFC, 0xFC, 0xDB, 0x49, 0x24,
- 0x21, 0x23, 0x23, 0x22, 0x26, 0x26, 0x2A, 0x24,
- 0x22, 0x23, 0x22, 0x21, 0x24, 0x26, 0x26, 0x2A,
- 0x29, 0x2B, 0x24, 0x25, 0xFC, 0xFC, 0xB3, 0xC5,
- 0x91, 0x91, 0x92, 0x91, 0x92, 0x92, 0x93, 0x93,
- 0x91, 0x93, 0xC6, 0xAD, 0xDC, 0xD9, 0xD4, 0x60,
- 0x43, 0x45, 0x58, 0x58, 0x57, 0x4B, 0x43, 0xCC,
- 0xDD, 0xF1, 0xD8, 0xD5, 0x5D, 0x43, 0x41, 0x47,
- 0xCD, 0x63, 0x62, 0x5D, 0x54, 0x4C, 0x55, 0x4B,
- 0x51, 0x58, 0x62, 0xD0, 0xD0, 0x62, 0x5D, 0x5D,
- 0x67, 0xFC, 0xFC, 0xFC, 0xFC, 0x58, 0x4E, 0x28,
- 0x2A, 0x20, 0x23, 0x22, 0x23, 0x2A, 0x23, 0x22,
- 0x22, 0x22, 0x23, 0x23, 0x25, 0x2A, 0x2E, 0x2D,
- 0x2E, 0x2E, 0x2E, 0x23, 0xFA, 0xFC, 0xB2, 0xBD,
- 0xB5, 0x90, 0x91, 0x93, 0x92, 0x90, 0x91, 0x93,
- 0x92, 0x91, 0xBD, 0xAD, 0xDE, 0xE0, 0xD8, 0xD7,
- 0x61, 0x40, 0x48, 0x58, 0x58, 0x58, 0x48, 0x44,
- 0xCF, 0xDE, 0xE0, 0xDD, 0xD0, 0x52, 0x41, 0x45,
- 0xCD, 0x63, 0x61, 0x58, 0x4D, 0x51, 0x4C, 0x4B,
- 0x54, 0x5D, 0xCC, 0xCE, 0x63, 0x61, 0x5D, 0x5D,
- 0xFB, 0xFC, 0xFC, 0xFC, 0xFC, 0x4B, 0x27, 0x21,
- 0x22, 0x22, 0x23, 0x22, 0x22, 0x24, 0x23, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x20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, 0x22, 0x22, 0x22, 0x23, 0x22, 0x23,
- 0x22, 0x22, 0x23, 0x20, 0x21, 0x21, 0x22, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x23, 0x22,
- 0x23, 0x22, 0x23, 0x23, 0x23, 0x22, 0xC4, 0xC8,
- 0xBD, 0xBD, 0xC6, 0xBD, 0xC6, 0xC6, 0xC5, 0xC6,
- 0xBD, 0xC6, 0xC7, 0xE4, 0x54, 0x57, 0x58, 0x57,
- 0x57, 0x43, 0xD7, 0xE0, 0xF1, 0xD8, 0xCD, 0x4B,
- 0x4A, 0x47, 0x42, 0x2C, 0x3F, 0x4D, 0x58, 0x5C,
- 0x52, 0x4B, 0x48, 0x4B, 0x4A, 0x58, 0xCB, 0xD3,
- 0xD2, 0xCD, 0x58, 0x47, 0x4A, 0xFC, 0xFC, 0xFB,
- 0xFC, 0x2B, 0x22, 0x22, 0x22, 0x23, 0x22, 0x23,
- 0x22, 0x22, 0x23, 0x26, 0x21, 0x21, 0x23, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23,
- 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0xE5, 0xC8,
- 0xBA, 0xC5, 0xC6, 0xC6, 0xC6, 0xC7, 0xC6, 0xC7,
- 0xC5, 0xC6, 0xC8, 0xE5, 0x2E, 0x54, 0x58, 0x57,
- 0x57, 0x4C, 0x4D, 0xDA, 0xD8, 0xD8, 0xD4, 0x5C,
- 0x4B, 0x4B, 0x3F, 0x42, 0x44, 0x4A, 0x51, 0x58,
- 0x4B, 0x48, 0x4B, 0x51, 0x4D, 0x5F, 0xD0, 0xD1,
- 0xD0, 0x64, 0x51, 0x44, 0x6B, 0xFC, 0xFB, 0xFC,
- 0xFC, 0x21, 0x23, 0x22, 0x22, 0x23, 0x22, 0x23,
- 0x22, 0x22, 0x23, 0x26, 0x21, 0x23, 0x23, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23,
- 0x22, 0x23, 0x22, 0x23, 0x23, 0x23, 0xE5, 0xED,
- 0xE7, 0xBA, 0xC8, 0xC6, 0xC6, 0xC6, 0xC6, 0xC7,
- 0xC7, 0xE5, 0xED, 0xE6, 0x61, 0x41, 0x52, 0x58,
- 0x58, 0x57, 0x45, 0x5E, 0xD7, 0xDD, 0xD5, 0x60,
- 0x4B, 0x4C, 0x48, 0x4D, 0x4D, 0x50, 0x4D, 0x56,
- 0x4A, 0x3E, 0x53, 0x53, 0x52, 0x63, 0xD3, 0xD0,
- 0xCE, 0x60, 0x4A, 0x45, 0xFC, 0xFC, 0xF7, 0xFC,
- 0xFC, 0x21, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23,
- 0x22, 0x23, 0x21, 0x2A, 0x20, 0x23, 0x23, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22,
- 0x23, 0x22, 0x23, 0x22, 0x21, 0x23, 0xEB, 0xF6,
- 0xF6, 0xED, 0xED, 0xED, 0xED, 0xED, 0xED, 0xED,
- 0xF6, 0xF6, 0xF6, 0xE6, 0xDB, 0x58, 0x45, 0x4B,
- 0x58, 0x57, 0x4D, 0x4B, 0x64, 0xD4, 0xD0, 0x5C,
- 0x48, 0x51, 0x4C, 0x5D, 0x5E, 0x5C, 0x56, 0x59,
- 0x3E, 0x4A, 0x58, 0x54, 0x52, 0x65, 0xD3, 0xD0,
- 0xCF, 0x5D, 0x48, 0xFC, 0xFC, 0xFC, 0xFA, 0xFC,
- 0xFC, 0x21, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23,
- 0x22, 0x23, 0x21, 0x2A, 0x21, 0x23, 0x23, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22,
- 0x23, 0x22, 0x23, 0x22, 0x21, 0x4F, 0xE6, 0xC6,
- 0xC6, 0xBD, 0xC6, 0xBD, 0xBD, 0xBD, 0xBD, 0xC6,
- 0xC5, 0xBA, 0xC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0x23, 0x22, 0x22, 0x21, 0x22, 0x23, 0x22,
- 0x22, 0x22, 0x22, 0x23, 0x22, 0x21, 0x23, 0x23,
- 0x24, 0xFC, 0xFC, 0xF6, 0xBF, 0xA6, 0x9F, 0x99,
- 0x89, 0x95, 0x87, 0x94, 0x9D, 0x9E, 0x97, 0x9E,
- 0x95, 0x9B, 0x89, 0x95, 0x95, 0x9B, 0x89, 0x87,
- 0x5D, 0x56, 0x3E, 0x51, 0x3E, 0x60, 0xCF, 0xD3,
- 0xD2, 0xCD, 0x5C, 0x49, 0x4B, 0x3E, 0x2C, 0x48,
- 0x3E, 0x43, 0x3E, 0xA9, 0xA1, 0x9B, 0x97, 0x94,
- 0x95, 0x9A, 0x9C, 0x87, 0x87, 0x9B, 0x9C, 0x95,
- 0x9D, 0x89, 0x9A, 0x89, 0x9E, 0x9E, 0x8C, 0xA6,
- 0x20, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22,
- 0x22, 0x22, 0x22, 0x22, 0x21, 0x21, 0x20, 0x40,
- 0xFC, 0xFC, 0xFC, 0xEC, 0xBE, 0xA4, 0x9F, 0x99,
- 0x95, 0x9F, 0xA0, 0x88, 0x9D, 0x8B, 0x97, 0x95,
- 0x87, 0x95, 0x96, 0x95, 0x97, 0x94, 0x94, 0x98,
- 0xD3, 0x4C, 0x47, 0x4D, 0x42, 0x4C, 0x60, 0xCC,
- 0xCE, 0xD0, 0x65, 0x4B, 0x47, 0x44, 0x2B, 0x45,
- 0x4B, 0x47, 0x49, 0xA7, 0xA1, 0x9A, 0x97, 0x89,
- 0x95, 0x97, 0x97, 0x9E, 0x89, 0x95, 0x89, 0x9C,
- 0x87, 0x95, 0x97, 0x99, 0x95, 0x99, 0x9F, 0xA4,
- 0xC4, 0x21, 0x21, 0x23, 0x21, 0x23, 0x23, 0x23,
- 0x23, 0x23, 0x23, 0x23, 0x21, 0x20, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xEA, 0xAA, 0xA6, 0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, 0x62, 0x62, 0x27,
+ 0x4C, 0x4C, 0x5D, 0x71, 0x30, 0x30, 0x3B, 0x27,
+ 0x54, 0x66, 0x73, 0x66, 0x66, 0x54, 0x54, 0x3D,
+ 0x27, 0x62, 0x6F, 0x30, 0x30, 0x6F, 0x27, 0x3D,
+ 0x54, 0x54, 0x3D, 0x71, 0x3D, 0x71, 0x3D, 0x3D,
+ 0x66, 0x73, 0x66, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x71, 0x3D,
+ 0x66, 0x40, 0x4C, 0x4C, 0x5D, 0x71, 0x30, 0x30,
+ 0x3B, 0x27, 0x54, 0x66, 0x73, 0x66, 0x66, 0x54,
+ 0x54, 0x3D, 0x27, 0x62, 0x6F, 0x30, 0x30, 0x6F,
+ 0x27, 0x3D, 0x54, 0x54, 0x3D, 0x71, 0x71, 0x71,
+ 0x5D, 0x5D, 0x54, 0x62, 0x69, 0x69, 0x3B, 0x3D,
+ 0x66, 0x40, 0x73, 0x66, 0x54, 0x54, 0x71, 0x62,
+ 0x3B, 0x6F, 0x6F, 0x6F, 0x3B, 0x27, 0x3D, 0x2D,
+ 0x66, 0x54, 0x71, 0x71, 0x27, 0x71, 0x71, 0x3D,
+ 0x3D, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54,
+ 0x73, 0x40, 0x5D, 0x5D, 0x54, 0x62, 0x69, 0x69,
+ 0x3B, 0x3D, 0x66, 0x40, 0x73, 0x66, 0x54, 0x54,
+ 0x71, 0x62, 0x3B, 0x6F, 0x6F, 0x6F, 0x3B, 0x27,
+ 0x3D, 0x66, 0x66, 0x54, 0x71, 0x71, 0x27, 0x71,
+ 0x66, 0x73, 0x3D, 0x27, 0x6F, 0x6F, 0x62, 0x54,
+ 0x40, 0x21, 0x5D, 0x73, 0x3D, 0x27, 0x62, 0x6F,
+ 0x6F, 0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x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x6D, 0x6D, 0x38, 0x6D, 0x6D,
+ 0x6D, 0x6D, 0x38, 0x6D, 0x38, 0x6D, 0x6D, 0x6D,
+ 0x30, 0x3B, 0x71, 0x3D, 0x71, 0x27, 0x71, 0x71,
+ 0x3D, 0x66, 0x73, 0x40, 0x73, 0x66, 0x2D, 0x66,
+ 0x30, 0x66, 0x71, 0x6F, 0x69, 0x6F, 0x54, 0x21,
+ 0x7A, 0x66, 0x3D, 0x3B, 0x6F, 0x6F, 0x3B, 0x71,
+ 0x54, 0x66, 0x3D, 0x4C, 0x44, 0x51, 0x44, 0x44,
+ 0x44, 0x38, 0x44, 0x38, 0x44, 0x38, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x6D, 0x38, 0x6D, 0x6D, 0x6D,
+ 0x38, 0x6D, 0x6D, 0x38, 0x6D, 0x38, 0x38, 0x51,
+ 0x3B, 0x71, 0x54, 0x66, 0x3D, 0x3D, 0x3D, 0x2D,
+ 0x40, 0x40, 0x5D, 0x40, 0x73, 0x66, 0x66, 0x3D,
+ 0x69, 0x27, 0x3B, 0x30, 0x69, 0x3B, 0x73, 0x7A,
+ 0x21, 0x3D, 0x62, 0x3B, 0x6F, 0x3B, 0x27, 0x66,
+ 0x73, 0x73, 0x54, 0x4E, 0x44, 0x26, 0x26, 0x5B,
+ 0x26, 0x44, 0x44, 0x44, 0x44, 0x44, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x38, 0x38, 0x38, 0x38, 0x38,
+ 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x6D, 0x26,
+ 0x27, 0x66, 0x73, 0x73, 0x66, 0x2D, 0x66, 0x2D,
+ 0x66, 0x54, 0x54, 0x71, 0x27, 0x27, 0x27, 0x62,
+ 0x69, 0x3B, 0x6F, 0x6F, 0x62, 0x54, 0x40, 0x21,
+ 0x73, 0x27, 0x3B, 0x3B, 0x71, 0x54, 0x66, 0x66,
+ 0x73, 0x73, 0x2D, 0x37, 0x44, 0x51, 0x38, 0x38,
+ 0x44, 0x6D, 0x38, 0x6D, 0x38, 0x38, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x38, 0x6D, 0x38, 0x6D,
+ 0x38, 0x6D, 0x6D, 0x6D, 0x38, 0x38, 0x6D, 0x70,
+ 0x2D, 0x66, 0x73, 0x66, 0x66, 0x54, 0x54, 0x54,
+ 0x27, 0x62, 0x6F, 0x6F, 0x6F, 0x6F, 0x3B, 0x62,
+ 0x3B, 0x27, 0x27, 0x27, 0x3D, 0x40, 0x21, 0x40,
+ 0x54, 0x62, 0x3B, 0x71, 0x73, 0x5D, 0x40, 0x73,
+ 0x66, 0x66, 0x2D, 0x33, 0x6D, 0x26, 0x44, 0x4F,
+ 0x5E, 0x5E, 0x37, 0x5E, 0x37, 0x46, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x44, 0x26, 0x26, 0x44,
+ 0x70, 0x38, 0x26, 0x38, 0x38, 0x44, 0x6D, 0x53,
+ 0x40, 0x73, 0x66, 0x2D, 0x66, 0x73, 0x66, 0x54,
+ 0x27, 0x6F, 0x30, 0x69, 0x30, 0x6F, 0x62, 0x62,
+ 0x62, 0x71, 0x3D, 0x54, 0x73, 0x5D, 0x5D, 0x66,
+ 0x27, 0x62, 0x71, 0x54, 0x5D, 0x5D, 0x66, 0x3D,
+ 0x3D, 0x73, 0x40, 0x37, 0x44, 0x44, 0x51, 0x20,
+ 0x6F, 0x6F, 0x62, 0x27, 0x27, 0x20, 0x20, 0x20,
+ 0x4F, 0x20, 0x2A, 0x2A, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x77, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x71, 0x3D, 0x73, 0x5D,
+ 0x40, 0x54, 0x27, 0x3B, 0x2D, 0x6D, 0x38, 0x3C,
+ 0x66, 0x3D, 0x54, 0x66, 0x40, 0x40, 0x73, 0x54,
+ 0x62, 0x6F, 0x30, 0x6F, 0x62, 0x71, 0x71, 0x71,
+ 0x62, 0x3D, 0x66, 0x73, 0x40, 0x5D, 0x73, 0x71,
+ 0x62, 0x27, 0x54, 0x73, 0x5D, 0x73, 0x27, 0x62,
+ 0x71, 0x40, 0x21, 0x37, 0x26, 0x51, 0x44, 0x4E,
+ 0x3B, 0x71, 0x2D, 0x73, 0x2D, 0x20, 0x20, 0x20,
+ 0x35, 0x73, 0x77, 0x4F, 0x6B, 0x20, 0x20, 0x4F,
+ 0x20, 0x73, 0x73, 0x73, 0x58, 0x20, 0x77, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x2D, 0x40, 0x40, 0x5D,
+ 0x73, 0x71, 0x62, 0x27, 0x71, 0x38, 0x44, 0x49,
+ 0x27, 0x62, 0x3D, 0x40, 0x21, 0x40, 0x54, 0x27,
+ 0x3B, 0x6F, 0x3B, 0x71, 0x54, 0x66, 0x66, 0x3D,
+ 0x62, 0x54, 0x40, 0x21, 0x7A, 0x40, 0x3D, 0x62,
+ 0x62, 0x71, 0x66, 0x40, 0x66, 0x71, 0x62, 0x3B,
+ 0x54, 0x5D, 0x73, 0x23, 0x51, 0x26, 0x26, 0x30,
+ 0x3B, 0x3D, 0x66, 0x73, 0x66, 0x20, 0x20, 0x4F,
+ 0x58, 0x7C, 0x62, 0x34, 0x57, 0x20, 0x20, 0x20,
+ 0x73, 0x58, 0x49, 0x7C, 0x79, 0x73, 0x20, 0x4F,
+ 0x20, 0x20, 0x20, 0x20, 0x40, 0x21, 0x7A, 0x40,
+ 0x3D, 0x27, 0x62, 0x71, 0x49, 0x44, 0x6D, 0x78,
+ 0x62, 0x3B, 0x3D, 0x5D, 0x40, 0x3D, 0x3B, 0x69,
+ 0x49, 0x49, 0x3B, 0x71, 0x66, 0x73, 0x66, 0x54,
+ 0x27, 0x66, 0x5D, 0x7A, 0x21, 0x73, 0x71, 0x62,
+ 0x27, 0x54, 0x73, 0x66, 0x3D, 0x27, 0x62, 0x62,
+ 0x54, 0x73, 0x71, 0x37, 0x26, 0x5B, 0x44, 0x5B,
+ 0x27, 0x54, 0x40, 0x2D, 0x54, 0x20, 0x20, 0x77,
+ 0x78, 0x6D, 0x6D, 0x6D, 0x20, 0x20, 0x20, 0x20,
+ 0x79, 0x38, 0x38, 0x6D, 0x6D, 0x69, 0x2D, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x7A, 0x7A, 0x40,
+ 0x71, 0x62, 0x27, 0x54, 0x79, 0x26, 0x38, 0x49,
+ 0x3B, 0x27, 0x54, 0x2D, 0x71, 0x6F, 0x49, 0x53,
+ 0x78, 0x30, 0x27, 0x54, 0x40, 0x73, 0x54, 0x3D,
+ 0x71, 0x66, 0x5D, 0x7A, 0x21, 0x66, 0x27, 0x3B,
+ 0x27, 0x66, 0x73, 0x54, 0x27, 0x27, 0x27, 0x3D,
+ 0x3D, 0x71, 0x6F, 0x5E, 0x26, 0x79, 0x26, 0x78,
+ 0x5D, 0x4C, 0x4C, 0x21, 0x73, 0x20, 0x20, 0x2D,
+ 0x35, 0x5C, 0x46, 0x38, 0x77, 0x20, 0x4F, 0x20,
+ 0x51, 0x6D, 0x20, 0x2D, 0x20, 0x6D, 0x6D, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x7A, 0x21, 0x54,
+ 0x62, 0x3B, 0x27, 0x2D, 0x29, 0x26, 0x44, 0x70,
+ 0x27, 0x3D, 0x3D, 0x71, 0x6F, 0x78, 0x53, 0x29,
+ 0x69, 0x3D, 0x21, 0x4C, 0x4C, 0x5D, 0x66, 0x54,
+ 0x54, 0x73, 0x21, 0x6A, 0x21, 0x3D, 0x3B, 0x3B,
+ 0x71, 0x66, 0x66, 0x3D, 0x27, 0x27, 0x71, 0x3D,
+ 0x27, 0x6F, 0x49, 0x7E, 0x61, 0x5B, 0x44, 0x26,
+ 0x34, 0x34, 0x6A, 0x21, 0x73, 0x66, 0x20, 0x32,
+ 0x20, 0x20, 0x2D, 0x6D, 0x77, 0x2A, 0x37, 0x20,
+ 0x6D, 0x20, 0x20, 0x20, 0x7E, 0x38, 0x38, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x4C, 0x21, 0x3D,
+ 0x3B, 0x3B, 0x71, 0x73, 0x69, 0x44, 0x38, 0x71,
+ 0x27, 0x3D, 0x71, 0x3B, 0x49, 0x29, 0x29, 0x6F,
+ 0x54, 0x7A, 0x34, 0x77, 0x6A, 0x21, 0x66, 0x66,
+ 0x4C, 0x7A, 0x21, 0x4C, 0x21, 0x71, 0x3B, 0x3B,
+ 0x54, 0x73, 0x3D, 0x62, 0x3B, 0x62, 0x62, 0x62,
+ 0x62, 0x69, 0x29, 0x2B, 0x79, 0x79, 0x26, 0x38,
+ 0x47, 0x6A, 0x5D, 0x54, 0x27, 0x3D, 0x20, 0x29,
+ 0x57, 0x20, 0x2D, 0x61, 0x37, 0x5C, 0x20, 0x20,
+ 0x29, 0x20, 0x20, 0x20, 0x20, 0x29, 0x6D, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x6A, 0x21, 0x3D,
+ 0x3B, 0x3B, 0x54, 0x66, 0x78, 0x26, 0x26, 0x30,
+ 0x62, 0x62, 0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, 0x66, 0x3B, 0x69, 0x3B, 0x71, 0x20, 0x72,
+ 0x24, 0x67, 0x22, 0x22, 0x36, 0x36, 0x45, 0x45,
+ 0x45, 0x22, 0x41, 0x41, 0x3F, 0x42, 0x52, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x54, 0x62,
+ 0x30, 0x3B, 0x3D, 0x54, 0x62, 0x26, 0x79, 0x3B,
+ 0x71, 0x27, 0x30, 0x30, 0x27, 0x5D, 0x4C, 0x6A,
+ 0x7A, 0x7A, 0x5D, 0x54, 0x3B, 0x30, 0x6F, 0x71,
+ 0x27, 0x64, 0x77, 0x40, 0x71, 0x62, 0x3B, 0x62,
+ 0x3D, 0x54, 0x27, 0x3B, 0x6F, 0x3B, 0x27, 0x27,
+ 0x62, 0x3B, 0x3D, 0x23, 0x26, 0x5B, 0x3C, 0x38,
+ 0x5D, 0x71, 0x69, 0x69, 0x62, 0x54, 0x20, 0x50,
+ 0x5F, 0x48, 0x3A, 0x55, 0x41, 0x63, 0x70, 0x22,
+ 0x22, 0x45, 0x3F, 0x42, 0x48, 0x48, 0x45, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x71, 0x62,
+ 0x3B, 0x62, 0x3D, 0x54, 0x30, 0x26, 0x61, 0x71,
+ 0x27, 0x27, 0x62, 0x62, 0x54, 0x5D, 0x7A, 0x4C,
+ 0x4C, 0x4C, 0x5D, 0x71, 0x30, 0x69, 0x62, 0x54,
+ 0x7A, 0x64, 0x34, 0x73, 0x71, 0x27, 0x62, 0x62,
+ 0x71, 0x54, 0x71, 0x3B, 0x6F, 0x3B, 0x71, 0x3D,
+ 0x3D, 0x71, 0x2D, 0x7E, 0x79, 0x53, 0x3C, 0x38,
+ 0x3D, 0x6F, 0x78, 0x49, 0x71, 0x73, 0x20, 0x20,
+ 0x25, 0x3F, 0x3A, 0x41, 0x5A, 0x45, 0x41, 0x45,
+ 0x3F, 0x50, 0x24, 0x28, 0x28, 0x3F, 0x4D, 0x20,
+ 0x20, 0x77, 0x77, 0x20, 0x20, 0x20, 0x71, 0x27,
+ 0x62, 0x62, 0x71, 0x54, 0x78, 0x79, 0x38, 0x71,
+ 0x71, 0x3D, 0x71, 0x71, 0x66, 0x5D, 0x5D, 0x21,
+ 0x21, 0x21, 0x54, 0x30, 0x78, 0x69, 0x27, 0x66,
+ 0x7A, 0x4C, 0x40, 0x3D, 0x27, 0x62, 0x62, 0x3B,
+ 0x62, 0x71, 0x62, 0x30, 0x69, 0x6F, 0x71, 0x54,
+ 0x3D, 0x3D, 0x54, 0x23, 0x4A, 0x3C, 0x3C, 0x38,
+ 0x6F, 0x29, 0x53, 0x30, 0x54, 0x66, 0x20, 0x57,
+ 0x7C, 0x25, 0x4B, 0x3F, 0x43, 0x4B, 0x4B, 0x2C,
+ 0x2E, 0x2E, 0x2E, 0x24, 0x58, 0x58, 0x78, 0x20,
+ 0x20, 0x20, 0x34, 0x77, 0x20, 0x20, 0x20, 0x62,
+ 0x62, 0x3B, 0x62, 0x71, 0x29, 0x79, 0x61, 0x27,
+ 0x27, 0x54, 0x54, 0x71, 0x54, 0x54, 0x66, 0x54,
+ 0x66, 0x71, 0x6F, 0x78, 0x53, 0x69, 0x54, 0x73,
+ 0x73, 0x73, 0x3D, 0x27, 0x27, 0x27, 0x62, 0x3B,
+ 0x62, 0x71, 0x71, 0x3B, 0x6F, 0x3B, 0x27, 0x54,
+ 0x66, 0x3D, 0x3D, 0x37, 0x53, 0x78, 0x49, 0x38,
+ 0x78, 0x29, 0x78, 0x3B, 0x66, 0x73, 0x20, 0x20,
+ 0x7C, 0x69, 0x68, 0x68, 0x52, 0x2E, 0x42, 0x67,
+ 0x5F, 0x45, 0x2C, 0x69, 0x78, 0x32, 0x78, 0x78,
+ 0x20, 0x20, 0x34, 0x77, 0x35, 0x20, 0x20, 0x27,
+ 0x62, 0x3B, 0x62, 0x71, 0x30, 0x26, 0x61, 0x73,
+ 0x27, 0x3D, 0x66, 0x3D, 0x3D, 0x27, 0x27, 0x62,
+ 0x62, 0x6F, 0x78, 0x53, 0x78, 0x62, 0x54, 0x66,
+ 0x27, 0x71, 0x3D, 0x71, 0x62, 0x62, 0x27, 0x3B,
+ 0x62, 0x71, 0x71, 0x27, 0x27, 0x27, 0x27, 0x3D,
+ 0x54, 0x3D, 0x27, 0x7E, 0x29, 0x29, 0x29, 0x6D,
+ 0x49, 0x49, 0x6F, 0x54, 0x73, 0x54, 0x20, 0x20,
+ 0x29, 0x7C, 0x69, 0x43, 0x76, 0x72, 0x2C, 0x76,
+ 0x68, 0x62, 0x78, 0x29, 0x6D, 0x38, 0x6D, 0x32,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62,
+ 0x27, 0x3B, 0x62, 0x71, 0x78, 0x61, 0x6D, 0x3C,
+ 0x27, 0x3D, 0x54, 0x3D, 0x27, 0x62, 0x3B, 0x6F,
+ 0x6F, 0x69, 0x49, 0x49, 0x6F, 0x3D, 0x73, 0x66,
+ 0x3D, 0x3D, 0x3D, 0x3D, 0x71, 0x27, 0x71, 0x62,
+ 0x62, 0x71, 0x3D, 0x71, 0x71, 0x71, 0x27, 0x71,
+ 0x54, 0x3D, 0x27, 0x46, 0x49, 0x78, 0x49, 0x6D,
+ 0x6F, 0x27, 0x54, 0x73, 0x40, 0x20, 0x20, 0x20,
+ 0x44, 0x32, 0x29, 0x49, 0x77, 0x2F, 0x73, 0x62,
+ 0x29, 0x32, 0x29, 0x51, 0x6D, 0x38, 0x6D, 0x38,
+ 0x56, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x71, 0x62, 0x62, 0x71, 0x6F, 0x70, 0x38, 0x71,
+ 0x27, 0x71, 0x54, 0x3D, 0x62, 0x3B, 0x3B, 0x6F,
+ 0x6F, 0x6F, 0x3B, 0x27, 0x54, 0x40, 0x73, 0x66,
+ 0x40, 0x40, 0x66, 0x3D, 0x71, 0x3D, 0x71, 0x71,
+ 0x27, 0x27, 0x3D, 0x54, 0x3D, 0x3D, 0x71, 0x54,
+ 0x73, 0x73, 0x3D, 0x46, 0x78, 0x49, 0x78, 0x44,
+ 0x66, 0x73, 0x5D, 0x5D, 0x35, 0x20, 0x20, 0x78,
+ 0x6D, 0x51, 0x78, 0x49, 0x58, 0x29, 0x29, 0x49,
+ 0x29, 0x79, 0x38, 0x38, 0x6D, 0x6D, 0x38, 0x6D,
+ 0x6D, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x6B, 0x71, 0x27, 0x27, 0x29, 0x3C, 0x44, 0x40,
+ 0x3D, 0x54, 0x73, 0x73, 0x54, 0x71, 0x71, 0x3D,
+ 0x3D, 0x3D, 0x66, 0x40, 0x5D, 0x5D, 0x5D, 0x40,
+ 0x21, 0x5D, 0x73, 0x66, 0x3D, 0x3D, 0x71, 0x71,
+ 0x27, 0x27, 0x3D, 0x54, 0x54, 0x66, 0x54, 0x73,
+ 0x5D, 0x21, 0x40, 0x33, 0x69, 0x49, 0x30, 0x38,
+ 0x7A, 0x7A, 0x7A, 0x21, 0x6B, 0x20, 0x20, 0x6D,
+ 0x38, 0x6D, 0x38, 0x7C, 0x49, 0x29, 0x69, 0x78,
+ 0x38, 0x38, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x38,
+ 0x6D, 0x37, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x71, 0x27, 0x71, 0x78, 0x3C, 0x26, 0x30,
+ 0x66, 0x66, 0x5D, 0x21, 0x5D, 0x73, 0x73, 0x40,
+ 0x5D, 0x21, 0x7A, 0x4C, 0x21, 0x5D, 0x21, 0x21,
+ 0x5D, 0x54, 0x54, 0x54, 0x3D, 0x71, 0x3D, 0x71,
+ 0x27, 0x27, 0x71, 0x54, 0x66, 0x54, 0x66, 0x66,
+ 0x5D, 0x21, 0x5D, 0x7E, 0x29, 0x69, 0x49, 0x6D,
+ 0x4C, 0x7A, 0x5D, 0x20, 0x20, 0x20, 0x51, 0x38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62, 0x27, 0x27, 0x30, 0x62, 0x27,
+ 0x62, 0x27, 0x3B, 0x49, 0x3B, 0x30, 0x29, 0x3B,
+ 0x3B, 0x30, 0x30, 0x69, 0x30, 0x6F, 0x30, 0x49,
+ 0x3B, 0x6F, 0x49, 0x29, 0x49, 0x49, 0x3C, 0x29,
+ 0x49, 0x49, 0x69, 0x70, 0x70, 0x29, 0x51, 0x27,
+ 0x3B, 0x3B, 0x3B, 0x62, 0x27, 0x27, 0x27, 0x27,
+ 0x27, 0x3D, 0x3D, 0x3D, 0x71, 0x27, 0x27, 0x27,
+ 0x69, 0x71, 0x3D, 0x54, 0x71, 0x62, 0x27, 0x71,
+ 0x54, 0x2D, 0x3D, 0x27, 0x62, 0x3B, 0x3B, 0x3B,
+ 0x3B, 0x62, 0x62, 0x33, 0x27, 0x27, 0x3B, 0x71,
+ 0x27, 0x71, 0x27, 0x62, 0x71, 0x6F, 0x27, 0x71,
+ 0x3B, 0x62, 0x62, 0x6F, 0x62, 0x6F, 0x6F, 0x6F,
+ 0x6F, 0x69, 0x62, 0x49, 0x69, 0x49, 0x6F, 0x62,
+ 0x62, 0x49, 0x69, 0x71, 0x6F, 0x6F, 0x6F, 0x69,
+ 0x69, 0x69, 0x30, 0x29, 0x30, 0x69, 0x44, 0x7B,
+ 0x3B, 0x3B, 0x3B, 0x62, 0x62, 0x62, 0x62, 0x62,
+ 0x27, 0x3D, 0x3D, 0x54, 0x71, 0x3D, 0x3D, 0x54,
+ 0x69, 0x71, 0x3D, 0x71, 0x62, 0x3B, 0x3B, 0x27,
+ 0x54, 0x54, 0x3D, 0x71, 0x71, 0x71, 0x27, 0x62,
+ 0x62, 0x62, 0x27, 0x2A, 0x3D, 0x71, 0x3D, 0x71,
+ 0x3D, 0x62, 0x27, 0x30, 0x30, 0x62, 0x3B, 0x71,
+ 0x3B, 0x30, 0x30, 0x49, 0x29, 0x30, 0x30, 0x30,
+ 0x27, 0x49, 0x62, 0x30, 0x6F, 0x30, 0x3B, 0x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x3A, 0x55, 0x31, 0x3A,
+ 0x41, 0x7D, 0x3A, 0x22, 0x55, 0x48, 0x42, 0x76,
+ 0x4B, 0x20, 0x37, 0x6D, 0x6D, 0x6D, 0x38, 0x78,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x4D, 0x76, 0x42, 0x48, 0x55, 0x74,
+ 0x41, 0x6C, 0x48, 0x31, 0x31, 0x3A, 0x5A, 0x74,
+ 0x31, 0x6C, 0x22, 0x3E, 0x67, 0x62, 0x7A, 0x64,
+ 0x7B, 0x77, 0x5D, 0x54, 0x71, 0x62, 0x62, 0x3B,
+ 0x53, 0x62, 0x71, 0x73, 0x73, 0x27, 0x6F, 0x3B,
+ 0x67, 0x2E, 0x5F, 0x48, 0x48, 0x52, 0x52, 0x52,
+ 0x52, 0x52, 0x31, 0x41, 0x74, 0x41, 0x74, 0x31,
+ 0x74, 0x3A, 0x74, 0x74, 0x48, 0x48, 0x42, 0x72,
+ 0x4B, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x4B, 0x68, 0x42, 0x28, 0x55, 0x74,
+ 0x5A, 0x3A, 0x48, 0x55, 0x5A, 0x31, 0x55, 0x55,
+ 0x39, 0x67, 0x2F, 0x49, 0x69, 0x27, 0x4C, 0x64,
+ 0x34, 0x5D, 0x66, 0x71, 0x62, 0x6F, 0x6F, 0x6F,
+ 0x79, 0x27, 0x66, 0x73, 0x66, 0x27, 0x6F, 0x3B,
+ 0x54, 0x24, 0x5F, 0x59, 0x24, 0x24, 0x42, 0x2E,
+ 0x48, 0x67, 0x28, 0x39, 0x52, 0x39, 0x31, 0x3E,
+ 0x55, 0x3A, 0x3A, 0x31, 0x39, 0x48, 0x24, 0x76,
+ 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x4B, 0x76, 0x24, 0x42, 0x52, 0x55,
+ 0x41, 0x31, 0x31, 0x39, 0x52, 0x52, 0x48, 0x67,
+ 0x72, 0x71, 0x6F, 0x69, 0x58, 0x2D, 0x4C, 0x34,
+ 0x7A, 0x40, 0x66, 0x54, 0x62, 0x30, 0x6F, 0x3B,
+ 0x53, 0x7A, 0x7A, 0x73, 0x3D, 0x62, 0x30, 0x6F,
+ 0x3D, 0x3D, 0x3B, 0x60, 0x2F, 0x76, 0x59, 0x59,
+ 0x59, 0x24, 0x24, 0x5F, 0x42, 0x2E, 0x28, 0x55,
+ 0x3A, 0x39, 0x39, 0x48, 0x48, 0x65, 0x68, 0x25,
+ 0x4B, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x4B, 0x25, 0x72, 0x65, 0x2E, 0x28,
+ 0x52, 0x28, 0x48, 0x48, 0x2E, 0x24, 0x3F, 0x4B,
+ 0x71, 0x27, 0x30, 0x30, 0x27, 0x5D, 0x4C, 0x6A,
+ 0x7A, 0x7A, 0x5D, 0x54, 0x3B, 0x30, 0x6F, 0x71,
+ 0x27, 0x64, 0x34, 0x40, 0x3D, 0x62, 0x3B, 0x27,
+ 0x3D, 0x54, 0x71, 0x3B, 0x3B, 0x62, 0x71, 0x4B,
+ 0x43, 0x43, 0x76, 0x76, 0x72, 0x59, 0x24, 0x24,
+ 0x42, 0x2E, 0x42, 0x24, 0x2C, 0x76, 0x60, 0x50,
+ 0x4D, 0x20, 0x20, 0x20, 0x20, 0x62, 0x27, 0x3D,
+ 0x3D, 0x27, 0x62, 0x62, 0x27, 0x27, 0x62, 0x30,
+ 0x20, 0x20, 0x4B, 0x25, 0x76, 0x59, 0x24, 0x24,
+ 0x42, 0x42, 0x42, 0x65, 0x3F, 0x60, 0x6F, 0x62,
+ 0x27,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x27, 0x62, 0x3B,
+ 0x3B, 0x27, 0x27, 0x3B, 0x6F, 0x62, 0x27, 0x54,
+ 0x66, 0x3D, 0x3D, 0x27, 0x27, 0x27, 0x62, 0x6F,
+ 0x78, 0x53, 0x78, 0x62, 0x66, 0x73, 0x3D, 0x3D,
+ 0x66, 0x2D, 0x54, 0x54, 0x73, 0x73, 0x54, 0x71,
+ 0x71, 0x27, 0x3B, 0x6F, 0x3B, 0x3B, 0x62, 0x3B,
+ 0x3B, 0x71, 0x73, 0x73, 0x54, 0x71, 0x62, 0x27,
+ 0x27, 0x58, 0x62, 0x71, 0x71, 0x6F, 0x6F, 0x62,
+ 0x27, 0x54, 0x66, 0x3D, 0x3D, 0x27, 0x27, 0x62,
+ 0x62, 0x6F, 0x78, 0x53, 0x78, 0x62, 0x54, 0x66,
+ 0x71, 0x3D, 0x71, 0x71, 0x62, 0x27, 0x27, 0x62,
+ 0x62, 0x71, 0x3D, 0x27, 0x27, 0x62, 0x27, 0x3D,
+ 0x54, 0x3D, 0x27, 0x62, 0x3B, 0x6F, 0x6F, 0x69,
+ 0x78, 0x78, 0x6F, 0x54, 0x73, 0x66, 0x54, 0x54,
+ 0x40, 0x5D, 0x40, 0x40, 0x40, 0x66, 0x3D, 0x71,
+ 0x27, 0x27, 0x3B, 0x30, 0x6F, 0x3B, 0x3B, 0x62,
+ 0x3B, 0x3B, 0x27, 0x71, 0x71, 0x27, 0x62, 0x62,
+ 0x62, 0x62, 0x62, 0x71, 0x71, 0x71, 0x62, 0x62,
+ 0x27, 0x71, 0x54, 0x3D, 0x27, 0x62, 0x3B, 0x6F,
+ 0x6F, 0x69, 0x49, 0x49, 0x6F, 0x3D, 0x73, 0x66
};
-unsigned char linux_logo_bw[] __initdata = {
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x3F,
- 0xFF, 0xFF, 0xFF, 0xFF, 0x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0x00, 0x00,
- 0xFF, 0xC3, 0xFF, 0xFF, 0xF8, 0x00, 0x30, 0x00,
- 0x00, 0x00, 0xFF, 0x0F, 0xFF, 0xFF, 0xC0, 0x40,
- 0x38, 0x00, 0x00, 0x00, 0xFE, 0x47, 0xFF, 0xFF,
- 0x81, 0x00, 0x1C, 0x00, 0x00, 0x00, 0xFC, 0x23,
- 0xFF, 0xFF, 0x90, 0x00, 0x1E, 0x00, 0x00, 0x00,
- 0x78, 0x11, 0xFF, 0xFF, 0x80, 0x00, 0x0F, 0x80,
- 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00,
- 0x07, 0xC0, 0x00, 0x00, 0x00, 0x08, 0xFF, 0xFF,
- 0xC0, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x04,
- 0x7F, 0xFF, 0x80, 0x00, 0x03, 0xC0, 0x00, 0x10,
- 0x00, 0x00, 0x1F, 0xFF, 0x80, 0x00, 0x01, 0x80,
- 0x00, 0x30, 0x00, 0x00, 0x0F, 0xFF, 0x80, 0x00,
- 0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0x4F, 0xFF,
- 0x80, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00,
- 0x0F, 0xFF, 0xC0, 0x00, 0x00, 0x80, 0x03, 0xF0,
- 0x00, 0x00, 0x8F, 0xFF, 0x80, 0x00, 0x00, 0x40,
- 0x0F, 0xF0, 0x00, 0x04, 0x1F, 0xFF, 0x80, 0x00,
- 0x00, 0x7F, 0xFF, 0xF0, 0x00, 0x10, 0x1F, 0xFF,
- 0xC0, 0x00, 0x00, 0x7F, 0xFF, 0xF0, 0x00, 0x40,
- 0xFF, 0xFF, 0x98, 0x00, 0x00, 0xFF, 0xFF, 0xF0,
- 0x00, 0x83, 0xFF, 0xFF, 0x81, 0xE0, 0x01, 0xFF,
- 0xFF, 0xF8, 0x02, 0x07, 0xFF, 0xFF, 0x80, 0x3F,
- 0x07, 0xE0, 0x00, 0x1C, 0x0C, 0x1F, 0xFF, 0xFF,
- 0xF8, 0x03, 0xFF, 0x80, 0x00, 0x1F, 0x78, 0x1F,
- 0xFF, 0xFF, 0xFF, 0x80, 0x7F, 0x00, 0x07, 0x0F,
- 0xF0, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, 0x0C, 0x07,
- 0xFF, 0x83, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x00, 0x1F, 0xFF, 0xC0, 0x03, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x07, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-};
+#endif
-unsigned char linux_logo16_red[] __initdata = {
- 0x00, 0x90, 0xb0, 0x9c, 0xf7, 0x35, 0x83, 0xa5,
- 0x65, 0x8f, 0x98, 0xc9, 0xdb, 0xe1, 0xe7, 0xf8
-};
+#else
-unsigned char linux_logo16_green[] __initdata = {
- 0x00, 0x90, 0xb0, 0x9c, 0xf7, 0x2e, 0x83, 0xa5,
- 0x65, 0x6e, 0x98, 0x89, 0xbf, 0xac, 0xda, 0xf8
-};
+#define LINUX_LOGO_COLORS 221
-unsigned char linux_logo16_blue[] __initdata = {
- 0x00, 0x90, 0xaf, 0x9c, 0xf7, 0x2b, 0x82, 0xa5,
- 0x65, 0x41, 0x97, 0x1e, 0x60, 0x29, 0xa5, 0xf8
-};
+#endif
-unsigned char linux_logo16[] __initdata = {
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa1, 0x11, 0x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aa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa3,
- 0x33, 0x37, 0x77, 0x33, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x56, 0x85, 0x00, 0x06, 0x66, 0x11,
- 0x11, 0x1a, 0xa3, 0x37, 0x77, 0x72, 0x22, 0x77,
- 0x73, 0x33, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33,
- 0x33, 0x33, 0x33, 0x30, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x55, 0x00, 0x00, 0x06, 0x66, 0x66,
- 0x66, 0x66, 0x11, 0x1a, 0xa3, 0x77, 0x72, 0x22,
- 0x77, 0x73, 0x3a, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33,
- 0x33, 0x33, 0x33, 0xa0, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11,
- 0x66, 0x66, 0x66, 0x66, 0x11, 0xa3, 0x77, 0x22,
- 0x22, 0x77, 0x33, 0x33, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33, 0x33,
- 0x33, 0x3a, 0xa1, 0x10, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x33,
- 0xaa, 0x11, 0x16, 0x66, 0x66, 0x61, 0x1a, 0x37,
- 0x22, 0x22, 0x77, 0x33, 0x3a, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xa3, 0x33, 0x33, 0x33,
- 0x3a, 0xa1, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x02, 0x22,
- 0x22, 0x77, 0x3a, 0x11, 0x66, 0x66, 0x66, 0x1a,
- 0x37, 0x22, 0x22, 0x77, 0x33, 0x3a, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33, 0x33, 0x3a,
- 0xa1, 0x11, 0x11, 0x10, 0x00, 0x00, 0x50, 0x00,
- 0x00, 0x05, 0x80, 0x50, 0x00, 0x00, 0x07, 0x72,
- 0x22, 0x22, 0x22, 0x73, 0xa1, 0x66, 0x66, 0x61,
- 0x1a, 0x77, 0x22, 0x27, 0x73, 0x33, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33, 0x3a, 0xaa,
- 0x11, 0x11, 0x1a, 0xa0, 0x08, 0x71, 0x05, 0x00,
- 0x00, 0x12, 0x22, 0x50, 0x00, 0x00, 0x07, 0x77,
- 0x77, 0x72, 0x22, 0x22, 0x27, 0x31, 0x16, 0x66,
- 0x61, 0x13, 0x77, 0x22, 0x77, 0x33, 0x3a, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xa3, 0x33, 0x33, 0xaa, 0xa1,
- 0x11, 0x1a, 0x33, 0x70, 0x07, 0x2e, 0x70, 0x00,
- 0x01, 0x44, 0x42, 0x60, 0x00, 0x00, 0x02, 0x22,
- 0x22, 0x22, 0x22, 0x22, 0x22, 0x27, 0x31, 0x66,
- 0x66, 0x61, 0xa3, 0x72, 0x22, 0x77, 0x33, 0xaa,
- 0xaa, 0xaa, 0xa3, 0x33, 0x33, 0xaa, 0xaa, 0x11,
- 0x1a, 0x33, 0x77, 0x30, 0x04, 0x82, 0x40, 0x00,
- 0x54, 0x48, 0x54, 0x40, 0x00, 0x00, 0x01, 0xaa,
- 0x32, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x31,
- 0x66, 0x66, 0x11, 0x37, 0x22, 0x27, 0x73, 0x3a,
- 0xaa, 0xaa, 0xa3, 0x33, 0x3a, 0xaa, 0xaa, 0xaa,
- 0xa3, 0x77, 0xaa, 0x10, 0x50, 0x08, 0x46, 0x05,
- 0x54, 0x80, 0x50, 0x42, 0x00, 0x00, 0x08, 0x66,
- 0x66, 0x1a, 0x32, 0x22, 0x22, 0x22, 0x22, 0x27,
- 0x31, 0x66, 0x66, 0x13, 0x72, 0x22, 0x77, 0x33,
- 0xaa, 0xaa, 0xaa, 0x33, 0xaa, 0xa1, 0xaa, 0xa3,
- 0x37, 0xa1, 0x1a, 0x30, 0x50, 0x06, 0x26, 0x00,
- 0x54, 0x00, 0x00, 0x44, 0x00, 0x00, 0x08, 0xe2,
- 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x22, 0x22,
- 0x27, 0xa6, 0x66, 0x61, 0xa7, 0x72, 0x27, 0x73,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33,
- 0x31, 0x11, 0x37, 0x70, 0x02, 0x00, 0xab, 0xbb,
- 0xb6, 0x00, 0x00, 0xf4, 0x00, 0x00, 0xee, 0xee,
- 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x22,
- 0x22, 0x23, 0x16, 0x66, 0x1a, 0x37, 0x22, 0x77,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa3, 0x3a,
- 0x11, 0xa7, 0x33, 0x10, 0x04, 0x09, 0xbd, 0xdd,
- 0xbd, 0xd0, 0x04, 0x45, 0x00, 0x0e, 0xee, 0xee,
- 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x22,
- 0x22, 0x22, 0x71, 0x66, 0x66, 0x13, 0x72, 0x27,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x11,
- 0xa3, 0x73, 0xa1, 0x60, 0x08, 0xbd, 0xdd, 0xdd,
- 0xdd, 0xdd, 0xdb, 0x90, 0x00, 0x02, 0xec, 0xee,
- 0xee, 0x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, 0x00, 0x00, 0x99,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x22, 0x22,
- 0x21, 0x88, 0x88, 0x6a, 0x22, 0x22, 0x22, 0x31,
- 0x3a, 0xa1, 0x11, 0x1a, 0xa3, 0x11, 0x33, 0x36,
- 0x88, 0x86, 0x30, 0x00, 0x4f, 0x44, 0x22, 0x22,
- 0x24, 0xff, 0xff, 0xff, 0x44, 0x00, 0x00, 0x99,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x95, 0x22, 0x72,
- 0x22, 0x18, 0x88, 0x86, 0x32, 0x22, 0x22, 0x27,
- 0xaa, 0x11, 0x11, 0x1a, 0x31, 0x13, 0x33, 0x68,
- 0x88, 0x6a, 0x00, 0x02, 0x4f, 0x4f, 0x42, 0x24,
- 0x4f, 0xff, 0xff, 0xff, 0xf4, 0x50, 0x00, 0x99,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x22, 0x73,
- 0x72, 0x26, 0x88, 0x88, 0x63, 0x22, 0x22, 0x22,
- 0x11, 0x11, 0x11, 0xa3, 0xa1, 0x73, 0xa6, 0x88,
- 0x81, 0xa5, 0x00, 0x04, 0x4f, 0x4f, 0x44, 0x4f,
- 0xff, 0xff, 0xff, 0xff, 0xf4, 0x40, 0x00, 0x99,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x12, 0x27,
- 0xaa, 0x22, 0x68, 0x55, 0x86, 0x72, 0x22, 0x22,
- 0x11, 0x11, 0x1a, 0x33, 0x13, 0x3a, 0x18, 0x88,
- 0x1a, 0x10, 0x00, 0x44, 0x4f, 0x4f, 0xff, 0x4f,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x99,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x61, 0x22,
- 0x3a, 0xa2, 0x26, 0x85, 0x58, 0x67, 0x22, 0x22,
- 0x61, 0x61, 0x1a, 0x7a, 0x37, 0x31, 0x88, 0x81,
- 0x11, 0x00, 0x05, 0xe4, 0x44, 0xff, 0xff, 0xff,
- 0x4f, 0xf4, 0x44, 0xff, 0xff, 0xf5, 0x00, 0x99,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x88, 0x12,
- 0x2a, 0xaa, 0x72, 0x68, 0x55, 0x81, 0x22, 0x22,
- 0x66, 0x61, 0xa3, 0x33, 0x73, 0x16, 0x88, 0x11,
- 0x10, 0x00, 0x08, 0x74, 0x44, 0x4f, 0x44, 0x44,
- 0xf4, 0xf4, 0x44, 0x44, 0xe2, 0x44, 0x00, 0x99,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x88, 0x81,
- 0x22, 0xaa, 0xa7, 0x26, 0x85, 0x88, 0x12, 0x22,
- 0x66, 0x61, 0x37, 0xa7, 0x3a, 0x66, 0x66, 0x11,
- 0x80, 0x00, 0x0a, 0x72, 0x44, 0x4f, 0x44, 0x4f,
- 0xff, 0x44, 0x44, 0x22, 0x22, 0x24, 0x00, 0x99,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x85, 0x88,
- 0x12, 0x2a, 0xaa, 0x22, 0x68, 0x58, 0x63, 0x22,
- 0x66, 0x1a, 0x73, 0x77, 0x31, 0x66, 0x61, 0x11,
- 0x00, 0x00, 0x07, 0x44, 0xff, 0x4f, 0xf4, 0x4f,
- 0xff, 0x4f, 0x44, 0xf4, 0x42, 0x22, 0x40, 0x9b,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb9, 0x85, 0x55,
- 0x81, 0x27, 0xaa, 0xa2, 0x78, 0x88, 0x86, 0x72,
- 0x66, 0x13, 0x77, 0x73, 0x11, 0x66, 0x61, 0x76,
- 0x00, 0x50, 0x84, 0xf4, 0xff, 0x4f, 0xf4, 0xff,
- 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x42, 0x40, 0x9b,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb9, 0x68, 0x55,
- 0x58, 0x12, 0x3a, 0xaa, 0x23, 0x88, 0x88, 0xa7,
- 0x66, 0xa7, 0x77, 0x7a, 0x16, 0x66, 0x1a, 0x15,
- 0x05, 0x00, 0x4f, 0xf4, 0xff, 0x4f, 0xf4, 0xff,
- 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x44, 0x24, 0x9b,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb9, 0x26, 0x55,
- 0x55, 0x81, 0x23, 0xaa, 0x32, 0x18, 0x88, 0x6a,
- 0x61, 0x37, 0x77, 0x31, 0x66, 0x66, 0x17, 0x60,
- 0x05, 0x08, 0x4f, 0xf4, 0xff, 0x4f, 0xf4, 0xff,
- 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x4e, 0x99,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0xa2, 0x65,
- 0x55, 0x58, 0xa2, 0x7a, 0xa2, 0x26, 0x88, 0x61,
- 0x61, 0x32, 0x27, 0xa1, 0x66, 0x61, 0x31, 0x60,
- 0x00, 0x04, 0x4f, 0xf4, 0xff, 0x44, 0x44, 0xff,
- 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x44, 0xf4, 0x99,
- 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x9b, 0xaa, 0x26,
- 0x55, 0x55, 0x87, 0x27, 0x33, 0x27, 0x68, 0x61,
- 0x1a, 0x72, 0x27, 0xa6, 0x66, 0x6a, 0x71, 0x00,
- 0x80, 0x84, 0xff, 0xf4, 0xff, 0x44, 0x44, 0xff,
- 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x44, 0xf4, 0x99,
- 0x9b, 0x9b, 0x99, 0xb9, 0xb9, 0x99, 0xaa, 0xa2,
- 0x85, 0x55, 0x56, 0x22, 0x27, 0x22, 0x36, 0x66,
- 0x13, 0x22, 0x23, 0x16, 0x86, 0x63, 0x73, 0x00,
- 0x00, 0x44, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0xff,
- 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x4f, 0x99,
- 0x9b, 0x99, 0x99, 0x99, 0xb9, 0x99, 0xaa, 0xaa,
- 0x28, 0x55, 0x58, 0x12, 0x22, 0x22, 0x21, 0x11,
- 0xa3, 0x27, 0x7a, 0x66, 0x86, 0x17, 0x75, 0x05,
- 0x05, 0xff, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0xff,
- 0xff, 0x4f, 0x44, 0x4f, 0x4f, 0x44, 0x4f, 0x99,
- 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x3a, 0xaa,
- 0xa2, 0x85, 0x58, 0x67, 0x72, 0x22, 0x27, 0xa1,
- 0x37, 0x27, 0x7a, 0x68, 0x86, 0xa2, 0x70, 0x00,
- 0x02, 0xff, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0x4f,
- 0xff, 0x4f, 0x44, 0xf4, 0xf4, 0xf4, 0xf4, 0x99,
- 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x23, 0xaa,
- 0xa7, 0x78, 0x88, 0x81, 0x77, 0x22, 0x27, 0x3a,
- 0x72, 0x73, 0x71, 0x68, 0x66, 0x32, 0x50, 0x00,
- 0x04, 0x4f, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0x4f,
- 0xff, 0x4f, 0x44, 0xf4, 0xf4, 0xf4, 0x44, 0x95,
- 0x99, 0x99, 0x99, 0x99, 0x99, 0x55, 0x12, 0x3a,
- 0xaa, 0x21, 0x88, 0x81, 0x77, 0x27, 0x73, 0x73,
- 0x72, 0x33, 0x36, 0x86, 0x61, 0x72, 0x00, 0x00,
- 0x04, 0x44, 0xf4, 0xf4, 0xf4, 0x44, 0x44, 0x4f,
- 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x44, 0x55,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x8a, 0x27,
- 0xaa, 0x77, 0x68, 0x61, 0x23, 0x71, 0x11, 0x3a,
- 0x27, 0xa3, 0x36, 0x86, 0x61, 0x20, 0x00, 0x00,
- 0x04, 0xf4, 0xf4, 0xf4, 0xf4, 0x44, 0x44, 0x4f,
- 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x41, 0x59,
- 0x99, 0x99, 0x99, 0x99, 0x99, 0x95, 0x58, 0x77,
- 0x27, 0x32, 0x36, 0x63, 0x23, 0x71, 0x66, 0x11,
- 0x27, 0x13, 0xa6, 0x86, 0x6a, 0x20, 0x00, 0x50,
- 0x04, 0x4f, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f,
- 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x41, 0x99,
- 0x9b, 0xbb, 0xbb, 0xbb, 0xb9, 0x99, 0x68, 0x13,
- 0x32, 0x22, 0x73, 0xa7, 0x2a, 0x31, 0x88, 0x66,
- 0x7a, 0x13, 0x18, 0x66, 0x63, 0x20, 0x00, 0x06,
- 0x0f, 0x4f, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f,
- 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x49, 0x95,
- 0xa9, 0xa9, 0x99, 0x97, 0x92, 0x99, 0x65, 0x6a,
- 0x17, 0x22, 0x23, 0x72, 0x27, 0xaa, 0x88, 0x88,
- 0xa1, 0x17, 0x68, 0x66, 0x67, 0x70, 0x00, 0x05,
- 0x0f, 0x4f, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f,
- 0xff, 0x4f, 0x44, 0xff, 0xf4, 0xf4, 0x49, 0x9c,
- 0x2e, 0xee, 0xee, 0xee, 0xee, 0xa9, 0x65, 0x8a,
- 0x1a, 0xaa, 0x37, 0x72, 0x27, 0x37, 0x88, 0x88,
- 0x11, 0x17, 0x68, 0x66, 0x67, 0x10, 0x9d, 0xd0,
- 0x84, 0x44, 0xff, 0x4f, 0x4f, 0x44, 0xf4, 0x4f,
- 0xff, 0x4f, 0x44, 0xff, 0xf4, 0xf4, 0x4f, 0x69,
- 0xcc, 0xee, 0xee, 0xee, 0xec, 0x99, 0x88, 0x63,
- 0x61, 0x68, 0x61, 0x72, 0x22, 0x7a, 0x68, 0x88,
- 0x11, 0x17, 0x88, 0x66, 0x12, 0x1b, 0xdd, 0xdd,
- 0x02, 0x44, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f,
- 0xff, 0x4f, 0x44, 0xff, 0xff, 0x4f, 0x4c, 0xc5,
- 0x0c, 0xc1, 0x11, 0x1c, 0xc0, 0x26, 0x66, 0x17,
- 0x66, 0x88, 0x88, 0x12, 0x22, 0x23, 0xa8, 0x88,
- 0x11, 0x13, 0x88, 0x66, 0x17, 0xbb, 0xdd, 0xdd,
- 0xd0, 0x8f, 0xff, 0xf4, 0xf4, 0x44, 0xf4, 0x4f,
- 0xff, 0x4f, 0x44, 0xf4, 0x4f, 0x44, 0xdd, 0xdd,
- 0x00, 0x00, 0x00, 0x05, 0x9d, 0x21, 0x66, 0x27,
- 0xa6, 0x65, 0x58, 0x67, 0x22, 0x27, 0x28, 0x88,
- 0x11, 0xaa, 0x86, 0x68, 0x1a, 0xbb, 0xdd, 0xdd,
- 0xdb, 0x05, 0xf4, 0xf4, 0xf4, 0xf4, 0x44, 0x4f,
- 0xff, 0x4f, 0x44, 0xf4, 0xf4, 0xf4, 0xdd, 0xdb,
- 0x00, 0x00, 0x00, 0x00, 0xdd, 0xda, 0x66, 0x22,
- 0x71, 0x15, 0x55, 0x81, 0x22, 0x22, 0x76, 0x88,
- 0x11, 0x31, 0x88, 0x88, 0xab, 0xbd, 0xdd, 0xdd,
- 0xdd, 0x00, 0x04, 0x44, 0xff, 0xff, 0x4f, 0x4f,
- 0xff, 0x4f, 0x44, 0xf4, 0xf4, 0x44, 0xdd, 0xdb,
- 0x00, 0x00, 0x00, 0x0b, 0xdd, 0xda, 0x11, 0x22,
- 0x23, 0x68, 0x55, 0x86, 0x22, 0x22, 0x7a, 0x88,
- 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0xbd,
- 0xdd, 0xdd, 0xdd, 0xbb, 0xb5, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xbb, 0xbd,
- 0xdd, 0xdd, 0xdb, 0xbb, 0x87, 0x31, 0x68, 0x65,
- 0x88, 0x82, 0x23, 0x16, 0x18, 0x88, 0x12, 0x23,
- 0x88, 0x67, 0x27, 0xa8, 0x9b, 0xbb, 0xbb, 0xbb,
- 0xbd, 0xdd, 0xbb, 0xbb, 0x95, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x9b, 0xbb,
- 0xbb, 0xbb, 0xbb, 0x96, 0x87, 0x16, 0x68, 0x18,
- 0x88, 0x62, 0x31, 0x66, 0x18, 0x88, 0x62, 0x73,
- 0x88, 0x63, 0x27, 0x33, 0x65, 0x55, 0x99, 0x9b,
- 0xbb, 0xbb, 0xbb, 0x99, 0x55, 0x0a, 0xa1, 0x86,
- 0x81, 0x68, 0x88, 0x55, 0x58, 0x85, 0x9b, 0xbb,
- 0xbb, 0xbb, 0x95, 0x88, 0x83, 0x66, 0x66, 0x18,
- 0x66, 0x82, 0xa1, 0x66, 0x18, 0x88, 0x62, 0x33,
- 0x88, 0x81, 0x27, 0x7a, 0x18, 0x58, 0x86, 0x85,
- 0x99, 0x99, 0x99, 0x95, 0x53, 0x2a, 0xaa, 0x88,
- 0x67, 0x31, 0x68, 0x55, 0x58, 0x85, 0x59, 0xbb,
- 0xbb, 0xb9, 0x58, 0x68, 0x83, 0x66, 0x61, 0x16,
- 0x66, 0x62, 0x16, 0x66, 0x68, 0x88, 0x62, 0xaa,
- 0x88, 0x86, 0x27, 0x77, 0x78, 0x55, 0x88, 0x22,
- 0x25, 0x55, 0x95, 0x55, 0x6a, 0xa2, 0x2a, 0x88,
- 0x62, 0x27, 0x37, 0x38, 0x88, 0x87, 0x55, 0x59,
- 0x95, 0x58, 0x16, 0x88, 0x8a, 0x66, 0x63, 0x68,
- 0x86, 0x67, 0x66, 0x66, 0x68, 0x88, 0x12, 0x11,
- 0x88, 0x88, 0x72, 0x77, 0x78, 0x85, 0x58, 0x17,
- 0x23, 0x32, 0x55, 0x55, 0x81, 0x13, 0x73, 0x66,
- 0x62, 0x7a, 0xaa, 0x38, 0x88, 0x58, 0x27, 0x55,
- 0x58, 0x32, 0x38, 0x88, 0x81, 0x66, 0xa2, 0x88,
- 0x86, 0x61, 0x66, 0x61, 0x66, 0x68, 0x13, 0x11,
- 0x88, 0x88, 0x12, 0x22, 0x71, 0x85, 0x58, 0x62,
- 0x23, 0xa2, 0x68, 0x88, 0x81, 0x66, 0x88, 0x88,
- 0x63, 0x2a, 0xaa, 0x28, 0x88, 0x55, 0x86, 0x61,
- 0x66, 0x66, 0x68, 0x88, 0x66, 0x66, 0x77, 0x88,
- 0x68, 0x16, 0x66, 0x62, 0x66, 0x68, 0xa1, 0x61,
- 0x88, 0x88, 0x62, 0x22, 0x22, 0x85, 0x55, 0x83,
- 0x72, 0x37, 0xa8, 0x88, 0x61, 0x66, 0x85, 0x55,
- 0x86, 0x23, 0xaa, 0x71, 0x88, 0x85, 0x88, 0x66,
- 0x88, 0x86, 0x88, 0x88, 0x16, 0x61, 0x21, 0x88,
- 0x66, 0xa6, 0x86, 0x17, 0x66, 0x66, 0x31, 0x61,
- 0x88, 0x88, 0x87, 0x72, 0x22, 0x68, 0x55, 0x86,
- 0x77, 0x77, 0x36, 0x88, 0x13, 0x68, 0x85, 0x55,
- 0x58, 0x12, 0x73, 0x72, 0x76, 0x88, 0x88, 0x68,
- 0x88, 0x88, 0x88, 0x66, 0x36, 0x63, 0x26, 0x86,
- 0x86, 0x36, 0x86, 0x11, 0x66, 0x66, 0x76, 0x61,
- 0x88, 0x88, 0x81, 0x22, 0x22, 0x38, 0x85, 0x58,
- 0x37, 0x22, 0x21, 0x68, 0xa2, 0x31, 0x68, 0x55,
- 0x55, 0x81, 0x22, 0x22, 0xa8, 0x88, 0x88, 0x68,
- 0x86, 0x88, 0x68, 0x81, 0x36, 0x17, 0x21, 0x68,
- 0x86, 0x16, 0x66, 0x26, 0x66, 0x61, 0x36, 0x66,
- 0x68, 0x88, 0x86, 0x27, 0x22, 0x28, 0x88, 0x88,
- 0x17, 0x72, 0x2a, 0x66, 0xa2, 0x22, 0x36, 0x55,
- 0x55, 0x58, 0x37, 0x3a, 0x16, 0x66, 0x66, 0x66,
- 0x66, 0x18, 0x88, 0x67, 0x16, 0x12, 0x71, 0x68,
- 0x81, 0x68, 0x61, 0x76, 0x66, 0x6a, 0x16, 0x66,
- 0x88, 0x88, 0x86, 0x77, 0x22, 0x26, 0x88, 0x88,
- 0x13, 0x37, 0x71, 0x66, 0xa2, 0x33, 0x2a, 0x85,
- 0x55, 0x55, 0x17, 0x73, 0x16, 0x66, 0x66, 0x68,
- 0x63, 0x88, 0x88, 0xa2, 0x66, 0xa2, 0xa6, 0x88,
- 0x61, 0x68, 0x6a, 0x76, 0x66, 0x6a, 0x66, 0x6a
-};
+#ifdef INCLUDE_LINUX_LOGO_DATA
+
+#define INCLUDE_LINUX_LOGOBW
+#define INCLUDE_LINUX_LOGO16
+#include <linux/linux_logo.h>
#else
--- /dev/null
+/* $Id: newport.h,v 1.1 1998/08/19 21:58:12 ralf Exp $
+ *
+ * newport.h: Defines and register layout for NEWPORT graphics
+ * hardware.
+ *
+ * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ */
+
+#ifndef _SGI_NEWPORT_H
+#define _SGI_NEWPORT_H
+
+
+typedef volatile unsigned long npireg_t;
+
+union npfloat {
+ volatile float f;
+ npireg_t i;
+};
+
+typedef union npfloat npfreg_t;
+
+union np_dcb {
+ npireg_t all;
+ struct { volatile unsigned short s0, s1; } hwords;
+ struct { volatile unsigned char b0, b1, b2, b3; } bytes;
+};
+
+struct newport_rexregs {
+ npireg_t drawmode1; /* GL extra mode bits */
+
+#define DM1_PLANES 0x00000007
+#define DM1_NOPLANES 0x00000000
+#define DM1_RGBPLANES 0x00000001
+#define DM1_RGBAPLANES 0x00000002
+#define DM1_OLAYPLANES 0x00000004
+#define DM1_PUPPLANES 0x00000005
+#define DM1_CIDPLANES 0x00000006
+
+#define NPORT_DMODE1_DDMASK 0x00000018
+#define NPORT_DMODE1_DD4 0x00000000
+#define NPORT_DMODE1_DD8 0x00000008
+#define NPORT_DMODE1_DD12 0x00000010
+#define NPORT_DMODE1_DD24 0x00000018
+#define NPORT_DMODE1_DSRC 0x00000020
+#define NPORT_DMODE1_YFLIP 0x00000040
+#define NPORT_DMODE1_RWPCKD 0x00000080
+#define NPORT_DMODE1_HDMASK 0x00000300
+#define NPORT_DMODE1_HD4 0x00000000
+#define NPORT_DMODE1_HD8 0x00000100
+#define NPORT_DMODE1_HD12 0x00000200
+#define NPORT_DMODE1_HD32 0x00000300
+#define NPORT_DMODE1_RWDBL 0x00000400
+#define NPORT_DMODE1_ESWAP 0x00000800 /* Endian swap */
+#define NPORT_DMODE1_CCMASK 0x00007000
+#define NPORT_DMODE1_CCLT 0x00001000
+#define NPORT_DMODE1_CCEQ 0x00002000
+#define NPORT_DMODE1_CCGT 0x00004000
+#define NPORT_DMODE1_RGBMD 0x00008000
+#define NPORT_DMODE1_DENAB 0x00010000 /* Dither enable */
+#define NPORT_DMODE1_FCLR 0x00020000 /* Fast clear */
+#define NPORT_DMODE1_BENAB 0x00040000 /* Blend enable */
+#define NPORT_DMODE1_SFMASK 0x00380000
+#define NPORT_DMODE1_SF0 0x00000000
+#define NPORT_DMODE1_SF1 0x00080000
+#define NPORT_DMODE1_SFDC 0x00100000
+#define NPORT_DMODE1_SFMDC 0x00180000
+#define NPORT_DMODE1_SFSA 0x00200000
+#define NPORT_DMODE1_SFMSA 0x00280000
+#define NPORT_DMODE1_DFMASK 0x01c00000
+#define NPORT_DMODE1_DF0 0x00000000
+#define NPORT_DMODE1_DF1 0x00400000
+#define NPORT_DMODE1_DFSC 0x00800000
+#define NPORT_DMODE1_DFMSC 0x00c00000
+#define NPORT_DMODE1_DFSA 0x01000000
+#define NPORT_DMODE1_DFMSA 0x01400000
+#define NPORT_DMODE1_BBENAB 0x02000000 /* Back blend enable */
+#define NPORT_DMODE1_PFENAB 0x04000000 /* Pre-fetch enable */
+#define NPORT_DMODE1_ABLEND 0x08000000 /* Alpha blend */
+#define NPORT_DMODE1_LOMASK 0xf0000000
+#define NPORT_DMODE1_LOZERO 0x00000000
+#define NPORT_DMODE1_LOAND 0x10000000
+#define NPORT_DMODE1_LOANDR 0x20000000
+#define NPORT_DMODE1_LOSRC 0x30000000
+#define NPORT_DMODE1_LOANDI 0x40000000
+#define NPORT_DMODE1_LODST 0x50000000
+#define NPORT_DMODE1_LOXOR 0x60000000
+#define NPORT_DMODE1_LOOR 0x70000000
+#define NPORT_DMODE1_LONOR 0x80000000
+#define NPORT_DMODE1_LOXNOR 0x90000000
+#define NPORT_DMODE1_LONDST 0xa0000000
+#define NPORT_DMODE1_LOORR 0xb0000000
+#define NPORT_DMODE1_LONSRC 0xc0000000
+#define NPORT_DMODE1_LOORI 0xd0000000
+#define NPORT_DMODE1_LONAND 0xe0000000
+#define NPORT_DMODE1_LOONE 0xf0000000
+
+ npireg_t drawmode0; /* REX command register */
+
+ /* These bits define the graphics opcode being performed. */
+#define NPORT_DMODE0_OPMASK 0x00000003 /* Opcode mask */
+#define NPORT_DMODE0_NOP 0x00000000 /* No operation */
+#define NPORT_DMODE0_RD 0x00000001 /* Read operation */
+#define NPORT_DMODE0_DRAW 0x00000002 /* Draw operation */
+#define NPORT_DMODE0_S2S 0x00000003 /* Screen to screen operation */
+
+ /* The following decide what addressing mode(s) are to be used */
+#define NPORT_DMODE0_AMMASK 0x0000001c /* Address mode mask */
+#define NPORT_DMODE0_SPAN 0x00000000 /* Spanning address mode */
+#define NPORT_DMODE0_BLOCK 0x00000004 /* Block address mode */
+#define NPORT_DMODE0_ILINE 0x00000008 /* Iline address mode */
+#define NPORT_DMODE0_FLINE 0x0000000c /* Fline address mode */
+#define NPORT_DMODE0_ALINE 0x00000010 /* Aline address mode */
+#define NPORT_DMODE0_TLINE 0x00000014 /* Tline address mode */
+#define NPORT_DMODE0_BLINE 0x00000018 /* Bline address mode */
+
+ /* And now some misc. operation control bits. */
+#define NPORT_DMODE0_DOSETUP 0x00000020
+#define NPORT_DMODE0_CHOST 0x00000040
+#define NPORT_DMODE0_AHOST 0x00000080
+#define NPORT_DMODE0_STOPX 0x00000100
+#define NPORT_DMODE0_STOPY 0x00000200
+#define NPORT_DMODE0_SK1ST 0x00000400
+#define NPORT_DMODE0_SKLST 0x00000800
+#define NPORT_DMODE0_ZPENAB 0x00001000
+#define NPORT_DMODE0_LISPENAB 0x00002000
+#define NPORT_DMODE0_LISLST 0x00004000
+#define NPORT_DMODE0_L32 0x00008000
+#define NPORT_DMODE0_ZOPQ 0x00010000
+#define NPORT_DMODE0_LISOPQ 0x00020000
+#define NPORT_DMODE0_SHADE 0x00040000
+#define NPORT_DMODE0_LRONLY 0x00080000
+#define NPORT_DMODE0_XYOFF 0x00100000
+#define NPORT_DMODE0_CLAMP 0x00200000
+#define NPORT_DMODE0_ENDPF 0x00400000
+#define NPORT_DMODE0_YSTR 0x00800000
+
+ npireg_t lsmode; /* Mode for line stipple ops */
+ npireg_t lspattern; /* Pattern for line stipple ops */
+ npireg_t lspatsave; /* Backup save pattern */
+ npireg_t zpattern; /* Pixel zpattern */
+ npireg_t colorback; /* Background color */
+ npireg_t colorvram; /* Clear color for fast vram */
+ npireg_t alpharef; /* Reference value for afunctions */
+ unsigned long pad0;
+ npireg_t smask0x; /* Window GL relative screen mask 0 */
+ npireg_t smask0y; /* Window GL relative screen mask 0 */
+ npireg_t _setup;
+ npireg_t _stepz;
+ npireg_t _lsrestore;
+ npireg_t _lssave;
+
+ unsigned long _pad1[0x30];
+
+ /* Iterators, full state for context switch */
+ npfreg_t _xstart; /* X-start point (current) */
+ npfreg_t _ystart; /* Y-start point (current) */
+ npfreg_t _xend; /* x-end point */
+ npfreg_t _yend; /* y-end point */
+ npireg_t xsave; /* copy of xstart integer value for BLOCk addressing MODE */
+ npireg_t xymove; /* x.y offset from xstart, ystart for relative operations */
+ npfreg_t bresd;
+ npfreg_t bress1;;
+ npireg_t bresoctinc1;
+ volatile int bresrndinc2;
+ npireg_t brese1;
+ npireg_t bress2;
+ npireg_t aweight0;
+ npireg_t aweight1;
+ npfreg_t xstartf;
+ npfreg_t ystartf;
+ npfreg_t xendf;
+ npfreg_t yendf;
+ npireg_t xstarti;
+ npfreg_t xendf1;
+ npireg_t xystarti;
+ npireg_t xyendi;
+ npireg_t xstartendi;
+
+ unsigned long _unused2[0x29];
+
+ npfreg_t colorred;
+ npfreg_t coloralpha;
+ npfreg_t colorgrn;
+ npfreg_t colorblue;
+ npfreg_t slopered;
+ npfreg_t slopealpha;
+ npfreg_t slopegrn;
+ npfreg_t slopeblue;
+ npireg_t wrmask;
+ npireg_t colori;
+ npfreg_t colorx;
+ npfreg_t slopered1;
+ npireg_t hostrw0;
+ npireg_t hostrw1;
+ npireg_t dcbmode;
+#define NPORT_DMODE_WMASK 0x00000003
+#define NPORT_DMODE_W4 0x00000000
+#define NPORT_DMODE_W1 0x00000001
+#define NPORT_DMODE_W2 0x00000002
+#define NPORT_DMODE_W3 0x00000003
+#define NPORT_DMODE_EDPACK 0x00000004
+#define NPORT_DMODE_ECINC 0x00000008
+#define NPORT_DMODE_CMASK 0x00000070
+#define NPORT_DMODE_AMASK 0x00000780
+#define NPORT_DMODE_AVC2 0x00000000
+#define NPORT_DMODE_ACMALL 0x00000080
+#define NPORT_DMODE_ACM0 0x00000100
+#define NPORT_DMODE_ACM1 0x00000180
+#define NPORT_DMODE_AXMALL 0x00000200
+#define NPORT_DMODE_AXM0 0x00000280
+#define NPORT_DMODE_AXM1 0x00000300
+#define NPORT_DMODE_ABT 0x00000380
+#define NPORT_DMODE_AVCC1 0x00000400
+#define NPORT_DMODE_AVAB1 0x00000480
+#define NPORT_DMODE_ALG3V0 0x00000500
+#define NPORT_DMODE_A1562 0x00000580
+#define NPORT_DMODE_ESACK 0x00000800
+#define NPORT_DMODE_EASACK 0x00001000
+#define NPORT_DMODE_CWMASK 0x0003e000
+#define NPORT_DMODE_CHMASK 0x007c0000
+#define NPORT_DMODE_CSMASK 0x0f800000
+#define NPORT_DMODE_SENDIAN 0x10000000
+
+ unsigned long _unused3;
+
+ union np_dcb dcbdata0;
+ npireg_t dcbdata1;
+};
+
+struct newport_cregs {
+ npireg_t smask1x;
+ npireg_t smask1y;
+ npireg_t smask2x;
+ npireg_t smask2y;
+ npireg_t smask3x;
+ npireg_t smask3y;
+ npireg_t smask4x;
+ npireg_t smask4y;
+ npireg_t topscan;
+ npireg_t xywin;
+ npireg_t clipmode;
+#define NPORT_CMODE_SM0 0x00000001
+#define NPORT_CMODE_SM1 0x00000002
+#define NPORT_CMODE_SM2 0x00000004
+#define NPORT_CMODE_SM3 0x00000008
+#define NPORT_CMODE_SM4 0x00000010
+#define NPORT_CMODE_CMSK 0x00001e00
+
+ unsigned long _unused0;
+ unsigned long config;
+#define NPORT_CFG_G32MD 0x00000001
+#define NPORT_CFG_BWIDTH 0x00000002
+#define NPORT_CFG_ERCVR 0x00000004
+#define NPORT_CFG_BDMSK 0x00000078
+#define NPORT_CFG_GDMSK 0x00000f80
+#define NPORT_CFG_GD0 0x00000080
+#define NPORT_CFG_GD1 0x00000100
+#define NPORT_CFG_GD2 0x00000200
+#define NPORT_CFG_GD3 0x00000400
+#define NPORT_CFG_GD4 0x00000800
+#define NPORT_CFG_GFAINT 0x00001000
+#define NPORT_CFG_TOMSK 0x0000e000
+#define NPORT_CFG_VRMSK 0x00070000
+#define NPORT_CFG_FBTYP 0x00080000
+
+ npireg_t _unused1;
+ npireg_t stat;
+#define NPORT_STAT_VERS 0x00000007
+#define NPORT_STAT_GBUSY 0x00000008
+#define NPORT_STAT_BBUSY 0x00000010
+#define NPORT_STAT_VRINT 0x00000020
+#define NPORT_STAT_VIDINT 0x00000040
+#define NPORT_STAT_GLMSK 0x00001f80
+#define NPORT_STAT_BLMSK 0x0007e000
+#define NPORT_STAT_BFIRQ 0x00080000
+#define NPORT_STAT_GFIRQ 0x00100000
+
+ npireg_t ustat;
+ npireg_t dreset;
+};
+
+struct newport_regs {
+ struct newport_rexregs set;
+ unsigned long _unused0[0x16e];
+ struct newport_rexregs go;
+ unsigned long _unused1[0x22e];
+ struct newport_cregs cset;
+ unsigned long _unused2[0x1ef];
+ struct newport_cregs cgo;
+};
+extern struct newport_regs *npregs;
+
+
+typedef struct {
+ unsigned int drawmode1;
+ unsigned int drawmode0;
+ unsigned int lsmode;
+ unsigned int lspattern;
+ unsigned int lspatsave;
+ unsigned int zpattern;
+ unsigned int colorback;
+ unsigned int colorvram;
+ unsigned int alpharef;
+ unsigned int smask0x;
+ unsigned int smask0y;
+ unsigned int _xstart;
+ unsigned int _ystart;
+ unsigned int _xend;
+ unsigned int _yend;
+ unsigned int xsave;
+ unsigned int xymove;
+ unsigned int bresd;
+ unsigned int bress1;
+ unsigned int bresoctinc1;
+ unsigned int bresrndinc2;
+ unsigned int brese1;
+ unsigned int bress2;
+
+ unsigned int aweight0;
+ unsigned int aweight1;
+ unsigned int colorred;
+ unsigned int coloralpha;
+ unsigned int colorgrn;
+ unsigned int colorblue;
+ unsigned int slopered;
+ unsigned int slopealpha;
+ unsigned int slopegrn;
+ unsigned int slopeblue;
+ unsigned int wrmask;
+ unsigned int hostrw0;
+ unsigned int hostrw1;
+
+ /* configregs */
+
+ unsigned int smask1x;
+ unsigned int smask1y;
+ unsigned int smask2x;
+ unsigned int smask2y;
+ unsigned int smask3x;
+ unsigned int smask3y;
+ unsigned int smask4x;
+ unsigned int smask4y;
+ unsigned int topscan;
+ unsigned int xywin;
+ unsigned int clipmode;
+ unsigned int config;
+
+ /* dcb registers */
+ unsigned int dcbmode;
+ unsigned int dcbdata0;
+ unsigned int dcbdata1;
+} newport_ctx;
+
+/* Reading/writing VC2 registers. */
+#define VC2_REGADDR_INDEX 0x00000000
+#define VC2_REGADDR_IREG 0x00000010
+#define VC2_REGADDR_RAM 0x00000030
+#define VC2_PROTOCOL (NPORT_DMODE_EASACK | 0x00800000 | 0x00040000)
+
+#define VC2_VLINET_ADDR 0x000
+#define VC2_VFRAMET_ADDR 0x400
+#define VC2_CGLYPH_ADDR 0x500
+
+/* Now the Indexed registers of the VC2. */
+#define VC2_IREG_VENTRY 0x00
+#define VC2_IREG_CENTRY 0x01
+#define VC2_IREG_CURSX 0x02
+#define VC2_IREG_CURSY 0x03
+#define VC2_IREG_CCURSX 0x04
+#define VC2_IREG_DENTRY 0x05
+#define VC2_IREG_SLEN 0x06
+#define VC2_IREG_RADDR 0x07
+#define VC2_IREG_VFPTR 0x08
+#define VC2_IREG_VLSPTR 0x09
+#define VC2_IREG_VLIR 0x0a
+#define VC2_IREG_VLCTR 0x0b
+#define VC2_IREG_CTPTR 0x0c
+#define VC2_IREG_WCURSY 0x0d
+#define VC2_IREG_DFPTR 0x0e
+#define VC2_IREG_DLTPTR 0x0f
+#define VC2_IREG_CONTROL 0x10
+#define VC2_IREG_CONFIG 0x20
+
+extern inline void newport_vc2_set(struct newport_regs *regs, unsigned char vc2ireg,
+ unsigned short val)
+{
+ regs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_INDEX | NPORT_DMODE_W3 |
+ NPORT_DMODE_ECINC | VC2_PROTOCOL);
+ regs->set.dcbdata0.all = (vc2ireg << 24) | (val << 8);
+}
+
+extern inline unsigned short newport_vc2_get(struct newport_regs *regs,
+ unsigned char vc2ireg)
+{
+ regs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_INDEX | NPORT_DMODE_W1 |
+ NPORT_DMODE_ECINC | VC2_PROTOCOL);
+ regs->set.dcbdata0.bytes.b3 = vc2ireg;
+ regs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_IREG | NPORT_DMODE_W2 |
+ NPORT_DMODE_ECINC | VC2_PROTOCOL);
+ return regs->set.dcbdata0.hwords.s1;
+}
+
+/* VC2 Control register bits */
+#define VC2_CTRL_EVIRQ 0x0001
+#define VC2_CTRL_EDISP 0x0002
+#define VC2_CTRL_EVIDEO 0x0004
+#define VC2_CTRL_EDIDS 0x0008
+#define VC2_CTRL_ECURS 0x0010
+#define VC2_CTRL_EGSYNC 0x0020
+#define VC2_CTRL_EILACE 0x0040
+#define VC2_CTRL_ECDISP 0x0080
+#define VC2_CTRL_ECCURS 0x0100
+#define VC2_CTRL_ECG64 0x0200
+#define VC2_CTRL_GLSEL 0x0400
+
+/* Controlling the color map on NEWPORT. */
+#define NCMAP_REGADDR_AREG 0x00000000
+#define NCMAP_REGADDR_ALO 0x00000000
+#define NCMAP_REGADDR_AHI 0x00000010
+#define NCMAP_REGADDR_PBUF 0x00000020
+#define NCMAP_REGADDR_CREG 0x00000030
+#define NCMAP_REGADDR_SREG 0x00000040
+#define NCMAP_REGADDR_RREG 0x00000060
+#define NCMAP_PROTOCOL (0x00008000 | 0x00040000 | 0x00800000)
+
+static inline void newport_cmap_setaddr(struct newport_regs *regs,
+ unsigned short addr)
+{
+ regs->set.dcbmode = (NPORT_DMODE_ACMALL | NCMAP_PROTOCOL |
+ NPORT_DMODE_SENDIAN | NPORT_DMODE_ECINC |
+ NCMAP_REGADDR_AREG | NPORT_DMODE_W2);
+ regs->set.dcbdata0.hwords.s1 = addr;
+ regs->set.dcbmode = (NPORT_DMODE_ACMALL | NCMAP_PROTOCOL |
+ NCMAP_REGADDR_PBUF | NPORT_DMODE_W3);
+}
+
+static inline void newport_cmap_setrgb(struct newport_regs *regs,
+ unsigned char red,
+ unsigned char green,
+ unsigned char blue)
+{
+ regs->set.dcbdata0.all =
+ (red << 24) |
+ (green << 16) |
+ (blue << 8);
+}
+
+/* Miscellaneous NEWPORT routines. */
+#define BUSY_TIMEOUT 100000
+static inline int newport_wait(void)
+{
+ int i = 0;
+
+ while(i < BUSY_TIMEOUT)
+ if(!(npregs->cset.stat & NPORT_STAT_GBUSY))
+ break;
+ if(i == BUSY_TIMEOUT)
+ return 1;
+ return 0;
+}
+
+static inline int newport_bfwait(void)
+{
+ int i = 0;
+
+ while(i < BUSY_TIMEOUT)
+ if(!(npregs->cset.stat & NPORT_STAT_BBUSY))
+ break;
+ if(i == BUSY_TIMEOUT)
+ return 1;
+ return 0;
+}
+
+/* newport.c and cons_newport.c routines */
+extern struct graphics_ops *newport_probe (int, const char **);
+
+void newport_save (void *);
+void newport_restore (void *);
+void newport_reset (void);
+int newport_ioctl (int card, int cmd, unsigned long arg);
+
+/*
+ * DCBMODE register defines:
+ */
+
+/* Widht of the data being transfered for each DCBDATA[01] word */
+#define DCB_DATAWIDTH_4 0x0
+#define DCB_DATAWIDTH_1 0x1
+#define DCB_DATAWIDTH_2 0x2
+#define DCB_DATAWIDTH_3 0x3
+
+/* If set, all of DCBDATA will be moved, otherwise only DATAWIDTH bytes */
+#define DCB_ENDATAPACK (1 << 2)
+
+/* Enables DCBCRS auto increment after each DCB transfer */
+#define DCB_ENCRSINC (1 << 3)
+
+/* shift for accessing the control register select address (DBCCRS, 3 bits) */
+#define DCB_CRS_SHIFT 4
+
+/* DCBADDR (4 bits): display bus slave address */
+#define DCB_ADDR_SHIFT 7
+#define DCB_VC2 (0 << DCB_ADDR_SHIFT)
+#define DCB_CMAP_ALL (1 << DCB_ADDR_SHIFT)
+#define DCB_CMAP0 (2 << DCB_ADDR_SHIFT)
+#define DCB_CMAP1 (3 << DCB_ADDR_SHIFT)
+#define DCB_XMAP_ALL (4 << DCB_ADDR_SHIFT)
+#define DCB_XMAP0 (5 << DCB_ADDR_SHIFT)
+#define DCB_XMAP1 (6 << DCB_ADDR_SHIFT)
+#define DCB_BT445 (7 << DCB_ADDR_SHIFT)
+#define DCB_VCC1 (8 << DCB_ADDR_SHIFT)
+#define DCB_VAB1 (9 << DCB_ADDR_SHIFT)
+#define DCB_LG3_BDVERS0 (10 << DCB_ADDR_SHIFT)
+#define DCB_LG3_ICS1562 (11 << DCB_ADDR_SHIFT)
+#define DCB_RESERVED (15 << DCB_ADDR_SHIFT)
+
+/* DCB protocol ack types */
+#define DCB_ENSYNCACK (1 << 11)
+#define DCB_ENASYNCACK (1 << 12)
+
+#define DCB_CSWIDTH_SHIFT 13
+#define DCB_CSHOLD_SHIFT 18
+#define DCB_CSSETUP_SHIFT 23
+
+/* XMAP9 specific defines */
+/* XMAP9 -- registers as seen on the DCBMODE register*/
+# define XM9_CRS_CONFIG (0 << DCB_CRS_SHIFT)
+# define XM9_PUPMODE (1 << 0)
+# define XM9_ODD_PIXEL (1 << 1)
+# define XM9_8_BITPLANES (1 << 2)
+# define XM9_SLOW_DCB (1 << 3)
+# define XM9_VIDEO_RGBMAP_MASK (3 << 4)
+# define XM9_EXPRESS_VIDEO (1 << 6)
+# define XM9_VIDEO_OPTION (1 << 7)
+# define XM9_CRS_REVISION (1 << DCB_CRS_SHIFT)
+# define XM9_CRS_FIFO_AVAIL (2 << DCB_CRS_SHIFT)
+# define XM9_FIFO_0_AVAIL 0
+# define XM9_FIFO_1_AVAIL 1
+# define XM9_FIFO_2_AVAIL 3
+# define XM9_FIFO_3_AVAIL 2
+# define XM9_FIFO_FULL XM9_FIFO_0_AVAIL
+# define XM9_FIFO_EMPTY XM9_FIFO_3_AVAIL
+# define XM9_CRS_CURS_CMAP_MSB (3 << DCB_CRS_SHIFT)
+# define XM9_CRS_PUP_CMAP_MSB (4 << DCB_CRS_SHIFT)
+# define XM9_CRS_MODE_REG_DATA (5 << DCB_CRS_SHIFT)
+# define XM9_CRS_MODE_REG_INDEX (7 << DCB_CRS_SHIFT)
+
+
+#define DCB_CYCLES(setup,hold,width) \
+ ((hold << DCB_CSHOLD_SHIFT) | \
+ (setup << DCB_CSSETUP_SHIFT)| \
+ (width << DCB_CSWIDTH_SHIFT))
+
+#define W_DCB_XMAP9_PROTOCOL DCB_CYCLES (2, 1, 0)
+#define WSLOW_DCB_XMAP9_PROTOCOL DCB_CYCLES (5, 5, 0)
+#define WAYSLOW_DCB_XMAP9_PROTOCOL DCB_CYCLES (12, 12, 0)
+#define R_DCB_XMAP9_PROTOCOL DCB_CYCLES (2, 1, 3)
+
+static inline void
+xmap9FIFOWait (struct newport_regs *rex)
+{
+ rex->set.dcbmode = DCB_XMAP0 | XM9_CRS_FIFO_AVAIL |
+ DCB_DATAWIDTH_1 | R_DCB_XMAP9_PROTOCOL;
+ newport_bfwait ();
+
+ while ((rex->set.dcbdata0.bytes.b3 & 3) != XM9_FIFO_EMPTY)
+ ;
+}
+
+static inline void
+xmap9SetModeReg (struct newport_regs *rex, unsigned int modereg, unsigned int data24, int cfreq)
+{
+ if (cfreq > 119)
+ rex->set.dcbmode = DCB_XMAP_ALL | XM9_CRS_MODE_REG_DATA |
+ DCB_DATAWIDTH_4 | W_DCB_XMAP9_PROTOCOL;
+ else if (cfreq > 59)
+ rex->set.dcbmode = DCB_XMAP_ALL | XM9_CRS_MODE_REG_DATA |
+ DCB_DATAWIDTH_4 | WSLOW_DCB_XMAP9_PROTOCOL;
+ else
+ rex->set.dcbmode = DCB_XMAP_ALL | XM9_CRS_MODE_REG_DATA |
+ DCB_DATAWIDTH_4 | WAYSLOW_DCB_XMAP9_PROTOCOL;
+ rex->set.dcbdata0.all = ((modereg) << 24) | (data24 & 0xffffff);
+}
+
+#endif /* !(_SGI_NEWPORT_H) */
+
char res4[5];
} smc_t;
+/* MPC860T Fast Ethernet Controller. It isn't part of the CPM, but
+ * it fits within the address space.
+ */
+typedef struct fec {
+ uint fec_addr_low; /* LS 32 bits of station address */
+ ushort fec_addr_high; /* MS 16 bits of address */
+ ushort res1;
+ uint fec_hash_table_high;
+ uint fec_hash_table_low;
+ uint fec_r_des_start;
+ uint fec_x_des_start;
+ uint fec_r_buff_size;
+ uint res2[9];
+ uint fec_ecntrl;
+ uint fec_ievent;
+ uint fec_imask;
+ uint fec_ivec;
+ uint fec_r_des_active;
+ uint fec_x_des_active;
+ uint res3[10];
+ uint fec_mii_data;
+ uint fec_mii_speed;
+ uint res4[17];
+ uint fec_r_bound;
+ uint fec_r_fstart;
+ uint res5[6];
+ uint fec_x_fstart;
+ uint res6[17];
+ uint fec_fun_code;
+ uint res7[3];
+ uint fec_r_cntrl;
+ uint fec_r_hash;
+ uint res8[14];
+ uint fec_x_cntrl;
+ uint res9[0x1e];
+} fec_t;
+
typedef struct comm_proc {
/* General control and status registers.
*/
uint cp_sirp;
char res16[0x10c];
u_char cp_siram[0x200];
- char res17[0x200];
+
+ /* The fast ethernet controller is not really part of the CPM,
+ * but it resides in the address space.
+ */
+ fec_t cp_fec;
char res18[0x1000];
/* Dual Ported RAM follows.
extern int (*adb_send_request)(struct adb_request *req, int sync);
extern int (*adb_autopoll)(int on);
+extern int (*adb_reset_bus)(void);
/* Values for adb_request flags */
#define ADBREQ_REPLY 1 /* expect reply */
--- /dev/null
+#include "../asm-m68k/amigayle.h"
--- /dev/null
+#include "../asm-m68k/amipcmcia.h"
/*
- * $Id: bitops.h,v 1.9 1998/07/26 03:05:28 davem Exp $
+ * $Id: bitops.h,v 1.10 1998/08/16 21:56:53 geert Exp $
* bitops.h: Bit string operations on the ppc
*/
-#ifndef _ASM_PPC_BITOPS_H_
-#define _ASM_PPC_BITOPS_H_
+#ifndef _PPC_BITOPS_H
+#define _PPC_BITOPS_H
#include <asm/system.h>
#include <asm/byteorder.h>
#define minix_test_bit(nr,addr) ext2_test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size)
-#endif /* _ASM_PPC_BITOPS_H */
+#endif /* _PPC_BITOPS_H */
--- /dev/null
+/*
+ * This file describes the structure passed from the BootX application
+ * (for MacOS) when it is used to boot Linux.
+ *
+ * Written by Benjamin Herrenschmidt.
+ */
+
+
+#ifndef __ASM_BOOTX_H__
+#define __ASM_BOOTX_H__
+
+#ifdef macintosh
+#include <Types.h>
+#endif
+
+#ifdef macintosh
+/* All this requires PowerPC alignment */
+#pragma options align=power
+#endif
+
+#define BOOT_INFO_VERSION 1
+#define BOOT_INFO_COMPATIBLE_VERSION 1
+
+/* Here are the boot informations that are passed to the bootstrap
+ * Note that the kernel arguments and the device tree are appended
+ * at the end of this structure. */
+typedef struct boot_infos
+{
+ /* Version of this structure */
+ unsigned long version;
+ /* backward compatible down to version: */
+ unsigned long compatible_version;
+
+ /* Set to 0 by current BootX */
+ unsigned long unused[3];
+
+ /* The device tree (internal addresses relative to the beginning of the tree,
+ * device tree offset relative to the beginning of this structure). */
+ unsigned long deviceTreeOffset; /* Device tree offset */
+ unsigned long deviceTreeSize; /* Size of the device tree */
+
+ /* Some infos about the current MacOS display */
+ unsigned long dispDeviceRect[4]; /* left,top,right,bottom */
+ unsigned long dispDeviceDepth; /* (8, 16 or 32) */
+ unsigned char* dispDeviceBase; /* base address (physical) */
+ unsigned long dispDeviceRowBytes; /* rowbytes (in bytes) */
+ unsigned long dispDeviceColorsOffset; /* Colormap (8 bits only) or 0 (*) */
+ /* Optional offset in the registry to the current
+ * MacOS display. (Can be 0 when not detected) */
+ unsigned long dispDeviceRegEntryOffset;
+
+ /* Optional pointer to boot ramdisk (offset from this structure) */
+ unsigned long ramDisk;
+ unsigned long ramDiskSize; /* size of ramdisk image */
+
+ /* Kernel command line arguments (offset from this structure) */
+ unsigned long kernelParamsOffset;
+
+} boot_infos_t;
+
+/* (*) The format of the colormap is 256 * 3 * 2 bytes. Each color index is represented
+ * by 3 short words containing a 16 bits (unsigned) color component.
+ * Later versions may contain the gamma table for direct-color devices here.
+ */
+#define BOOTX_COLORTABLE_SIZE (256UL*3UL*2UL);
+
+#ifdef macintosh
+#pragma options align=reset
+#endif
+
+#endif
#define _PPC_BYTEORDER_H
/*
- * $Id: byteorder.h,v 1.13 1998/08/03 19:05:11 geert Exp $
+ * $Id: byteorder.h,v 1.14 1998/08/12 05:07:12 paulus Exp $
*/
#include <asm/types.h>
{
unsigned val;
- __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (addr));
+ __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr));
return val;
}
{
unsigned val;
- __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (addr));
+ __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr));
return val;
}
#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
#define L1_CACHE_PAGES 8
-#ifndef __ASSEMBLY__
+#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
static inline unsigned long unlock_dcache(void)
{
#ifndef CONFIG_8xx
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
-#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
+#define ELF_ET_DYN_BASE (0x08000000)
typedef unsigned long elf_greg_t;
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
--- /dev/null
+
+/*
+ * A collection of structures, addresses, and values associated with
+ * the Motorola 860T FADS board. Copied from the MBX stuff.
+ *
+ * Copyright (c) 1998 Dan Malek (dmalek@jlc.net)
+ */
+#ifndef __MACH_FADS_DEFS
+#define __MACH_FADS_DEFS
+
+/* A Board Information structure that is given to a program when
+ * prom starts it up.
+ */
+typedef struct bd_info {
+ unsigned int bi_memstart; /* Memory start address */
+ unsigned int bi_memsize; /* Memory (end) size in bytes */
+ unsigned int bi_intfreq; /* Internal Freq, in Hz */
+ unsigned int bi_busfreq; /* Bus Freq, in Hz */
+} bd_t;
+
+extern bd_t m8xx_board_info;
+
+/* Memory map is configured by the PROM startup.
+ * I tried to follow the FADS manual, although the startup PROM
+ * dictates this.
+ */
+#define BCSR_ADDR ((uint)0x02100000)
+#define BCSR_SIZE ((uint)(64 * 1024))
+#define BCSR0 ((uint)0x02100000)
+#define BCSR1 ((uint)0x02100004)
+#define BCSR2 ((uint)0x02100008)
+#define BCSR3 ((uint)0x0210000c)
+#define BCSR4 ((uint)0x02100010)
+#define IMAP_ADDR ((uint)0x02200000)
+#define IMAP_SIZE ((uint)(64 * 1024))
+#define PCMCIA_MEM_ADDR ((uint)0x04000000)
+#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
+
+#endif
#define __ASM_HARDIRQ_H
extern unsigned int local_irq_count[NR_CPUS];
-#define in_interrupt() (local_irq_count[smp_processor_id()] != 0)
+
+/*
+ * Are we in an interrupt context? Either doing bottom half
+ * or hardware interrupt processing?
+ */
+#define in_interrupt() ({ int __cpu = smp_processor_id(); \
+ (local_irq_count[__cpu] + local_bh_count[__cpu] != 0); })
#ifndef __SMP__
#else /* __SMP__ */
+#include <asm/atomic.h>
+
extern unsigned char global_irq_holder;
-extern spinlock_t global_irq_lock;
+extern unsigned volatile int global_irq_lock;
extern atomic_t global_irq_count;
-#define release_irqlock(cpu) \
-do { \
- if(global_irq_holder == (unsigned char) cpu) { \
- global_irq_holder = NO_PROC_ID; \
- spin_unlock(&global_irq_lock); \
- } \
-} while(0)
-
-/* Ordering of the counter bumps is _deadly_ important. */
-#define hardirq_enter(cpu) \
- do { ++local_irq_count[cpu]; atomic_inc(&global_irq_count); } while(0)
-
-#define hardirq_exit(cpu) \
- do { atomic_dec(&global_irq_count); --local_irq_count[cpu]; } while(0)
-
-#define hardirq_trylock(cpu) \
-({ unsigned long flags; int ret = 1; \
- __save_flags(flags); \
- __cli(); \
- if(atomic_add_return(1, &global_irq_count) != 1 || \
- *(((unsigned char *)(&global_irq_lock)))) { \
- atomic_dec(&global_irq_count); \
- __restore_flags(flags); \
- ret = 0; \
- } else { \
- ++local_irq_count[cpu]; \
- __sti(); \
- } \
- ret; \
-})
-
-#define hardirq_endlock(cpu) do { __cli(); hardirq_exit(cpu); __sti(); } while(0)
+static inline void release_irqlock(int cpu)
+{
+ /* if we didn't own the irq lock, just ignore.. */
+ if (global_irq_holder == (unsigned char) cpu) {
+ global_irq_holder = NO_PROC_ID;
+ clear_bit(0,&global_irq_lock);
+ }
+}
+
+static inline void hardirq_enter(int cpu)
+{
+ ++local_irq_count[cpu];
+ atomic_inc(&global_irq_count);
+}
+
+static inline void hardirq_exit(int cpu)
+{
+ atomic_dec(&global_irq_count);
+ --local_irq_count[cpu];
+}
+
+static inline int hardirq_trylock(int cpu)
+{
+ return !atomic_read(&global_irq_count) && !test_bit(0,&global_irq_lock);
+}
+
+#define hardirq_endlock(cpu) do { } while (0)
extern void synchronize_irq(void);
+
#endif /* __SMP__ */
#endif /* __ASM_HARDIRQ_H */
#include <linux/config.h>
#ifdef CONFIG_APUS
#include <linux/hdreg.h>
+
+#define ide_init_hwif_ports m68k_ide_init_hwif_ports
#include <asm-m68k/ide.h>
+#undef ide_init_hwif_ports
+#undef insw
+
void ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base, int *irq);
void ide_insw(ide_ioreg_t port, void *buf, int ns);
void ide_outsw(ide_ioreg_t port, void *buf, int ns);
-#undef insw
#define insw(port, buf, ns) do { \
if ( _machine != _MACH_Pmac && _machine != _MACH_apus ) \
/* this must be the same as insw in io.h!! */ \
#define PMAC_ISA_MEM_BASE 0
#define PMAC_PCI_DRAM_OFFSET 0
-#define APUS_ISA_IO_BASE 0
-#define APUS_ISA_MEM_BASE 0
-#define APUS_PCI_DRAM_OFFSET 0
#define CHRP_ISA_IO_BASE 0xf8000000
#define CHRP_ISA_MEM_BASE 0xf7000000
#define CHRP_PCI_DRAM_OFFSET 0
#define _ISA_MEM_BASE 0
#define PCI_DRAM_OFFSET 0x80000000
#else /* CONFIG_MBX8xx */
+#ifdef CONFIG_APUS
+#define _IO_BASE 0
+#define _ISA_MEM_BASE 0
+#define PCI_DRAM_OFFSET 0
+#else
extern unsigned long isa_io_base;
extern unsigned long isa_mem_base;
extern unsigned long pci_dram_offset;
#define _IO_BASE isa_io_base
#define _ISA_MEM_BASE isa_mem_base
#define PCI_DRAM_OFFSET pci_dram_offset
+#endif /* CONFIG_APUS */
#endif /* CONFIG_MBX8xx */
#define readb(addr) (*(volatile unsigned char *) (addr))
__asm__ __volatile__ ("eieio" : : : "memory" );
}
+
+/*
+ * the constraint handling of gcc-2.7 is broken, fall back to
+ * the old optimizer unfriendly eieio()
+ */
+
+#if defined(__GNUC__) && __GNUC__ == 2 && __GNUC_MINOR__ <= 7
+#define __memory_clobber_pre \
+ do { } while(0)
+#define __memory_clobber_post \
+ eieio()
+#else
+#define __memory_clobber_pre \
+ __asm__ __volatile__ (" \t#%0,%1" : "=m" (*addr) : "0" (*addr) )
+#define __memory_clobber_post \
+ __asm__ __volatile__ ("eieio \t#%0,%1" : "=m" (*addr) : "0" (*addr) )
+#endif
+
/*
* 8, 16 and 32 bit, big and little endian I/O operations, with barrier.
*/
{
int ret;
- __asm__ __volatile__ ("" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_pre;
ret = *addr;
- __asm__ __volatile__ ("eieio" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_post;
return ret;
}
extern inline void out_8(volatile unsigned char *addr, int val)
{
- __asm__ __volatile__ ("" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_pre;
*addr = val;
- __asm__ __volatile__ ("eieio" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_post;
}
extern inline int in_le16(volatile unsigned short *addr)
{
int ret;
- __asm__ __volatile__ ("" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_pre;
ret = ld_le16(addr);
- __asm__ __volatile__ ("eieio" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_post;
return ret;
}
{
int ret;
- __asm__ __volatile__ ("" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_pre;
ret = *addr;
- __asm__ __volatile__ ("eieio" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_post;
return ret;
}
extern inline void out_le16(volatile unsigned short *addr, int val)
{
- __asm__ __volatile__ ("" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_pre;
st_le16(addr, val);
- __asm__ __volatile__ ("eieio" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_post;
}
extern inline void out_be16(volatile unsigned short *addr, int val)
{
- __asm__ __volatile__ ("" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_pre;
*addr = val;
- __asm__ __volatile__ ("eieio" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_post;
}
extern inline unsigned in_le32(volatile unsigned *addr)
{
unsigned ret;
- __asm__ __volatile__ ("" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_pre;
ret = ld_le32(addr);
- __asm__ __volatile__ ("eieio" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_post;
return ret;
}
{
int ret;
- __asm__ __volatile__ ("" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_pre;
ret = *addr;
- __asm__ __volatile__ ("eieio" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_post;
return ret;
}
extern inline void out_le32(volatile unsigned *addr, int val)
{
- __asm__ __volatile__ ("" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_pre;
st_le32(addr, val);
- __asm__ __volatile__ ("eieio" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_post;
}
extern inline void out_be32(volatile unsigned *addr, int val)
{
- __asm__ __volatile__ ("" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_pre;
*addr = val;
- __asm__ __volatile__ ("eieio" : "=m" (*addr) : "0" (*addr) );
+ __memory_clobber_post;
}
#endif
#ifndef CONFIG_8xx
#ifdef CONFIG_APUS
+#define enable_irq m68k_enable_irq
+#define disable_irq m68k_disable_irq
#include <asm-m68k/irq.h>
+#undef enable_irq
+#undef disable_irq
#else /* CONFIG_APUS */
/*
* My personal preference is CPM at level 2, which puts it above the
* MBX PCI/ISA/IDE interrupts.
*/
-#define PIT_INTERRUPT SIU_LEVEL0
-#define CPM_INTERRUPT SIU_LEVEL2
-#define DEC_INTERRUPT SIU_LEVEL7
+#define PIT_INTERRUPT SIU_LEVEL0
+#define CPM_INTERRUPT SIU_LEVEL2
+#define PCMCIA_INTERRUPT SIU_LEVEL6
+#define DEC_INTERRUPT SIU_LEVEL7
/* Some internal interrupt registers use an 8-bit mask for the interrupt
* level instead of a number.
#define STOP_ABRT_INT SIU_IRQ7 /* Stop/Abort header pin */
#endif /* CONFIG_MBX */
+#ifdef CONFIG_FADS
+#define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */
+#endif
+
/* always the same on MBX -- Cort */
static __inline__ int irq_cannonicalize(int irq)
{
* (i.e. linux_logo_{red,green,blue}[0] is color 0x20)
*/
+#include <linux/config.h>
+#ifdef CONFIG_APUS
+#include <asm-m68k/linux_logo.h>
+
+#undef linux_logo_banner
+#define linux_logo_banner "Linux/PPC version " UTS_RELEASE
+
+#else
+
#include <linux/init.h>
#define linux_logo_banner "Linux/PPC version " UTS_RELEASE
extern unsigned char linux_logo16[];
#endif
+#endif /* CONFIG_APUS */
#define NVRAM_SIZE ((uint)(1 * 1024 * 1024))
#define MBX_CSR_ADDR ((uint)0xfa100000)
#define MBX_CSR_SIZE ((uint)(1 * 1024 * 1024))
-#define MBX_IMAP_ADDR ((uint)0xfa200000)
-#define MBX_IMAP_SIZE ((uint)(64 * 1024))
+#define IMAP_ADDR ((uint)0xfa200000)
+#define IMAP_SIZE ((uint)(64 * 1024))
#define PCI_CSR_ADDR ((uint)0xfa210000)
#define PCI_CSR_SIZE ((uint)(64 * 1024))
#endif
/*
* We're finished using the context for an address space.
*/
-#define destroy_context(mm) ((mm)->context = NO_CONTEXT)
+#define destroy_context(mm) do { } while (0)
/*
* After we have set current->mm to a new value, this activates
extern unsigned long kernel_map(unsigned long paddr, unsigned long size,
int nocacheflag, unsigned long *memavailp );
+/*
+ * Set cache mode of (kernel space) address range.
+ */
+extern void kernel_set_cachemode (unsigned long address, unsigned long size,
+ unsigned int cmode);
/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
#define PageSkip(page) (0)
#define MSR_LE (1<<0) /* Little-Endian enable */
#ifdef CONFIG_APUS
-#define MSR_ MSR_ME|MSR_FE0|MSR_FE1|MSR_IP|MSR_RI
+#define MSR_ MSR_ME|MSR_IP|MSR_RI
#else
-#define MSR_ MSR_ME|MSR_FE0|MSR_FE1|MSR_RI
+#define MSR_ MSR_ME|MSR_RI
#endif
#define MSR_KERNEL MSR_|MSR_IR|MSR_DR
#define MSR_USER MSR_KERNEL|MSR_PR|MSR_EE
#define _MACH_chrp 4 /* chrp machine */
#define _MACH_mbx 8 /* Motorola MBX board */
#define _MACH_apus 16 /* amiga with phase5 powerup */
+#define _MACH_fads 32 /* Motorola FADS board */
/* see residual.h for these */
#define _PREP_Motorola 0x01 /* motorola prep */
#define have_of (0)
#endif /* CONFIG_MBX */
+#ifdef CONFIG_FADS
+#define _machine (_MACH_fads)
+#define is_prep (0)
+#define is_chrp (0)
+#define have_of (0)
+#endif /* CONFIG_FADS */
+
#ifdef CONFIG_APUS
#define _machine (_MACH_apus)
#define is_prep (0)
typedef void *phandle;
typedef void *ihandle;
-#ifndef FB_MAX
-#define FB_MAX 8 /* I don't want to include the whole console stuff */
-#endif
-extern char *prom_display_paths[FB_MAX];
+extern char *prom_display_paths[];
extern unsigned int prom_num_displays;
struct address_range {
typedef void (*prom_entry)(struct prom_args *);
/* Prototypes */
-void abort(void);
-void prom_init(int, int, prom_entry);
-void finish_device_tree(void);
-struct device_node *find_devices(const char *name);
-struct device_node *find_type_devices(const char *type);
-struct device_node *find_path_device(const char *path);
-struct device_node *find_compatible_devices(const char *type,
- const char *compat);
-struct device_node *find_phandle(phandle);
-unsigned char *get_property(struct device_node *node, const char *name,
- int *lenp);
-void print_properties(struct device_node *node);
-int call_rtas(const char *service, int nargs, int nret,
- unsigned long *outputs, ...);
+extern void abort(void);
+extern void prom_init(int, int, prom_entry);
+extern void prom_print(const char *msg);
+extern void finish_device_tree(void);
+extern struct device_node *find_devices(const char *name);
+extern struct device_node *find_type_devices(const char *type);
+extern struct device_node *find_path_device(const char *path);
+extern struct device_node *find_compatible_devices(const char *type,
+ const char *compat);
+extern struct device_node *find_phandle(phandle);
+extern unsigned char *get_property(struct device_node *node, const char *name,
+ int *lenp);
+extern void print_properties(struct device_node *node);
+extern int call_rtas(const char *service, int nargs, int nret,
+ unsigned long *outputs, ...);
#ifndef __ASSEMBLY__
extern unsigned long cpu_present_map;
+extern int first_cpu_booted;
/* per processor PPC parameters we need. */
struct cpuinfo_PPC {
#endif /* __ASSEMBLY__ */
#else /* !(__SMP__) */
-#ifndef __ASSEMBLY__
-extern __inline__ int cpu_logical_map(int cpu)
-{
- return cpu;
-}
-#endif
+
#endif /* !(__SMP__) */
#define NO_PROC_ID 0xFF /* No processor magic marker */
-/*
- * Software interrupts..
- */
-
#ifndef __ASM_SOFTIRQ_H
#define __ASM_SOFTIRQ_H
#include <asm/atomic.h>
#include <asm/hardirq.h>
-/*
- * The locking mechanism for base handlers, to prevent re-entrancy,
- * is entirely private to an implementation, it should not be
- * referenced at all outside of this file.
- */
-#define get_active_bhs() (bh_mask & bh_active)
-
-#ifndef __SMP__
-
-extern int __ppc_bh_counter;
-
-#define synchronize_bh() do { } while (0)
+extern unsigned int local_bh_count[NR_CPUS];
+#define get_active_bhs() (bh_mask & bh_active)
#define clear_active_bhs(x) atomic_clear_mask((x),&bh_active)
extern inline void init_bh(int nr, void (*routine)(void))
set_bit(nr, &bh_active);
}
+#ifdef __SMP__
/*
- * These use a mask count to correctly handle
- * nested disable/enable calls
+ * The locking mechanism for base handlers, to prevent re-entrancy,
+ * is entirely private to an implementation, it should not be
+ * referenced at all outside of this file.
*/
-extern inline void disable_bh(int nr)
+extern atomic_t global_bh_lock;
+extern atomic_t global_bh_count;
+
+extern void synchronize_bh(void);
+
+static inline void start_bh_atomic(void)
{
- bh_mask &= ~(1 << nr);
- bh_mask_count[nr]++;
+ atomic_inc(&global_bh_lock);
+ synchronize_bh();
}
-extern inline void enable_bh(int nr)
+static inline void end_bh_atomic(void)
{
- if (!--bh_mask_count[nr])
- bh_mask |= 1 << nr;
+ atomic_dec(&global_bh_lock);
}
+/* These are for the IRQs testing the lock */
+static inline int softirq_trylock(int cpu)
+{
+ if (!test_and_set_bit(0,&global_bh_count)) {
+ if (atomic_read(&global_bh_lock) == 0) {
+ ++local_bh_count[cpu];
+ return 1;
+ }
+ clear_bit(0,&global_bh_count);
+ }
+ return 0;
+}
+
+static inline void softirq_endlock(int cpu)
+{
+ local_bh_count[cpu]--;
+ clear_bit(0,&global_bh_count);
+}
+
+#else /* __SMP__ */
extern inline void start_bh_atomic(void)
{
- __ppc_bh_counter++;
+ local_bh_count[smp_processor_id()]++;
barrier();
}
extern inline void end_bh_atomic(void)
{
barrier();
- __ppc_bh_counter--;
+ local_bh_count[smp_processor_id()]--;
}
/* These are for the irq's testing the lock */
-#define softirq_trylock(cpu) (__ppc_bh_counter? 0: ((__ppc_bh_counter=1),1))
-#define softirq_endlock(cpu) (__ppc_bh_counter = 0)
+#define softirq_trylock(cpu) (local_bh_count[cpu] ? 0 : (local_bh_count[cpu]=1))
+#define softirq_endlock(cpu) (local_bh_count[cpu] = 0)
+#define synchronize_bh() do { } while (0)
-#else /* __SMP__ */
+#endif /* __SMP__ */
-extern atomic_t __ppc_bh_counter;
-
-#define start_bh_atomic() \
- do { atomic_inc(&__ppc_bh_counter); synchronize_irq(); } while(0)
-
-#define end_bh_atomic() atomic_dec(&__ppc_bh_counter)
-
-#define synchronize_bh() do { } while (0) /* XXX implement SMP version --Cort */
-
-#include <asm/spinlock.h>
-
-extern spinlock_t global_bh_lock;
-
-#define init_bh(nr, routine) \
-do { unsigned long flags; \
- int ent = nr; \
- spin_lock_irqsave(&global_bh_lock, flags); \
- bh_base[ent] = routine; \
- bh_mask_count[ent] = 0; \
- bh_mask |= 1 << ent; \
- spin_unlock_irqrestore(&global_bh_lock, flags); \
-} while(0)
-
-#define remove_bh(nr) \
-do { unsigned long flags; \
- int ent = nr; \
- spin_lock_irqsave(&global_bh_lock, flags); \
- bh_base[ent] = NULL; \
- bh_mask &= ~(1 << ent); \
- spin_unlock_irqrestore(&global_bh_lock, flags); \
-} while(0)
-
-#define mark_bh(nr) \
-do { unsigned long flags; \
- spin_lock_irqsave(&global_bh_lock, flags); \
- bh_active |= (1 << nr); \
- spin_unlock_irqrestore(&global_bh_lock, flags); \
-} while(0)
-
-#define disable_bh(nr) \
-do { unsigned long flags; \
- int ent = nr; \
- spin_lock_irqsave(&global_bh_lock, flags); \
- bh_mask &= ~(1 << ent); \
- bh_mask_count[ent]++; \
- spin_unlock_irqrestore(&global_bh_lock, flags); \
-} while(0)
-
-#define enable_bh(nr) \
-do { unsigned long flags; \
- int ent = nr; \
- spin_lock_irqsave(&global_bh_lock, flags); \
- if (!--bh_mask_count[ent]) \
- bh_mask |= 1 << ent; \
- spin_unlock_irqrestore(&global_bh_lock, flags); \
-} while(0)
-
-#define softirq_trylock(cpu) \
-({ \
- int ret = 1; \
- if(atomic_add_return(1, &__ppc_bh_counter) != 1) { \
- atomic_dec(&__ppc_bh_counter); \
- ret = 0; \
- } \
- ret; \
-})
-#define softirq_endlock(cpu) atomic_dec(&__ppc_bh_counter)
-#define clear_active_bhs(mask) \
-do { unsigned long flags; \
- spin_lock_irqsave(&global_bh_lock, flags); \
- bh_active &= ~(mask); \
- spin_unlock_irqrestore(&global_bh_lock, flags); \
-} while(0)
+/*
+ * These use a mask count to correctly handle
+ * nested disable/enable calls
+ */
+extern inline void disable_bh(int nr)
+{
+ bh_mask &= ~(1 << nr);
+ bh_mask_count[nr]++;
+ synchronize_bh();
+}
-#endif /* __SMP__ */
+extern inline void enable_bh(int nr)
+{
+ if (!--bh_mask_count[nr])
+ bh_mask |= 1 << nr;
+}
#endif
extern void poweroff_now(void);
extern int _get_PVR(void);
extern long _get_L2CR(void);
+extern void _set_L2CR(unsigned long);
extern void via_cuda_init(void);
extern void pmac_nvram_init(void);
extern void read_rtc_time(void);
extern void pmac_find_display(void);
extern void giveup_fpu(void);
extern void smp_giveup_fpu(struct task_struct *);
-extern void cvt_fd(float *from, double *to);
-extern void cvt_df(double *from, float *to);
+extern void cvt_fd(float *from, double *to, unsigned long *fpscr);
+extern void cvt_df(double *from, float *to, unsigned long *fpscr);
struct device_node;
extern void note_scsi_host(struct device_node *, void *);
#ifndef _PPC_TYPES_H
#define _PPC_TYPES_H
-typedef unsigned short umode_t;
-
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
*/
#ifdef __KERNEL__
+typedef unsigned short umode_t;
+
typedef signed char s8;
typedef unsigned char u8;
extern inline unsigned long
copy_from_user(void *to, const void *from, unsigned long n)
{
- unsigned long res = n;
- if (access_ok(VERIFY_READ, from, n)) {
- res = __copy_tofrom_user(to, from, n);
- if (res) memset((char *)to + n - res, 0, res);
- }
- return res;
+ if (access_ok(VERIFY_READ, from, n))
+ return __copy_tofrom_user(to, from, n);
+ return n;
}
extern inline unsigned long
#define __NR_rt_sigaction 173
#define __NR_rt_sigprocmask 174
#define __NR_rt_sigpending 175
-#define __NR_rt_sigtimedwait 176
-#define __NR_rt_sigqueueinfo 177
-#define __NR_rt_sigsuspend 178
-#define __NR_pread 179
-#define __NR_pwrite 180
-#define __NR_chown 181
-#define __NR_getcwd 182
+#define __NR_rt_sigtimedwait 176
+#define __NR_rt_sigqueueinfo 177
+#define __NR_rt_sigsuspend 178
+#define __NR_pread 179
+#define __NR_pwrite 180
+#define __NR_chown 181
+#define __NR_getcwd 182
+#define __NR_capget 183
+#define __NR_capset 184
+#define __NR_sigaltstack 185
+#define __NR_sendfile 186
+#define __NR_streams1 187 /* some people actually want it */
+#define __NR_streams2 188 /* some people actually want it */
+
#define __NR(n) #n
-/* $Id: linux_logo.h,v 1.5 1998/07/30 16:30:40 jj Exp $
+/* $Id: linux_logo.h,v 1.6 1998/08/20 04:44:39 ecd Exp $
* include/asm-sparc/linux_logo.h: This is a linux logo
* to be displayed on boot.
*
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
};
-unsigned char linux_logo16_red[0];
-unsigned char linux_logo16_green[0];
-unsigned char linux_logo16_blue[0];
-unsigned char linux_logo16[0];
+unsigned char linux_logo16_red[1];
+unsigned char linux_logo16_green[1];
+unsigned char linux_logo16_blue[1];
+unsigned char linux_logo16[1];
#else
-/* $Id: linux_logo.h,v 1.3 1998/07/06 15:51:16 jj Exp $
+/* $Id: linux_logo.h,v 1.5 1998/07/30 16:30:58 jj Exp $
* include/linux/linux_logo.h: This is a linux logo
* to be displayed on boot.
*
* Copyright (C) 1996 Larry Ewing (lewing@isc.tamu.edu)
- * Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+ * Copyright (C) 1996,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
*
* You can put anything here, but:
* LINUX_LOGO_COLORS has to be less than 224
* but should contain %s to display the version
*/
-#if LINUX_LOGO_COLORS == 221
+#if LINUX_LOGO_COLORS == 214
unsigned char linux_logo_red[] __initdata = {
- 0xF3, 0xF6, 0xF8, 0xF7, 0xEF, 0xE7, 0xE5, 0xE3,
- 0xCA, 0xD4, 0xDD, 0xC8, 0xC7, 0xC4, 0xC2, 0xE5,
- 0xF1, 0xED, 0xEE, 0xE6, 0xC6, 0xDA, 0xDD, 0xE5,
- 0xD9, 0xC6, 0xE3, 0xD0, 0xC6, 0xBA, 0xB0, 0xB6,
- 0xBB, 0xBE, 0xB9, 0xB8, 0xB3, 0xB2, 0xB0, 0xAD,
- 0xAC, 0xA9, 0xA8, 0xA6, 0xA4, 0xA1, 0xA0, 0x9D,
- 0xA0, 0x9F, 0x9E, 0x9C, 0x9B, 0x99, 0x9A, 0x99,
- 0x98, 0x95, 0x96, 0x94, 0x93, 0x92, 0x8F, 0x8D,
- 0x8C, 0x8A, 0x87, 0x86, 0x83, 0x81, 0x0D, 0x03,
- 0x66, 0x44, 0x24, 0x08, 0xD6, 0xE6, 0xE9, 0xE6,
- 0xE7, 0xCA, 0xDC, 0xDB, 0xD5, 0xD0, 0xC9, 0xE2,
- 0xD5, 0xC6, 0xC4, 0xB3, 0xB2, 0xB9, 0xA9, 0x9A,
- 0xB2, 0x9D, 0xE8, 0xEC, 0xF5, 0xF5, 0xF4, 0xF4,
- 0xEC, 0xEE, 0xF0, 0xF5, 0xE0, 0xD6, 0xC5, 0xC2,
- 0xD9, 0x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, 0x59,
- 0x5C, 0x5A, 0x48, 0x72, 0x7B, 0x6B, 0x67, 0x6E,
- 0x42, 0x5B, 0x29, 0x36, 0x25, 0x10, 0x17, 0x14,
- 0x19, 0x16, 0x13, 0x0E, 0x08, 0x2E, 0x2E, 0x3D,
- 0x24, 0x24, 0x24, 0x24, 0x13, 0x12, 0x14, 0x14,
- 0x0E, 0x08, 0x0D, 0x0F, 0x08, 0x0D, 0x0E, 0x08,
- 0x08, 0x0C, 0x06, 0x06, 0x07, 0x16, 0x07, 0x0E,
- 0x08, 0x0A, 0x07, 0x0D, 0x2D, 0x3E, 0x09, 0x4E,
- 0x68, 0x52, 0x56, 0x58, 0x4B, 0x22, 0x20, 0x20,
- 0x27, 0x39, 0x28, 0x19, 0x1E, 0x1E, 0x08, 0x06,
- 0x07, 0x09, 0x08, 0x08, 0x05, 0x1D, 0x1F, 0x17,
- 0x18, 0x06, 0x79, 0x80, 0x7D, 0x7C, 0x7A, 0x78,
- 0x76, 0x71, 0x73, 0x6E, 0x6B, 0x68, 0x65, 0x62,
- 0x4B, 0x5B, 0x5F, 0x55, 0x56, 0x52, 0x4F, 0x46,
- 0x42, 0x5A, 0x14, 0x23, 0x3D, 0x2B, 0x21, 0x14,
- 0x06, 0x04, 0x03, 0x07, 0x09, 0x13, 0x2A, 0x3A,
- 0x37, 0x3E, 0x32, 0x33, 0x25, 0x2C, 0x07, 0x09,
- 0x1D, 0x14, 0x06, 0x02, 0x00
+ 0x04, 0x28, 0x10, 0x0B, 0x14, 0x14, 0x74, 0xC7,
+ 0x64, 0x0E, 0xC3, 0x24, 0xA4, 0x0C, 0x10, 0x20,
+ 0x0D, 0x04, 0xD1, 0x0D, 0x13, 0x22, 0x0A, 0x40,
+ 0x14, 0x0C, 0x11, 0x94, 0x0C, 0x08, 0x0B, 0x56,
+ 0x09, 0x47, 0xF4, 0x0B, 0x9C, 0x07, 0x54, 0x74,
+ 0x0F, 0x0C, 0x0F, 0xC7, 0x6C, 0x14, 0x14, 0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, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, 0x57,
- 0x58, 0x58, 0x59, 0x5C, 0x5D, 0x5F, 0x60, 0x61,
- 0x62, 0x61, 0x61, 0x62, 0x62, 0x62, 0x63, 0x63,
- 0x61, 0x61, 0x61, 0x61, 0x61, 0x60, 0x5E, 0x5E,
- 0x5E, 0x5D, 0x5D, 0x5C, 0x5D, 0x5B, 0x58, 0x58,
- 0x58, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x58,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, 0x57,
- 0x54, 0x56, 0x57, 0x67, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x67, 0x4C,
- 0x4A, 0x49, 0x4A, 0x49, 0x4A, 0x49, 0x49, 0x4A,
- 0x4A, 0x4B, 0x4B, 0x4B, 0x4C, 0x50, 0x51, 0x52,
- 0x54, 0x54, 0x56, 0x57, 0x57, 0x57, 0x57, 0x58,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x58, 0x56, 0x56, 0x53,
- 0x52, 0x53, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0xFB, 0xFB,
- 0x4B, 0x4B, 0x4B, 0x4A, 0x49, 0x4A, 0x4A, 0x49,
- 0x49, 0x49, 0x48, 0x49, 0x49, 0x4A, 0x4A, 0x4B,
- 0x4C, 0x4D, 0x52, 0x54, 0x56, 0x55, 0x57, 0x58,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x55, 0x54, 0x53, 0x52, 0x51, 0x50,
- 0x50, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF8, 0xF0, 0xF4, 0xFB,
- 0xFC, 0x67, 0x53, 0x50, 0x4D, 0x4C, 0x4C, 0x4C,
- 0x4B, 0x4A, 0x4A, 0x48, 0x49, 0x48, 0x48, 0x49,
- 0x49, 0x49, 0x4B, 0x4C, 0x50, 0x52, 0x53, 0x56,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x55, 0x54, 0x53, 0x51, 0x51, 0x50, 0x4C, 0x4D,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0xD2, 0xD7, 0xF5,
- 0xFC, 0xFC, 0x5D, 0x5D, 0x5C, 0x5C, 0x59, 0x58,
- 0x58, 0x56, 0x52, 0x4C, 0x4B, 0x4A, 0x4A, 0x48,
- 0x48, 0x48, 0x48, 0x48, 0x49, 0x4B, 0x4D, 0x51,
- 0x54, 0x56, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x55, 0x54,
- 0x53, 0x52, 0x51, 0x4D, 0x4D, 0x4D, 0x50, 0x50,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0x64, 0xD9, 0xF5,
- 0xF9, 0xFC, 0xFC, 0x64, 0x63, 0x62, 0x61, 0x61,
- 0x61, 0x60, 0x5E, 0x5B, 0x5A, 0x54, 0x52, 0x4C,
- 0x4B, 0x49, 0x49, 0x47, 0x47, 0x48, 0x49, 0x4B,
- 0x4C, 0x51, 0x53, 0x56, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x55, 0x53, 0x53,
- 0x51, 0x50, 0x50, 0x50, 0x50, 0x50, 0x53, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0xF5, 0xF9, 0xFC,
- 0xFC, 0xFC, 0xFC, 0x64, 0x64, 0x64, 0x64, 0x64,
- 0x64, 0x64, 0x64, 0x63, 0x61, 0x61, 0x5E, 0x59,
- 0x55, 0x52, 0x4C, 0x4A, 0x49, 0x47, 0x48, 0x48,
- 0x49, 0x4B, 0x4D, 0x51, 0x54, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x55, 0x54, 0x54, 0x52, 0x51,
- 0x51, 0x51, 0x51, 0x51, 0x53, 0x54, 0x59, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF7, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0x60, 0x60, 0x60, 0x61,
- 0x62, 0x63, 0x64, 0x64, 0x65, 0x65, 0x64, 0x63,
- 0x61, 0x5E, 0x59, 0x56, 0x4D, 0x4B, 0x48, 0x48,
- 0x48, 0x48, 0x49, 0x4B, 0x50, 0x53, 0x56, 0x56,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x56, 0x54, 0x53, 0x52, 0x51, 0x51,
- 0x51, 0x52, 0x53, 0x55, 0x59, 0x5D, 0x5E, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFB, 0xFB, 0xFB, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0x4C, 0x4E, 0x51, 0x52,
- 0x57, 0x5A, 0x5E, 0x60, 0x61, 0x63, 0x65, 0xCB,
- 0x64, 0x64, 0x63, 0x60, 0x5C, 0x57, 0x50, 0x4B,
- 0x48, 0x47, 0x47, 0x47, 0x4A, 0x4C, 0x52, 0x53,
- 0x54, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x55, 0x54, 0x53, 0x53, 0x51, 0x52, 0x52, 0x53,
- 0x53, 0x57, 0x5A, 0x5D, 0x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 0x47, 0x49, 0x4C, 0x51,
- 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, 0x55, 0x57,
- 0x58, 0x5A, 0x5A, 0x5B, 0x5A, 0x55, 0x54, 0x51,
- 0x53, 0x5C, 0x5D, 0x5D, 0x54, 0x4B, 0x4D, 0xFC,
- 0xFC, 0x44, 0xFC, 0xFB, 0x7B, 0xAB, 0xA8, 0xAE,
- 0xAB, 0x7F, 0xFC, 0xFC, 0xFB, 0xFB, 0x22, 0x2A,
- 0xFC, 0xFC, 0xFC, 0xFC, 0x36, 0x2F, 0x30, 0x30,
- 0x32, 0x30, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30,
- 0x30, 0x30, 0x30, 0x30, 0x2F, 0x2F, 0x40, 0x41,
- 0x2E, 0x40, 0x48, 0x56, 0x5F, 0x64, 0xCC, 0x65,
- 0x61, 0x59, 0x50, 0x49, 0x47, 0x47, 0x49, 0x4C,
- 0x5A, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58,
- 0x5A, 0x5A, 0x5A, 0x58, 0x55, 0x52, 0x51, 0x5A,
- 0x5D, 0x5D, 0x57, 0x4C, 0x51, 0x54, 0x5D, 0xFC,
- 0xFC, 0x2A, 0xFC, 0xC9, 0xAA, 0x8B, 0x8A, 0x8C,
- 0xAB, 0x8C, 0x8C, 0xFB, 0xFB, 0x23, 0x20, 0xF1,
- 0xFC, 0xFC, 0xFC, 0x3B, 0x33, 0x33, 0x32, 0x32,
- 0x31, 0x32, 0x30, 0x32, 0x32, 0x32, 0x32, 0x30,
- 0x31, 0x31, 0x31, 0x32, 0x33, 0x33, 0x3C, 0x41,
- 0x41, 0x2E, 0x2D, 0x45, 0x4D, 0x5D, 0x63, 0xCC,
- 0x65, 0x62, 0x5D, 0x51, 0x49, 0x47, 0x47, 0x4A,
- 0x59, 0x57, 0x57, 0x57, 0x57, 0x58, 0x58, 0x58,
- 0x5A, 0x5A, 0x58, 0x55, 0x53, 0x53, 0x5C, 0x5E,
- 0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22, 0x20, 0x2D, 0x2C, 0x26,
- 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x22, 0x21, 0xF0, 0xFC, 0xFC, 0xFC, 0xE2, 0xC6,
- 0xB5, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
- 0x93, 0x93, 0xC7, 0xE3, 0x3E, 0x2E, 0x49, 0x52,
- 0x4C, 0x41, 0x44, 0x62, 0xD6, 0xDE, 0xDE, 0xD9,
- 0xD0, 0x51, 0x2E, 0x40, 0x47, 0x44, 0x2C, 0x42,
- 0x5D, 0x5D, 0x5F, 0x60, 0x60, 0x5D, 0x57, 0x51,
- 0x58, 0x5D, 0x4E, 0x52, 0x55, 0x64, 0xD5, 0xD6,
- 0xD4, 0x61, 0x59, 0x6B, 0xFC, 0xFC, 0xFC, 0x21,
- 0x23, 0x22, 0x23, 0x22, 0x23, 0x21, 0x23, 0x22,
- 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x22, 0x21, 0x24, 0xFC, 0xFC, 0xFC, 0xE2, 0xC7,
- 0xB5, 0x90, 0x93, 0x93, 0x93, 0x90, 0x93, 0x93,
- 0x90, 0xB5, 0xC8, 0xE4, 0x5F, 0x45, 0x2E, 0x4D,
- 0x57, 0x57, 0x44, 0x43, 0x63, 0xDA, 0xDF, 0xDF,
- 0xD9, 0xCE, 0x4C, 0x2C, 0x3F, 0x3E, 0x40, 0x40,
- 0x60, 0x5E, 0x61, 0x61, 0x5E, 0x5B, 0x53, 0x52,
- 0x5C, 0x52, 0x52, 0x55, 0x61, 0xD4, 0xD5, 0xD1,
- 0x5E, 0x5B, 0x5C, 0xFB, 0xFC, 0xFC, 0x2A, 0x21,
- 0x23, 0x22, 0x23, 0x22, 0x22, 0x22, 0x23, 0x22,
- 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x22, 0x22, 0x22, 0xFB, 0xFC, 0xFC, 0xB3, 0xC8,
- 0xB5, 0x90, 0x92, 0xB5, 0x93, 0x93, 0xB5, 0x93,
- 0x92, 0xB5, 0xC8, 0xB9, 0xD0, 0x5E, 0x44, 0x40,
- 0x52, 0x58, 0x57, 0x48, 0x40, 0x63, 0xD9, 0xE0,
- 0xE0, 0xD9, 0xCB, 0x49, 0x2D, 0x3F, 0x45, 0x3F,
- 0x63, 0x61, 0x62, 0x60, 0x5E, 0x55, 0x4D, 0x59,
- 0x53, 0x4E, 0x54, 0x5D, 0xD2, 0xD4, 0xD2, 0x5E,
- 0x5C, 0x5D, 0xFC, 0xFC, 0xFC, 0xF8, 0x29, 0x23,
- 0x23, 0x23, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x23, 0x22, 0x22, 0x23, 0x23, 0x23, 0x22, 0x22,
- 0x22, 0x22, 0x22, 0xF0, 0xFC, 0xFC, 0xB3, 0xC7,
- 0xB5, 0x93, 0xB5, 0x93, 0x93, 0x91, 0x93, 0x93,
- 0x91, 0xB5, 0xC7, 0xAD, 0xD6, 0xD2, 0x5E, 0x3F,
- 0x3F, 0x57, 0x57, 0x58, 0x4A, 0x41, 0x64, 0xDC,
- 0xF1, 0xDF, 0xDA, 0x61, 0x45, 0x2E, 0x43, 0x47,
- 0xCB, 0x63, 0x62, 0x5F, 0x58, 0x51, 0x53, 0x54,
- 0x4C, 0x52, 0x5C, 0xCD, 0xD3, 0xD2, 0x60, 0x5D,
- 0x5D, 0xFB, 0xFC, 0xFC, 0xFC, 0xDB, 0x49, 0x24,
- 0x21, 0x23, 0x23, 0x22, 0x26, 0x26, 0x2A, 0x24,
- 0x22, 0x23, 0x22, 0x21, 0x24, 0x26, 0x26, 0x2A,
- 0x29, 0x2B, 0x24, 0x25, 0xFC, 0xFC, 0xB3, 0xC5,
- 0x91, 0x91, 0x92, 0x91, 0x92, 0x92, 0x93, 0x93,
- 0x91, 0x93, 0xC6, 0xAD, 0xDC, 0xD9, 0xD4, 0x60,
- 0x43, 0x45, 0x58, 0x58, 0x57,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x22, 0x22, 0x21, 0x22, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22,
- 0x23, 0x22, 0x21, 0x22, 0x25, 0x29, 0xB3, 0xC7,
- 0xB5, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6,
- 0xB6, 0xB5, 0xC7, 0xAD, 0x57, 0x3F, 0xCB, 0xF0,
- 0xF3, 0xF3, 0xF2, 0xD9, 0x58, 0x41, 0x4C, 0x58,
- 0x57, 0x47, 0x42, 0x62, 0xD4, 0xD4, 0xCC, 0x60,
- 0x63, 0x5D, 0x50, 0x47, 0x48, 0x4B, 0x58, 0x60,
- 0xCC, 0xCE, 0xCD, 0x60, 0x53, 0x5C, 0x62, 0xFB,
- 0xF9, 0xFC, 0xFC, 0x21, 0x23, 0x22, 0x22, 0x23,
- 0x22, 0x22, 0x23, 0x23, 0x23, 0x21, 0x22, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22,
- 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, 0x81, 0xC7,
- 0xB7, 0xB7, 0xBC, 0xB7, 0xBC, 0xBC, 0xBC, 0xB7,
- 0xB7, 0xB7, 0xC8, 0x80, 0x58, 0x57, 0x40, 0xCE,
- 0xF3, 0xF2, 0xF2, 0xF0, 0xD5, 0x4C, 0x3F, 0x4B,
- 0x52, 0x50, 0x2D, 0x4B, 0x64, 0xD2, 0xCC, 0x61,
- 0x60, 0x58, 0x4A, 0x47, 0x47, 0x4C, 0x59, 0x64,
- 0xD0, 0xD0, 0x64, 0x59, 0x49, 0x5D, 0xFB, 0xFC,
- 0xD9, 0xFC, 0xD6, 0x23, 0x22, 0x22, 0x22, 0x23,
- 0x22, 0x22, 0x23, 0x23, 0x21, 0x21, 0x22, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22,
- 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, 0xB4, 0xC8,
- 0x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0xD0,
- 0xCE, 0x60, 0x4A, 0x45, 0xFC, 0xFC, 0xF7, 0xFC,
- 0xFC, 0x21, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23,
- 0x22, 0x23, 0x21, 0x2A, 0x20, 0x23, 0x23, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22,
- 0x23, 0x22, 0x23, 0x22, 0x21, 0x23, 0xEB, 0xF6,
- 0xF6, 0xED, 0xED, 0xED, 0xED, 0xED, 0xED, 0xED,
- 0xF6, 0xF6, 0xF6, 0xE6, 0xDB, 0x58, 0x45, 0x4B,
- 0x58, 0x57, 0x4D, 0x4B, 0x64, 0xD4, 0xD0, 0x5C,
- 0x48, 0x51, 0x4C, 0x5D, 0x5E, 0x5C, 0x56, 0x59,
- 0x3E, 0x4A, 0x58, 0x54, 0x52, 0x65, 0xD3, 0xD0,
- 0xCF, 0x5D, 0x48, 0xFC, 0xFC, 0xFC, 0xFA, 0xFC,
- 0xFC, 0x21, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23,
- 0x22, 0x23, 0x21, 0x2A, 0x21, 0x23, 0x23, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22,
- 0x23, 0x22, 0x23, 0x22, 0x21, 0x4F, 0xE6, 0xC6,
- 0xC6, 0xBD, 0xC6, 0xBD, 0xBD, 0xBD, 0xBD, 0xC6,
- 0xC5, 0xBA, 0xC7, 0xE6, 0xF2, 0xD4, 0x49, 0x4B,
- 0x3E, 0x4D, 0x52, 0x3E, 0x52, 0x63, 0x64, 0x56,
- 0x48, 0x54, 0x4D, 0x61, 0xCC, 0xCC, 0x60, 0x60,
- 0x47, 0x4D, 0x5C, 0x53, 0x58, 0xCF, 0xD1, 0xCF,
- 0xD0, 0x59, 0x45, 0xFC, 0xFC, 0xFC, 0xEF, 0xF9,
- 0xFC, 0x21, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22,
- 0x23, 0x22, 0x23, 0x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x87, 0x8B,
- 0x9C, 0x86, 0x9C, 0x8A, 0x87, 0x87, 0x89, 0x51,
- 0x54, 0x47, 0x4B, 0x50, 0x4B, 0xCF, 0xD6, 0xDC,
- 0xD5, 0x60, 0x54, 0x52, 0x48, 0x45, 0x40, 0x5A,
- 0x45, 0x43, 0x47, 0xA7, 0x98, 0x9B, 0x95, 0x95,
- 0x9A, 0x87, 0x98, 0x98, 0x8A, 0x86, 0x87, 0x9E,
- 0x9B, 0x95, 0x9D, 0x9D, 0x99, 0x85, 0xA6, 0xFA,
- 0xF2, 0x21, 0x23, 0x22, 0x21, 0x22, 0x23, 0x22,
- 0x22, 0x22, 0x22, 0x23, 0x22, 0x21, 0x22, 0x22,
- 0x21, 0x24, 0xFB, 0xF7, 0xBF, 0xA6, 0xA2, 0x99,
- 0x97, 0x89, 0x86, 0x89, 0x9C, 0x96, 0x9E, 0x94,
- 0x89, 0x99, 0x98, 0x89, 0x9E, 0x9B, 0x89, 0x8B,
- 0x58, 0x4B, 0x4A, 0x52, 0x48, 0xCC, 0xD3, 0xDA,
- 0xD3, 0x65, 0x4C, 0x58, 0x49, 0x3E, 0x2E, 0x4D,
- 0x40, 0x41, 0x45, 0xA9, 0xA1, 0x9B, 0x9E, 0x9C,
- 0x95, 0x8A, 0x94, 0x89, 0x96, 0x87, 0x9C, 0x9A,
- 0x84, 0x9D, 0x9C, 0x9E, 0x9A, 0x9C, 0x9D, 0xBB,
- 0x23, 0x23, 0x22, 0x22, 0x21, 0x22, 0x23, 0x22,
- 0x22, 0x22, 0x22, 0x23, 0x22, 0x21, 0x23, 0x23,
- 0x24, 0xFC, 0xFC, 0xF6, 0xBF, 0xA6, 0x9F, 0x99,
- 0x89, 0x95, 0x87, 0x94, 0x9D, 0x9E, 0x97, 0x9E,
- 0x95, 0x9B, 0x89, 0x95, 0x95, 0x9B, 0x89, 0x87,
- 0x5D, 0x56, 0x3E, 0x51, 0x3E, 0x60, 0xCF, 0xD3,
- 0xD2, 0xCD, 0x5C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xA1, 0xA1, 0x2C, 0x2C,
+ 0xA1, 0x95, 0xCB, 0xCB, 0x95, 0x95, 0x2C, 0x2C,
+ 0x2C, 0xA1, 0x2C, 0x2C, 0x2C, 0xA1, 0xA1, 0x2C,
+ 0x2C, 0x95, 0x55, 0x95, 0x95, 0x2C, 0x2C, 0x2C,
+ 0x2C, 0xA1, 0x6D, 0xBF, 0x6D, 0xA1, 0x55, 0x55,
+ 0x95, 0x95, 0x95, 0x95, 0x2C, 0x2C, 0x2C, 0x2C,
+ 0x2C, 0x95, 0x95, 0x95, 0x2C, 0x2C, 0x2C, 0x95,
+ 0x55, 0x95, 0x2C, 0x2C, 0xA1, 0xA1, 0xD6, 0xD6,
+ 0x6D, 0x6D, 0xA1, 0x95, 0xCB, 0x55, 0x95, 0x55,
+ 0x90, 0x70, 0xCB, 0xCB, 0x90, 0xCB, 0x95, 0x95,
+ 0x2C, 0x2C, 0xA1, 0xD6, 0xA1, 0xA1, 0xA1, 0xA1,
+ 0xA1, 0xA1, 0x2C, 0x95, 0x95, 0x2C, 0x2C, 0x2C,
+ 0x2C, 0xA1, 0x2C, 0x95, 0x95, 0x95, 0x2C, 0x2C,
+ 0x2C, 0x95, 0x55, 0x55, 0x2C, 0x2C, 0xA1, 0xA1,
+ 0xD6, 0xD6, 0x6D, 0x6D, 0xA1, 0x55, 0xCB, 0x55
};
+#endif
+
+#ifdef INCLUDE_LINUX_LOGOBW
+
unsigned char linux_logo_bw[] __initdata = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x3F,
#define PCI_DEVICE_ID_TI_TVP4010 0x3d04
#define PCI_DEVICE_ID_TI_TVP4020 0x3d07
#define PCI_DEVICE_ID_TI_PCI1130 0xac12
+#define PCI_DEVICE_ID_TI_PCI1031 0xac13
#define PCI_DEVICE_ID_TI_PCI1131 0xac15
#define PCI_DEVICE_ID_TI_PCI1250 0xac16
+#define PCI_DEVICE_ID_TI_PCI1220 0xac17
#define PCI_VENDOR_ID_OAK 0x104e
#define PCI_DEVICE_ID_OAK_OTI107 0x0107
#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f
#define PCI_VENDOR_ID_RICOH 0x1180
+#define PCI_DEVICE_ID_RICOH_RL5C465 0x0465
#define PCI_DEVICE_ID_RICOH_RL5C466 0x0466
+#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475
+#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478
#define PCI_VENDOR_ID_ARTOP 0x1191
#define PCI_DEVICE_ID_ARTOP_ATP8400 0x0004
#define PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER 0x0001
#define PCI_VENDOR_ID_O2 0x1217
+#define PCI_DEVICE_ID_O2_6729 0x6729
+#define PCI_DEVICE_ID_O2_6730 0x673a
#define PCI_DEVICE_ID_O2_6832 0x6832
+#define PCI_DEVICE_ID_O2_6836 0x6836
#define PCI_VENDOR_ID_3DFX 0x121a
#define PCI_DEVICE_ID_3DFX_VOODOO 0x0001
#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078
#define PCI_DEVICE_ID_ADAPTEC_7855 0x5578
#define PCI_DEVICE_ID_ADAPTEC_5800 0x5800
+#define PCI_DEVICE_ID_ADAPTEC_1480A 0x6075
#define PCI_DEVICE_ID_ADAPTEC_7860 0x6078
#define PCI_DEVICE_ID_ADAPTEC_7861 0x6178
#define PCI_DEVICE_ID_ADAPTEC_7870 0x7078
#define PF_MEMALLOC 0x00000800 /* Allocating memory */
#define PF_USEDFPU 0x00100000 /* task used FPU this quantum (SMP) */
-#define PF_DTRACE 0x00200000 /* delayed trace (used on m68k) */
+#define PF_DTRACE 0x00200000 /* delayed trace (used on m68k, i386) */
/*
* Limit the stack by to some sane default: root can always
KERN_PPC_HTABRECLAIM, /* turn htab reclaimation on/off on PPC */
KERN_PPC_ZEROPAGED, /* turn idle page zeroing on/off on PPC */
KERN_PPC_POWERSAVE_NAP, /* use nap mode for power saving */
+ KERN_PPC_L2CR, /* l2cr register on PPC */
KERN_MODPROBE,
/*29*/ KERN_SG_BIG_BUFF
};
#endif
#ifdef CONFIG_BLK_DEV_PS2
{ "eda", 0x2400 },
+ { "edb", 0x2440 },
#endif
#ifdef CONFIG_PARIDE_PD
{ "pda", 0x2d00 },
{ "floppy=", floppy_setup },
#endif
#ifdef CONFIG_BLK_DEV_PS2
- { "ed=", ed_setup },
+ { "eda=", ed_setup },
+ { "edb=", ed_setup },
{ "tp720=", tp720_setup },
#endif
#ifdef CONFIG_CDU31A
#endif
#ifdef __powerpc__
extern unsigned long htab_reclaim_on, zero_paged_on, powersave_nap;
+int proc_dol2crvec(ctl_table *table, int write, struct file *filp,
+ void *buffer, size_t *lenp);
#endif
extern int pgt_cache_water[];
0644, NULL, &proc_dointvec},
{KERN_PPC_POWERSAVE_NAP, "powersave-nap", &powersave_nap, sizeof(int),
0644, NULL, &proc_dointvec},
+ {KERN_PPC_L2CR, "l2cr", NULL, 0,
+ 0644, NULL, &proc_dol2crvec},
#endif
{KERN_CTLALTDEL, "ctrl-alt-del", &C_A_D, sizeof(int),
0644, NULL, &proc_dointvec},