1 --- a/arch/mips/au1000/common/au1xxx_irqmap.c
2 +++ b/arch/mips/au1000/common/au1xxx_irqmap.c
3 @@ -172,14 +172,14 @@ au1xxx_irq_map_t au1xxx_ic0_map[] = {
4 { AU1550_PSC1_INT, INTC_INT_HIGH_LEVEL, 0},
5 { AU1550_PSC2_INT, INTC_INT_HIGH_LEVEL, 0},
6 { AU1550_PSC3_INT, INTC_INT_HIGH_LEVEL, 0},
7 - { AU1550_TOY_INT, INTC_INT_RISE_EDGE, 0 },
8 - { AU1550_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
9 - { AU1550_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
10 - { AU1550_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
11 - { AU1550_RTC_INT, INTC_INT_RISE_EDGE, 0 },
12 - { AU1550_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
13 - { AU1550_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
14 - { AU1550_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
15 + { AU1000_TOY_INT, INTC_INT_RISE_EDGE, 0 },
16 + { AU1000_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
17 + { AU1000_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
18 + { AU1000_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
19 + { AU1000_RTC_INT, INTC_INT_RISE_EDGE, 0 },
20 + { AU1000_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
21 + { AU1000_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
22 + { AU1000_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
23 { AU1550_NAND_INT, INTC_INT_RISE_EDGE, 0},
24 { AU1550_USB_DEV_REQ_INT, INTC_INT_HIGH_LEVEL, 0 },
25 { AU1550_USB_DEV_SUS_INT, INTC_INT_RISE_EDGE, 0 },
26 @@ -200,14 +200,14 @@ au1xxx_irq_map_t au1xxx_ic0_map[] = {
27 { AU1200_PSC1_INT, INTC_INT_HIGH_LEVEL, 0},
28 { AU1200_AES_INT, INTC_INT_HIGH_LEVEL, 0},
29 { AU1200_CAMERA_INT, INTC_INT_HIGH_LEVEL, 0},
30 - { AU1200_TOY_INT, INTC_INT_RISE_EDGE, 0 },
31 - { AU1200_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
32 - { AU1200_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
33 - { AU1200_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
34 - { AU1200_RTC_INT, INTC_INT_RISE_EDGE, 0 },
35 - { AU1200_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
36 - { AU1200_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
37 - { AU1200_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
38 + { AU1000_TOY_INT, INTC_INT_RISE_EDGE, 0 },
39 + { AU1000_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
40 + { AU1000_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
41 + { AU1000_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
42 + { AU1000_RTC_INT, INTC_INT_RISE_EDGE, 0 },
43 + { AU1000_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
44 + { AU1000_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
45 + { AU1000_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
46 { AU1200_NAND_INT, INTC_INT_RISE_EDGE, 0},
47 { AU1200_USB_INT, INTC_INT_HIGH_LEVEL, 0 },
48 { AU1200_LCD_INT, INTC_INT_HIGH_LEVEL, 0},
49 --- a/arch/mips/au1000/common/cputable.c
50 +++ b/arch/mips/au1000/common/cputable.c
51 @@ -39,7 +39,8 @@ struct cpu_spec cpu_specs[] = {
52 { 0xffffffff, 0x02030203, "Au1100 BD", 0, 1 },
53 { 0xffffffff, 0x02030204, "Au1100 BE", 0, 1 },
54 { 0xffffffff, 0x03030200, "Au1550 AA", 0, 1 },
55 - { 0xffffffff, 0x04030200, "Au1200 AA", 0, 1 },
56 + { 0xffffffff, 0x04030200, "Au1200 AB", 0, 0 },
57 + { 0xffffffff, 0x04030201, "Au1200 AC", 0, 0 },
58 { 0x00000000, 0x00000000, "Unknown Au1xxx", 1, 0 },
61 --- a/arch/mips/au1000/common/dbdma.c
62 +++ b/arch/mips/au1000/common/dbdma.c
64 #include <asm/au1xxx_dbdma.h>
65 #include <asm/system.h>
67 +#include <linux/module.h>
69 #if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200)
72 @@ -60,37 +62,10 @@ static spinlock_t au1xxx_dbdma_spin_lock
74 #define ALIGN_ADDR(x, a) ((((u32)(x)) + (a-1)) & ~(a-1))
76 -static volatile dbdma_global_t *dbdma_gptr = (dbdma_global_t *)DDMA_GLOBAL_BASE;
77 -static int dbdma_initialized;
78 +static dbdma_global_t *dbdma_gptr = (dbdma_global_t *)DDMA_GLOBAL_BASE;
79 +static int dbdma_initialized=0;
80 static void au1xxx_dbdma_init(void);
82 -typedef struct dbdma_device_table {
87 - u32 dev_physaddr; /* If FIFO */
89 - u32 dev_intpolarity;
92 -typedef struct dbdma_chan_config {
95 - dbdev_tab_t *chan_src;
96 - dbdev_tab_t *chan_dest;
97 - au1x_dma_chan_t *chan_ptr;
98 - au1x_ddma_desc_t *chan_desc_base;
99 - au1x_ddma_desc_t *get_ptr, *put_ptr, *cur_ptr;
100 - void *chan_callparam;
101 - void (*chan_callback)(int, void *, struct pt_regs *);
104 -#define DEV_FLAGS_INUSE (1 << 0)
105 -#define DEV_FLAGS_ANYUSE (1 << 1)
106 -#define DEV_FLAGS_OUT (1 << 2)
107 -#define DEV_FLAGS_IN (1 << 3)
109 static dbdev_tab_t dbdev_tab[] = {
110 #ifdef CONFIG_SOC_AU1550
112 @@ -156,13 +131,13 @@ static dbdev_tab_t dbdev_tab[] = {
113 { DSCR_CMD0_MAE_BOTH, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
114 { DSCR_CMD0_LCD, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
116 - { DSCR_CMD0_SDMS_TX0, DEV_FLAGS_OUT, 0, 0, 0x00000000, 0, 0 },
117 - { DSCR_CMD0_SDMS_RX0, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
118 - { DSCR_CMD0_SDMS_TX1, DEV_FLAGS_OUT, 0, 0, 0x00000000, 0, 0 },
119 - { DSCR_CMD0_SDMS_RX1, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
120 + { DSCR_CMD0_SDMS_TX0, DEV_FLAGS_OUT, 4, 8, 0x10600000, 0, 0 },
121 + { DSCR_CMD0_SDMS_RX0, DEV_FLAGS_IN, 4, 8, 0x10600004, 0, 0 },
122 + { DSCR_CMD0_SDMS_TX1, DEV_FLAGS_OUT, 4, 8, 0x10680000, 0, 0 },
123 + { DSCR_CMD0_SDMS_RX1, DEV_FLAGS_IN, 4, 8, 0x10680004, 0, 0 },
125 - { DSCR_CMD0_AES_TX, DEV_FLAGS_OUT, 0, 0, 0x00000000, 0, 0 },
126 - { DSCR_CMD0_AES_RX, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
127 + { DSCR_CMD0_AES_RX, DEV_FLAGS_IN , 4, 32, 0x10300008, 0, 0 },
128 + { DSCR_CMD0_AES_TX, DEV_FLAGS_OUT, 4, 32, 0x10300004, 0, 0 },
130 { DSCR_CMD0_PSC0_TX, DEV_FLAGS_OUT, 0, 0, 0x11a0001c, 0, 0 },
131 { DSCR_CMD0_PSC0_RX, DEV_FLAGS_IN, 0, 0, 0x11a0001c, 0, 0 },
132 @@ -172,9 +147,9 @@ static dbdev_tab_t dbdev_tab[] = {
133 { DSCR_CMD0_PSC1_RX, DEV_FLAGS_IN, 0, 0, 0x11b0001c, 0, 0 },
134 { DSCR_CMD0_PSC1_SYNC, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
136 - { DSCR_CMD0_CIM_RXA, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
137 - { DSCR_CMD0_CIM_RXB, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
138 - { DSCR_CMD0_CIM_RXC, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
139 + { DSCR_CMD0_CIM_RXA, DEV_FLAGS_IN, 0, 32, 0x14004020, 0, 0 },
140 + { DSCR_CMD0_CIM_RXB, DEV_FLAGS_IN, 0, 32, 0x14004040, 0, 0 },
141 + { DSCR_CMD0_CIM_RXC, DEV_FLAGS_IN, 0, 32, 0x14004060, 0, 0 },
142 { DSCR_CMD0_CIM_SYNC, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
144 { DSCR_CMD0_NAND_FLASH, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
145 @@ -183,6 +158,24 @@ static dbdev_tab_t dbdev_tab[] = {
147 { DSCR_CMD0_THROTTLE, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
148 { DSCR_CMD0_ALWAYS, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
150 + /* Provide 16 user definable device types */
151 + { 0, 0, 0, 0, 0, 0, 0 },
152 + { 0, 0, 0, 0, 0, 0, 0 },
153 + { 0, 0, 0, 0, 0, 0, 0 },
154 + { 0, 0, 0, 0, 0, 0, 0 },
155 + { 0, 0, 0, 0, 0, 0, 0 },
156 + { 0, 0, 0, 0, 0, 0, 0 },
157 + { 0, 0, 0, 0, 0, 0, 0 },
158 + { 0, 0, 0, 0, 0, 0, 0 },
159 + { 0, 0, 0, 0, 0, 0, 0 },
160 + { 0, 0, 0, 0, 0, 0, 0 },
161 + { 0, 0, 0, 0, 0, 0, 0 },
162 + { 0, 0, 0, 0, 0, 0, 0 },
163 + { 0, 0, 0, 0, 0, 0, 0 },
164 + { 0, 0, 0, 0, 0, 0, 0 },
165 + { 0, 0, 0, 0, 0, 0, 0 },
166 + { 0, 0, 0, 0, 0, 0, 0 },
169 #define DBDEV_TAB_SIZE (sizeof(dbdev_tab) / sizeof(dbdev_tab_t))
170 @@ -202,6 +195,30 @@ find_dbdev_id (u32 id)
175 +au1xxx_ddma_add_device(dbdev_tab_t *dev)
178 + dbdev_tab_t *p=NULL;
179 + static u16 new_id=0x1000;
181 + p = find_dbdev_id(0);
184 + memcpy(p, dev, sizeof(dbdev_tab_t));
185 + p->dev_id = DSCR_DEV2CUSTOM_ID(new_id,dev->dev_id);
189 + printk("add_device: id:%x flags:%x padd:%x\n",
190 + p->dev_id, p->dev_flags, p->dev_physaddr );
196 +EXPORT_SYMBOL(au1xxx_ddma_add_device);
198 /* Allocate a channel and return a non-zero descriptor if successful.
201 @@ -214,7 +231,7 @@ au1xxx_dbdma_chan_alloc(u32 srcid, u32 d
203 dbdev_tab_t *stp, *dtp;
205 - volatile au1x_dma_chan_t *cp;
206 + au1x_dma_chan_t *cp;
208 /* We do the intialization on the first channel allocation.
209 * We have to wait because of the interrupt handler initialization
210 @@ -224,9 +241,6 @@ au1xxx_dbdma_chan_alloc(u32 srcid, u32 d
212 dbdma_initialized = 1;
214 - if ((srcid > DSCR_NDEV_IDS) || (destid > DSCR_NDEV_IDS))
217 if ((stp = find_dbdev_id(srcid)) == NULL) return 0;
218 if ((dtp = find_dbdev_id(destid)) == NULL) return 0;
220 @@ -268,9 +282,9 @@ au1xxx_dbdma_chan_alloc(u32 srcid, u32 d
221 /* If kmalloc fails, it is caught below same
222 * as a channel not available.
224 - ctp = (chan_tab_t *)kmalloc(sizeof(chan_tab_t), GFP_KERNEL);
225 + ctp = (chan_tab_t *)
226 + kmalloc(sizeof(chan_tab_t), GFP_KERNEL);
227 chan_tab_ptr[i] = ctp;
228 - ctp->chan_index = chan = i;
232 @@ -278,10 +292,11 @@ au1xxx_dbdma_chan_alloc(u32 srcid, u32 d
235 memset(ctp, 0, sizeof(chan_tab_t));
236 + ctp->chan_index = chan = i;
237 dcp = DDMA_CHANNEL_BASE;
238 dcp += (0x0100 * chan);
239 ctp->chan_ptr = (au1x_dma_chan_t *)dcp;
240 - cp = (volatile au1x_dma_chan_t *)dcp;
241 + cp = (au1x_dma_chan_t *)dcp;
243 ctp->chan_dest = dtp;
244 ctp->chan_callback = callback;
245 @@ -298,6 +313,9 @@ au1xxx_dbdma_chan_alloc(u32 srcid, u32 d
247 if (dtp->dev_intpolarity)
249 + if ((stp->dev_flags & DEV_FLAGS_SYNC) ||
250 + (dtp->dev_flags & DEV_FLAGS_SYNC))
251 + i |= DDMA_CFG_SYNC;
255 @@ -308,14 +326,14 @@ au1xxx_dbdma_chan_alloc(u32 srcid, u32 d
256 rv = (u32)(&chan_tab_ptr[chan]);
259 - /* Release devices.
261 + /* Release devices */
262 stp->dev_flags &= ~DEV_FLAGS_INUSE;
263 dtp->dev_flags &= ~DEV_FLAGS_INUSE;
268 +EXPORT_SYMBOL(au1xxx_dbdma_chan_alloc);
270 /* Set the device width if source or destination is a FIFO.
271 * Should be 8, 16, or 32 bits.
272 @@ -343,6 +361,7 @@ au1xxx_dbdma_set_devwidth(u32 chanid, in
276 +EXPORT_SYMBOL(au1xxx_dbdma_set_devwidth);
278 /* Allocate a descriptor ring, initializing as much as possible.
280 @@ -369,7 +388,8 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int
281 * and if we try that first we are likely to not waste larger
284 - desc_base = (u32)kmalloc(entries * sizeof(au1x_ddma_desc_t), GFP_KERNEL);
285 + desc_base = (u32)kmalloc(entries * sizeof(au1x_ddma_desc_t),
286 + GFP_KERNEL|GFP_DMA);
290 @@ -380,7 +400,7 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int
291 kfree((const void *)desc_base);
292 i = entries * sizeof(au1x_ddma_desc_t);
293 i += (sizeof(au1x_ddma_desc_t) - 1);
294 - if ((desc_base = (u32)kmalloc(i, GFP_KERNEL)) == 0)
295 + if ((desc_base = (u32)kmalloc(i, GFP_KERNEL|GFP_DMA)) == 0)
298 desc_base = ALIGN_ADDR(desc_base, sizeof(au1x_ddma_desc_t));
299 @@ -460,9 +480,14 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int
300 /* If source input is fifo, set static address.
302 if (stp->dev_flags & DEV_FLAGS_IN) {
303 - src0 = stp->dev_physaddr;
304 - src1 |= DSCR_SRC1_SAM(DSCR_xAM_STATIC);
305 + if ( stp->dev_flags & DEV_FLAGS_BURSTABLE )
306 + src1 |= DSCR_SRC1_SAM(DSCR_xAM_BURST);
308 + src1 |= DSCR_SRC1_SAM(DSCR_xAM_STATIC);
311 + if (stp->dev_physaddr)
312 + src0 = stp->dev_physaddr;
314 /* Set up dest1. For now, assume no stride and increment.
315 * A channel attribute update can change this later.
316 @@ -486,10 +511,18 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int
317 /* If destination output is fifo, set static address.
319 if (dtp->dev_flags & DEV_FLAGS_OUT) {
320 - dest0 = dtp->dev_physaddr;
321 + if ( dtp->dev_flags & DEV_FLAGS_BURSTABLE )
322 + dest1 |= DSCR_DEST1_DAM(DSCR_xAM_BURST);
324 dest1 |= DSCR_DEST1_DAM(DSCR_xAM_STATIC);
326 + if (dtp->dev_physaddr)
327 + dest0 = dtp->dev_physaddr;
330 + printk("did:%x sid:%x cmd0:%x cmd1:%x source0:%x source1:%x dest0:%x dest1:%x\n",
331 + dtp->dev_id, stp->dev_id, cmd0, cmd1, src0, src1, dest0, dest1 );
333 for (i=0; i<entries; i++) {
334 dp->dscr_cmd0 = cmd0;
335 dp->dscr_cmd1 = cmd1;
336 @@ -498,6 +531,7 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int
337 dp->dscr_dest0 = dest0;
338 dp->dscr_dest1 = dest1;
340 + dp->sw_context = dp->sw_status = 0;
341 dp->dscr_nxtptr = DSCR_NXTPTR(virt_to_phys(dp + 1));
344 @@ -510,13 +544,14 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int
346 return (u32)(ctp->chan_desc_base);
348 +EXPORT_SYMBOL(au1xxx_dbdma_ring_alloc);
350 /* Put a source buffer into the DMA ring.
351 * This updates the source pointer and byte count. Normally used
352 * for memory to fifo transfers.
355 -au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes)
356 +_au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags)
359 au1x_ddma_desc_t *dp;
360 @@ -543,24 +578,40 @@ au1xxx_dbdma_put_source(u32 chanid, void
362 dp->dscr_source0 = virt_to_phys(buf);
363 dp->dscr_cmd1 = nbytes;
364 - dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
365 - ctp->chan_ptr->ddma_dbell = 0xffffffff; /* Make it go */
368 + if (flags & DDMA_FLAGS_IE)
369 + dp->dscr_cmd0 |= DSCR_CMD0_IE;
370 + if (flags & DDMA_FLAGS_NOIE)
371 + dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
372 /* Get next descriptor pointer.
374 ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
377 + * There is an errata on the Au1200/Au1550 parts that could result
378 + * in "stale" data being DMA'd. It has to do with the snoop logic on
379 + * the dache eviction buffer. NONCOHERENT_IO is on by default for
380 + * these parts. If it is fixedin the future, these dma_cache_inv will
381 + * just be nothing more than empty macros. See io.h.
383 + dma_cache_wback_inv(buf,nbytes);
384 + dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
386 + dma_cache_wback_inv(dp, sizeof(dp));
387 + ctp->chan_ptr->ddma_dbell = 0;
389 /* return something not zero.
393 +EXPORT_SYMBOL(_au1xxx_dbdma_put_source);
395 /* Put a destination buffer into the DMA ring.
396 * This updates the destination pointer and byte count. Normally used
397 * to place an empty buffer into the ring for fifo to memory transfers.
400 -au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes)
401 +_au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags)
404 au1x_ddma_desc_t *dp;
405 @@ -582,11 +633,33 @@ au1xxx_dbdma_put_dest(u32 chanid, void *
406 if (dp->dscr_cmd0 & DSCR_CMD0_V)
409 - /* Load up buffer address and byte count.
411 + /* Load up buffer address and byte count */
414 + if (flags & DDMA_FLAGS_IE)
415 + dp->dscr_cmd0 |= DSCR_CMD0_IE;
416 + if (flags & DDMA_FLAGS_NOIE)
417 + dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
419 dp->dscr_dest0 = virt_to_phys(buf);
420 dp->dscr_cmd1 = nbytes;
422 + printk("cmd0:%x cmd1:%x source0:%x source1:%x dest0:%x dest1:%x\n",
423 + dp->dscr_cmd0, dp->dscr_cmd1, dp->dscr_source0,
424 + dp->dscr_source1, dp->dscr_dest0, dp->dscr_dest1 );
427 + * There is an errata on the Au1200/Au1550 parts that could result in
428 + * "stale" data being DMA'd. It has to do with the snoop logic on the
429 + * dache eviction buffer. NONCOHERENT_IO is on by default for these
430 + * parts. If it is fixedin the future, these dma_cache_inv will just
431 + * be nothing more than empty macros. See io.h.
433 + dma_cache_inv(buf,nbytes);
434 dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
436 + dma_cache_wback_inv(dp, sizeof(dp));
437 + ctp->chan_ptr->ddma_dbell = 0;
439 /* Get next descriptor pointer.
441 @@ -596,6 +669,7 @@ au1xxx_dbdma_put_dest(u32 chanid, void *
445 +EXPORT_SYMBOL(_au1xxx_dbdma_put_dest);
447 /* Get a destination buffer into the DMA ring.
448 * Normally used to get a full buffer from the ring during fifo
449 @@ -645,7 +719,7 @@ void
450 au1xxx_dbdma_stop(u32 chanid)
453 - volatile au1x_dma_chan_t *cp;
454 + au1x_dma_chan_t *cp;
455 int halt_timeout = 0;
457 ctp = *((chan_tab_t **)chanid);
458 @@ -665,6 +739,7 @@ au1xxx_dbdma_stop(u32 chanid)
459 cp->ddma_stat |= (DDMA_STAT_DB | DDMA_STAT_V);
462 +EXPORT_SYMBOL(au1xxx_dbdma_stop);
464 /* Start using the current descriptor pointer. If the dbdma encounters
465 * a not valid descriptor, it will stop. In this case, we can just
466 @@ -674,17 +749,17 @@ void
467 au1xxx_dbdma_start(u32 chanid)
470 - volatile au1x_dma_chan_t *cp;
471 + au1x_dma_chan_t *cp;
473 ctp = *((chan_tab_t **)chanid);
476 cp->ddma_desptr = virt_to_phys(ctp->cur_ptr);
477 cp->ddma_cfg |= DDMA_CFG_EN; /* Enable channel */
479 - cp->ddma_dbell = 0xffffffff; /* Make it go */
480 + cp->ddma_dbell = 0;
483 +EXPORT_SYMBOL(au1xxx_dbdma_start);
486 au1xxx_dbdma_reset(u32 chanid)
487 @@ -703,15 +778,21 @@ au1xxx_dbdma_reset(u32 chanid)
490 dp->dscr_cmd0 &= ~DSCR_CMD0_V;
491 + /* reset our SW status -- this is used to determine
492 + * if a descriptor is in use by upper level SW. Since
493 + * posting can reset 'V' bit.
496 dp = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
497 } while (dp != ctp->chan_desc_base);
499 +EXPORT_SYMBOL(au1xxx_dbdma_reset);
502 au1xxx_get_dma_residue(u32 chanid)
505 - volatile au1x_dma_chan_t *cp;
506 + au1x_dma_chan_t *cp;
509 ctp = *((chan_tab_t **)chanid);
510 @@ -746,15 +827,16 @@ au1xxx_dbdma_chan_free(u32 chanid)
514 +EXPORT_SYMBOL(au1xxx_dbdma_chan_free);
517 dbdma_interrupt(int irq, void *dev_id, struct pt_regs *regs)
520 + u32 intstat, flags;
523 au1x_ddma_desc_t *dp;
524 - volatile au1x_dma_chan_t *cp;
525 + au1x_dma_chan_t *cp;
527 intstat = dbdma_gptr->ddma_intstat;
529 @@ -773,18 +855,26 @@ dbdma_interrupt(int irq, void *dev_id, s
530 (ctp->chan_callback)(irq, ctp->chan_callparam, regs);
532 ctp->cur_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
537 -au1xxx_dbdma_init(void)
538 +static void au1xxx_dbdma_init(void)
542 dbdma_gptr->ddma_config = 0;
543 dbdma_gptr->ddma_throttle = 0;
544 dbdma_gptr->ddma_inten = 0xffff;
547 - if (request_irq(AU1550_DDMA_INT, dbdma_interrupt, SA_INTERRUPT,
548 +#if defined(CONFIG_SOC_AU1550)
549 + irq_nr = AU1550_DDMA_INT;
550 +#elif defined(CONFIG_SOC_AU1200)
551 + irq_nr = AU1200_DDMA_INT;
553 + #error Unknown Au1x00 SOC
556 + if (request_irq(irq_nr, dbdma_interrupt, SA_INTERRUPT,
557 "Au1xxx dbdma", (void *)dbdma_gptr))
558 printk("Can't get 1550 dbdma irq");
560 @@ -795,7 +885,8 @@ au1xxx_dbdma_dump(u32 chanid)
562 au1x_ddma_desc_t *dp;
563 dbdev_tab_t *stp, *dtp;
564 - volatile au1x_dma_chan_t *cp;
565 + au1x_dma_chan_t *cp;
568 ctp = *((chan_tab_t **)chanid);
570 @@ -820,15 +911,64 @@ au1xxx_dbdma_dump(u32 chanid)
571 dp = ctp->chan_desc_base;
574 - printk("dp %08x, cmd0 %08x, cmd1 %08x\n",
575 - (u32)dp, dp->dscr_cmd0, dp->dscr_cmd1);
576 - printk("src0 %08x, src1 %08x, dest0 %08x\n",
577 - dp->dscr_source0, dp->dscr_source1, dp->dscr_dest0);
578 - printk("dest1 %08x, stat %08x, nxtptr %08x\n",
579 - dp->dscr_dest1, dp->dscr_stat, dp->dscr_nxtptr);
580 + printk("Dp[%d]= %08x, cmd0 %08x, cmd1 %08x\n",
581 + i++, (u32)dp, dp->dscr_cmd0, dp->dscr_cmd1);
582 + printk("src0 %08x, src1 %08x, dest0 %08x, dest1 %08x\n",
583 + dp->dscr_source0, dp->dscr_source1, dp->dscr_dest0, dp->dscr_dest1);
584 + printk("stat %08x, nxtptr %08x\n",
585 + dp->dscr_stat, dp->dscr_nxtptr);
586 dp = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
587 } while (dp != ctp->chan_desc_base);
590 +/* Put a descriptor into the DMA ring.
591 + * This updates the source/destination pointers and byte count.
594 +au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr )
597 + au1x_ddma_desc_t *dp;
600 + /* I guess we could check this to be within the
601 + * range of the table......
603 + ctp = *((chan_tab_t **)chanid);
605 + /* We should have multiple callers for a particular channel,
606 + * an interrupt doesn't affect this pointer nor the descriptor,
607 + * so no locking should be needed.
611 + /* If the descriptor is valid, we are way ahead of the DMA
612 + * engine, so just return an error condition.
614 + if (dp->dscr_cmd0 & DSCR_CMD0_V)
617 + /* Load up buffer addresses and byte count.
619 + dp->dscr_dest0 = dscr->dscr_dest0;
620 + dp->dscr_source0 = dscr->dscr_source0;
621 + dp->dscr_dest1 = dscr->dscr_dest1;
622 + dp->dscr_source1 = dscr->dscr_source1;
623 + dp->dscr_cmd1 = dscr->dscr_cmd1;
624 + nbytes = dscr->dscr_cmd1;
625 + /* Allow the caller to specifiy if an interrupt is generated */
626 + dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
627 + dp->dscr_cmd0 |= dscr->dscr_cmd0 | DSCR_CMD0_V;
628 + ctp->chan_ptr->ddma_dbell = 0;
630 + /* Get next descriptor pointer.
632 + ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
634 + /* return something not zero.
639 #endif /* defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200) */
642 +++ b/arch/mips/au1000/common/gpio.c
645 + * This program is free software; you can redistribute it and/or modify it
646 + * under the terms of the GNU General Public License as published by the
647 + * Free Software Foundation; either version 2 of the License, or (at your
648 + * option) any later version.
650 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
651 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
652 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
653 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
654 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
655 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
656 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
657 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
658 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
659 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
661 + * You should have received a copy of the GNU General Public License along
662 + * with this program; if not, write to the Free Software Foundation, Inc.,
663 + * 675 Mass Ave, Cambridge, MA 02139, USA.
666 +#include <asm/au1000.h>
667 +#include <asm/au1xxx_gpio.h>
670 +#if !defined(CONFIG_SOC_AU1000)
671 +static AU1X00_GPIO2 * const gpio2 = (AU1X00_GPIO2 *)GPIO2_BASE;
673 +#define GPIO2_OUTPUT_ENABLE_MASK 0x00010000
675 +int au1xxx_gpio2_read(int signal)
678 +/* gpio2->dir &= ~(0x01 << signal); //Set GPIO to input */
679 + return ((gpio2->pinstate >> signal) & 0x01);
682 +void au1xxx_gpio2_write(int signal, int value)
686 + gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << signal) |
690 +void au1xxx_gpio2_tristate(int signal)
693 + gpio2->dir &= ~(0x01 << signal); /* Set GPIO to input */
697 +int au1xxx_gpio1_read(int signal)
699 +/* gpio1->trioutclr |= (0x01 << signal); */
700 + return ((gpio1->pinstaterd >> signal) & 0x01);
703 +void au1xxx_gpio1_write(int signal, int value)
706 + gpio1->outputset = (0x01 << signal);
708 + gpio1->outputclr = (0x01 << signal); /* Output a Zero */
711 +void au1xxx_gpio1_tristate(int signal)
713 + gpio1->trioutclr = (0x01 << signal); /* Tristate signal */
717 +int au1xxx_gpio_read(int signal)
720 +#if defined(CONFIG_SOC_AU1000)
723 + return au1xxx_gpio2_read(signal);
726 + return au1xxx_gpio1_read(signal);
729 +void au1xxx_gpio_write(int signal, int value)
732 +#if defined(CONFIG_SOC_AU1000)
735 + au1xxx_gpio2_write(signal, value);
738 + au1xxx_gpio1_write(signal, value);
741 +void au1xxx_gpio_tristate(int signal)
744 +#if defined(CONFIG_SOC_AU1000)
747 + au1xxx_gpio2_tristate(signal);
750 + au1xxx_gpio1_tristate(signal);
753 +void au1xxx_gpio1_set_inputs(void)
755 + gpio1->pininputen = 0;
758 +EXPORT_SYMBOL(au1xxx_gpio1_set_inputs);
759 +EXPORT_SYMBOL(au1xxx_gpio_tristate);
760 +EXPORT_SYMBOL(au1xxx_gpio_write);
761 +EXPORT_SYMBOL(au1xxx_gpio_read);
762 --- a/arch/mips/au1000/common/irq.c
763 +++ b/arch/mips/au1000/common/irq.c
764 @@ -303,8 +303,30 @@ static struct hw_interrupt_type level_ir
768 -void startup_match20_interrupt(void)
769 +void startup_match20_interrupt(void (*handler)(int, void *, struct pt_regs *))
771 + static struct irqaction action;
772 + /* This is a big problem.... since we didn't use request_irq
773 + when kernel/irq.c calls probe_irq_xxx this interrupt will
774 + be probed for usage. This will end up disabling the device :(
776 + Give it a bogus "action" pointer -- this will keep it from
777 + getting auto-probed!
779 + By setting the status to match that of request_irq() we
780 + can avoid it. --cgray
782 + action.dev_id = handler;
785 + action.name = "Au1xxx TOY";
786 + action.handler = handler;
787 + action.next = NULL;
789 + irq_desc[AU1000_TOY_MATCH2_INT].action = &action;
790 + irq_desc[AU1000_TOY_MATCH2_INT].status
791 + &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
793 local_enable_irq(AU1000_TOY_MATCH2_INT);
796 @@ -508,6 +530,7 @@ void intc0_req0_irqdispatch(struct pt_re
798 if (!intc0_req0) return;
800 +#ifdef AU1000_USB_DEV_REQ_INT
802 * Because of the tight timing of SETUP token to reply
803 * transactions, the USB devices-side packet complete
804 @@ -518,6 +541,7 @@ void intc0_req0_irqdispatch(struct pt_re
805 do_IRQ(AU1000_USB_DEV_REQ_INT, regs);
810 irq = au_ffs(intc0_req0) - 1;
811 intc0_req0 &= ~(1<<irq);
812 @@ -536,17 +560,7 @@ void intc0_req1_irqdispatch(struct pt_re
814 irq = au_ffs(intc0_req1) - 1;
815 intc0_req1 &= ~(1<<irq);
817 - if (irq == AU1000_TOY_MATCH2_INT) {
818 - mask_and_ack_rise_edge_irq(irq);
819 - counter0_irq(irq, NULL, regs);
820 - local_enable_irq(irq);
831 --- a/arch/mips/au1000/common/Makefile
832 +++ b/arch/mips/au1000/common/Makefile
833 @@ -19,9 +19,9 @@ O_TARGET := au1000.o
834 export-objs = prom.o clocks.o power.o usbdev.o
836 obj-y := prom.o int-handler.o irq.o puts.o time.o reset.o cputable.o \
837 - au1xxx_irqmap.o clocks.o power.o setup.o sleeper.o dma.o dbdma.o
838 + au1xxx_irqmap.o clocks.o power.o setup.o sleeper.o dma.o dbdma.o gpio.o
840 -export-objs += dma.o dbdma.o
841 +export-objs += dma.o dbdma.o gpio.o
843 obj-$(CONFIG_AU1X00_USB_DEVICE) += usbdev.o
844 obj-$(CONFIG_KGDB) += dbg_io.o
845 --- a/arch/mips/au1000/common/pci_fixup.c
846 +++ b/arch/mips/au1000/common/pci_fixup.c
847 @@ -75,9 +75,13 @@ void __init pcibios_fixup(void)
849 #ifdef CONFIG_NONCOHERENT_IO
851 - * Set the NC bit in controller for pre-AC silicon
852 + * Set the NC bit in controller for Au1500 pre-AC silicon
854 - au_writel( 1<<16 | au_readl(Au1500_PCI_CFG), Au1500_PCI_CFG);
855 + u32 prid = read_c0_prid();
856 + if ( (prid & 0xFF000000) == 0x01000000 && prid < 0x01030202) {
857 + au_writel( 1<<16 | au_readl(Au1500_PCI_CFG), Au1500_PCI_CFG);
858 + printk("Non-coherent PCI accesses enabled\n");
860 printk("Non-coherent PCI accesses enabled\n");
863 --- a/arch/mips/au1000/common/pci_ops.c
864 +++ b/arch/mips/au1000/common/pci_ops.c
865 @@ -162,6 +162,7 @@ unsigned long last_entryLo0, last_entryL
866 static int config_access(unsigned char access_type, struct pci_dev *dev,
867 unsigned char where, u32 * data)
869 + int error = PCIBIOS_SUCCESSFUL;
870 #if defined( CONFIG_SOC_AU1500 ) || defined( CONFIG_SOC_AU1550 )
871 unsigned char bus = dev->bus->number;
872 unsigned int dev_fn = dev->devfn;
873 @@ -170,7 +171,6 @@ static int config_access(unsigned char a
874 unsigned long offset, status;
875 unsigned long cfg_base;
877 - int error = PCIBIOS_SUCCESSFUL;
878 unsigned long entryLo0, entryLo1;
881 @@ -205,9 +205,8 @@ static int config_access(unsigned char a
882 last_entryLo0 = last_entryLo1 = 0xffffffff;
885 - /* Since the Au1xxx doesn't do the idsel timing exactly to spec,
886 - * many board vendors implement their own off-chip idsel, so call
887 - * it now. If it doesn't succeed, may as well bail out at this point.
888 + /* Allow board vendors to implement their own off-chip idsel.
889 + * If it doesn't succeed, may as well bail out at this point.
891 if (board_pci_idsel) {
892 if (board_pci_idsel(device, 1) == 0) {
893 @@ -271,8 +270,11 @@ static int config_access(unsigned char a
896 local_irq_restore(flags);
899 + /* Fake out Config space access with no responder */
900 + *data = 0xFFFFFFFF;
906 --- a/arch/mips/au1000/common/power.c
907 +++ b/arch/mips/au1000/common/power.c
910 static void calibrate_delay(void);
912 -extern void set_au1x00_speed(unsigned int new_freq);
913 extern unsigned int get_au1x00_speed(void);
914 extern unsigned long get_au1x00_uart_baud_base(void);
915 extern void set_au1x00_uart_baud_base(unsigned long new_baud_base);
916 @@ -116,6 +115,7 @@ save_core_regs(void)
917 sleep_uart0_clkdiv = au_readl(UART0_ADDR + UART_CLK);
918 sleep_uart0_enable = au_readl(UART0_ADDR + UART_MOD_CNTRL);
920 +#ifndef CONFIG_SOC_AU1200
921 /* Shutdown USB host/device.
923 sleep_usbhost_enable = au_readl(USB_HOST_CONFIG);
924 @@ -127,6 +127,7 @@ save_core_regs(void)
926 sleep_usbdev_enable = au_readl(USBD_ENABLE);
927 au_writel(0, USBD_ENABLE); au_sync();
930 /* Save interrupt controller state.
932 @@ -212,14 +213,12 @@ void wakeup_from_suspend(void)
935 unsigned long wakeup, flags;
936 - extern void save_and_sleep(void);
937 + extern unsigned int save_and_sleep(void);
939 spin_lock_irqsave(&pm_lock,flags);
945 /** The code below is all system dependent and we should probably
946 ** have a function call out of here to set this up. You need
947 ** to configure the GPIO or timer interrupts that will bring
948 @@ -227,27 +226,26 @@ int au_sleep(void)
949 ** For testing, the TOY counter wakeup is useful.
954 au_writel(au_readl(SYS_PINSTATERD) & ~(1 << 11), SYS_PINSTATERD);
956 /* gpio 6 can cause a wake up event */
957 wakeup = au_readl(SYS_WAKEMSK);
958 wakeup &= ~(1 << 8); /* turn off match20 wakeup */
959 - wakeup |= 1 << 6; /* turn on gpio 6 wakeup */
960 + wakeup = 1 << 5; /* turn on gpio 6 wakeup */
962 - /* For testing, allow match20 to wake us up.
964 + /* For testing, allow match20 to wake us up. */
965 #ifdef SLEEP_TEST_TIMEOUT
966 wakeup_counter0_set(sleep_ticks);
968 wakeup = 1 << 8; /* turn on match20 wakeup */
971 - au_writel(1, SYS_WAKESRC); /* clear cause */
972 + au_writel(0, SYS_WAKESRC); /* clear cause */
974 au_writel(wakeup, SYS_WAKEMSK);
977 + DPRINTK("Entering sleep!\n");
980 /* after a wakeup, the cpu vectors back to 0x1fc00000 so
981 @@ -255,6 +253,7 @@ int au_sleep(void)
984 spin_unlock_irqrestore(&pm_lock, flags);
985 + DPRINTK("Leaving sleep!\n");
989 @@ -285,7 +284,6 @@ static int pm_do_sleep(ctl_table * ctl,
995 retval = pm_send_all(PM_RESUME, (void *) 0);
997 @@ -296,7 +294,6 @@ static int pm_do_suspend(ctl_table * ctl
998 void *buffer, size_t * len)
1001 - void au1k_wait(void);
1005 @@ -305,119 +302,9 @@ static int pm_do_suspend(ctl_table * ctl
1010 - retval = pm_send_all(PM_RESUME, (void *) 0);
1016 -static int pm_do_freq(ctl_table * ctl, int write, struct file *file,
1017 - void *buffer, size_t * len)
1019 - int retval = 0, i;
1020 - unsigned long val, pll;
1021 -#define TMPBUFLEN 64
1022 -#define MAX_CPU_FREQ 396
1023 - char buf[TMPBUFLEN], *p;
1024 - unsigned long flags, intc0_mask, intc1_mask;
1025 - unsigned long old_baud_base, old_cpu_freq, baud_rate, old_clk,
1027 - unsigned long new_baud_base, new_cpu_freq, new_clk, new_refresh;
1029 - spin_lock_irqsave(&pm_lock, flags);
1033 - /* Parse the new frequency */
1034 - if (*len > TMPBUFLEN - 1) {
1035 - spin_unlock_irqrestore(&pm_lock, flags);
1038 - if (copy_from_user(buf, buffer, *len)) {
1039 - spin_unlock_irqrestore(&pm_lock, flags);
1044 - val = simple_strtoul(p, &p, 0);
1045 - if (val > MAX_CPU_FREQ) {
1046 - spin_unlock_irqrestore(&pm_lock, flags);
1051 - if ((pll > 33) || (pll < 7)) { /* 396 MHz max, 84 MHz min */
1052 - /* revisit this for higher speed cpus */
1053 - spin_unlock_irqrestore(&pm_lock, flags);
1057 - old_baud_base = get_au1x00_uart_baud_base();
1058 - old_cpu_freq = get_au1x00_speed();
1060 - new_cpu_freq = pll * 12 * 1000000;
1061 - new_baud_base = (new_cpu_freq / (2 * ((int)(au_readl(SYS_POWERCTRL)&0x03) + 2) * 16));
1062 - set_au1x00_speed(new_cpu_freq);
1063 - set_au1x00_uart_baud_base(new_baud_base);
1065 - old_refresh = au_readl(MEM_SDREFCFG) & 0x1ffffff;
1067 - ((old_refresh * new_cpu_freq) /
1068 - old_cpu_freq) | (au_readl(MEM_SDREFCFG) & ~0x1ffffff);
1070 - au_writel(pll, SYS_CPUPLL);
1072 - au_writel(new_refresh, MEM_SDREFCFG);
1075 - for (i = 0; i < 4; i++) {
1077 - (UART_BASE + UART_MOD_CNTRL +
1078 - i * 0x00100000) == 3) {
1080 - au_readl(UART_BASE + UART_CLK +
1082 - // baud_rate = baud_base/clk
1083 - baud_rate = old_baud_base / old_clk;
1084 - /* we won't get an exact baud rate and the error
1085 - * could be significant enough that our new
1086 - * calculation will result in a clock that will
1087 - * give us a baud rate that's too far off from
1088 - * what we really want.
1090 - if (baud_rate > 100000)
1091 - baud_rate = 115200;
1092 - else if (baud_rate > 50000)
1093 - baud_rate = 57600;
1094 - else if (baud_rate > 30000)
1095 - baud_rate = 38400;
1096 - else if (baud_rate > 17000)
1097 - baud_rate = 19200;
1099 - (baud_rate = 9600);
1100 - // new_clk = new_baud_base/baud_rate
1101 - new_clk = new_baud_base / baud_rate;
1102 - au_writel(new_clk,
1103 - UART_BASE + UART_CLK +
1105 - au_sync_delay(10);
1108 + retval = pm_send_all(PM_RESUME, (void *) 0);
1112 - /* We don't want _any_ interrupts other than
1113 - * match20. Otherwise our calibrate_delay()
1114 - * calculation will be off, potentially a lot.
1116 - intc0_mask = save_local_and_disable(0);
1117 - intc1_mask = save_local_and_disable(1);
1118 - local_enable_irq(AU1000_TOY_MATCH2_INT);
1119 - spin_unlock_irqrestore(&pm_lock, flags);
1120 - calibrate_delay();
1121 - restore_local_and_enable(0, intc0_mask);
1122 - restore_local_and_enable(1, intc1_mask);
1126 @@ -425,7 +312,6 @@ static int pm_do_freq(ctl_table * ctl, i
1127 static struct ctl_table pm_table[] = {
1128 {ACPI_S1_SLP_TYP, "suspend", NULL, 0, 0600, NULL, &pm_do_suspend},
1129 {ACPI_SLEEP, "sleep", NULL, 0, 0600, NULL, &pm_do_sleep},
1130 - {CTL_ACPI, "freq", NULL, 0, 0600, NULL, &pm_do_freq},
1134 --- a/arch/mips/au1000/common/reset.c
1135 +++ b/arch/mips/au1000/common/reset.c
1137 #include <asm/system.h>
1138 #include <asm/au1000.h>
1140 -extern int au_sleep(void);
1142 void au1000_restart(char *command)
1144 /* Set all integrated peripherals to disabled states */
1145 @@ -144,6 +142,26 @@ void au1000_restart(char *command)
1146 au_writel(0x00, 0xb1900064); /* sys_auxpll */
1147 au_writel(0x00, 0xb1900100); /* sys_pininputen */
1149 + case 0x04000000: /* Au1200 */
1150 + au_writel(0x00, 0xb400300c); /* ddma */
1151 + au_writel(0x00, 0xb1a00004); /* psc 0 */
1152 + au_writel(0x00, 0xb1b00004); /* psc 1 */
1153 + au_writel(0x00d02000, 0xb4020004); /* ehci, ohci, udc, otg */
1154 + au_writel(0x00, 0xb5000004); /* lcd */
1155 + au_writel(0x00, 0xb060000c); /* sd0 */
1156 + au_writel(0x00, 0xb068000c); /* sd1 */
1157 + au_writel(0x00, 0xb1100100); /* swcnt */
1158 + au_writel(0x00, 0xb0300000); /* aes */
1159 + au_writel(0x00, 0xb4004000); /* cim */
1160 + au_writel(0x00, 0xb1100100); /* uart0_enable */
1161 + au_writel(0x00, 0xb1200100); /* uart1_enable */
1162 + au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */
1163 + au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */
1164 + au_writel(0x00, 0xb1900028); /* sys_clksrc */
1165 + au_writel(0x10, 0xb1900060); /* sys_cpupll */
1166 + au_writel(0x00, 0xb1900064); /* sys_auxpll */
1167 + au_writel(0x00, 0xb1900100); /* sys_pininputen */
1172 @@ -163,32 +181,23 @@ void au1000_restart(char *command)
1174 void au1000_halt(void)
1176 -#if defined(CONFIG_MIPS_PB1550)
1177 - /* power off system */
1178 - printk("\n** Powering off Pb1550\n");
1179 - au_writew(au_readw(0xAF00001C) | (3<<14), 0xAF00001C);
1181 - while(1); /* should not get here */
1183 - printk(KERN_NOTICE "\n** You can safely turn off the power\n");
1184 -#ifdef CONFIG_MIPS_MIRAGE
1185 - au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT);
1190 - /* should not get here */
1191 - printk(KERN_ERR "Unable to put cpu in sleep mode\n");
1195 + /* Use WAIT in a low-power infinite spin loop */
1197 __asm__(".set\tmips3\n\t"
1204 void au1000_power_off(void)
1206 + extern void board_power_off (void);
1208 + printk(KERN_NOTICE "\n** You can safely turn off the power\n");
1210 + /* Give board a chance to power-off */
1211 + board_power_off();
1213 + /* If board can't power-off, spin forever */
1216 --- a/arch/mips/au1000/common/setup.c
1217 +++ b/arch/mips/au1000/common/setup.c
1218 @@ -174,6 +174,40 @@ void __init au1x00_setup(void)
1219 initrd_end = (unsigned long)&__rd_end;
1222 +#if defined(CONFIG_SOC_AU1200)
1223 +#ifdef CONFIG_USB_EHCI_HCD
1224 + if ((argptr = strstr(argptr, "usb_ehci=")) == NULL) {
1225 + char usb_args[80];
1226 + argptr = prom_getcmdline();
1227 + memset(usb_args, 0, sizeof(usb_args));
1228 + sprintf(usb_args, " usb_ehci=base:0x%x,len:0x%x,irq:%d",
1229 + USB_EHCI_BASE, USB_EHCI_LEN, AU1000_USB_HOST_INT);
1230 + strcat(argptr, usb_args);
1232 +#ifdef CONFIG_USB_AMD5536UDC
1233 + /* enable EHC + OHC + UDC clocks, memory and bus mastering */
1234 +/* au_writel( 0x00DF207F, USB_MSR_BASE + 4); */
1235 + au_writel( 0xC0DF207F, USB_MSR_BASE + 4); // incl. prefetch
1237 + /* enable EHC + OHC clocks, memory and bus mastering */
1238 +/* au_writel( 0x00DB200F, USB_MSR_BASE + 4); */
1239 + au_writel( 0xC0DB200F, USB_MSR_BASE + 4); /* incl. prefetch */
1243 +#else /* CONFIG_USB_EHCI_HCD */
1245 +#ifdef CONFIG_USB_AMD5536UDC
1246 +#ifndef CONFIG_USB_OHCI
1247 + /* enable UDC clocks, memory and bus mastering */
1248 +/* au_writel( 0x00DC2070, USB_MSR_BASE + 4); */
1249 + au_writel( 0xC0DC2070, USB_MSR_BASE + 4); // incl. prefetch
1253 +#endif /* CONFIG_USB_EHCI_HCD */
1254 +#endif /* CONFIG_SOC_AU1200 */
1256 #if defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
1257 #ifdef CONFIG_USB_OHCI
1258 if ((argptr = strstr(argptr, "usb_ohci=")) == NULL) {
1259 @@ -187,19 +221,38 @@ void __init au1x00_setup(void)
1262 #ifdef CONFIG_USB_OHCI
1263 - // enable host controller and wait for reset done
1264 +#if defined(CONFIG_SOC_AU1200)
1265 +#ifndef CONFIG_USB_EHCI_HCD
1266 +#ifdef CONFIG_USB_AMD5536UDC
1267 + /* enable OHC + UDC clocks, memory and bus mastering */
1268 +/* au_writel( 0x00DD2073, USB_MSR_BASE + 4); */
1269 + au_writel( 0xC0DD2073, USB_MSR_BASE + 4); // incl. prefetch
1271 + /* enable OHC clocks, memory and bus mastering */
1272 + au_writel( 0x00D12003, USB_MSR_BASE + 4);
1275 +printk("DEBUG: Reading Au1200 USB2 reg 0x%x\n", au_readl(USB_MSR_BASE + 4));
1278 + /* Au1000, Au1500, Au1100, Au1550 */
1279 + /* enable host controller and wait for reset done */
1280 au_writel(0x08, USB_HOST_CONFIG);
1282 au_writel(0x0E, USB_HOST_CONFIG);
1284 - au_readl(USB_HOST_CONFIG); // throw away first read
1285 + au_readl(USB_HOST_CONFIG); /* throw away first read */
1286 while (!(au_readl(USB_HOST_CONFIG) & 0x10))
1287 au_readl(USB_HOST_CONFIG);
1288 +#endif /* CONFIG_SOC_AU1200 */
1290 -#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
1293 +#endif /* defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) */
1297 - // Needed if PCI video card in use
1298 + /* Needed if PCI video card in use */
1299 conswitchp = &dummy_con;
1302 @@ -209,8 +262,7 @@ void __init au1x00_setup(void)
1305 #ifdef CONFIG_BLK_DEV_IDE
1306 - /* Board setup takes precedence for unique devices.
1308 + /* Board setup takes precedence for unique devices. */
1309 if ((ide_ops == NULL) || (ide_ops == &no_ide_ops))
1310 ide_ops = &std_ide_ops;
1312 --- a/arch/mips/au1000/common/sleeper.S
1313 +++ b/arch/mips/au1000/common/sleeper.S
1315 #include <asm/addrspace.h>
1316 #include <asm/regdef.h>
1317 #include <asm/stackframe.h>
1318 +#include <asm/au1000.h>
1321 + * Note: This file is *not* conditional on CONFIG_PM since Alchemy sleep
1322 + * need not be tied to any particular power management scheme.
1325 + .extern ___flush_cache_all
1332 -/* Save all of the processor general registers and go to sleep.
1333 - * A wakeup condition will get us back here to restore the registers.
1335 + * Save the processor general registers and go to sleep. A wakeup
1336 + * condition will get us back here to restore the registers.
1338 -LEAF(save_and_sleep)
1340 +/* still need to fix alignment issues here */
1341 +save_and_sleep_frmsz = 48
1342 +NESTED(save_and_sleep, save_and_sleep_frmsz, ra)
1346 + subu sp, save_and_sleep_frmsz
1347 + sw ra, save_and_sleep_frmsz-4(sp)
1348 + sw s0, save_and_sleep_frmsz-8(sp)
1349 + sw s1, save_and_sleep_frmsz-12(sp)
1350 + sw s2, save_and_sleep_frmsz-16(sp)
1351 + sw s3, save_and_sleep_frmsz-20(sp)
1352 + sw s4, save_and_sleep_frmsz-24(sp)
1353 + sw s5, save_and_sleep_frmsz-28(sp)
1354 + sw s6, save_and_sleep_frmsz-32(sp)
1355 + sw s7, save_and_sleep_frmsz-36(sp)
1356 + sw s8, save_and_sleep_frmsz-40(sp)
1357 + sw gp, save_and_sleep_frmsz-44(sp)
1359 + /* We only need to save the registers that the calling function
1360 + * hasn't saved for us. 0 is always zero. 8 - 15, 24 and 25 are
1361 + * temporaries and can be used without saving. 26 and 27 are reserved
1362 + * for interrupt/trap handling and expected to change. 29 is the
1363 + * stack pointer which is handled as a special case here.
1368 @@ -34,14 +65,6 @@ LEAF(save_and_sleep)
1374 - sw $10, PT_R10(sp)
1375 - sw $11, PT_R11(sp)
1376 - sw $12, PT_R12(sp)
1377 - sw $13, PT_R13(sp)
1378 - sw $14, PT_R14(sp)
1379 - sw $15, PT_R15(sp)
1383 @@ -50,32 +73,47 @@ LEAF(save_and_sleep)
1387 - sw $24, PT_R24(sp)
1388 - sw $25, PT_R25(sp)
1389 - sw $26, PT_R26(sp)
1390 - sw $27, PT_R27(sp)
1392 - sw $29, PT_R29(sp)
1395 +#define PT_C0STATUS PT_LO
1396 +#define PT_CONTEXT PT_HI
1397 +#define PT_PAGEMASK PT_EPC
1398 +#define PT_CONFIG PT_BVADDR
1401 + sw k0, PT_C0STATUS(sp) // 0x20
1402 mfc0 k0, CP0_CONTEXT
1404 + sw k0, PT_CONTEXT(sp) // 0x1c
1405 mfc0 k0, CP0_PAGEMASK
1407 + sw k0, PT_PAGEMASK(sp) // 0x18
1410 + sw k0, PT_CONFIG(sp) // 0x14
1416 + sw zero, 0(t0) /* Get the processor ready to sleep */
1419 /* Now set up the scratch registers so the boot rom will
1420 * return to this point upon wakeup.
1421 + * sys_scratch0 : SP
1422 + * sys_scratch1 : RA
1424 + li t0, SYS_SCRATCH0
1425 + li t1, SYS_SCRATCH1
1427 + la k0, resume_from_sleep
1431 + * Flush DCACHE to make sure context is in memory
1439 + la t1,___flush_cache_all /* _flush_cache_all is a function pointer */
1444 /* Put SDRAM into self refresh. Preload instructions into cache,
1445 * issue a precharge, then auto refresh, then sleep commands to it.
1446 @@ -88,30 +126,65 @@ LEAF(save_and_sleep)
1450 + /* Put SDRAM to sleep */
1453 - sw zero, 0x001c(k0) /* Precharge */
1454 - sw zero, 0x0020(k0) /* Auto refresh */
1455 - sw zero, 0x0030(k0) /* SDRAM sleep */
1456 + li a0, MEM_PHYS_ADDR
1457 + or a0, a0, 0xA0000000
1458 +#if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100) || defined(CONFIG_SOC_AU1500)
1459 + lw k0, MEM_SDMODE0(a0)
1460 + sw zero, MEM_SDPRECMD(a0) /* Precharge */
1461 + sw zero, MEM_SDAUTOREF(a0) /* Auto Refresh */
1462 + sw zero, MEM_SDSLEEP(a0) /* Sleep */
1466 - sw zero, 0x0078(k1) /* get ready to sleep */
1468 +#if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200)
1469 + sw zero, MEM_SDPRECMD(a0) /* Precharge */
1470 + sw zero, MEM_SDSREF(a0)
1472 + #lw t0, MEM_SDSTAT(a0)
1473 + #and t0, t0, 0x01000000
1476 + lw t1, MEM_SDSTAT(a0)
1478 + beq zero, t2, refresh_not_set
1481 + li t0, ~0x30000000
1482 + lw t1, MEM_SDCONFIGA(a0)
1484 + sw t1, MEM_SDCONFIGA(a0)
1486 - sw zero, 0x007c(k1) /* Put processor to sleep */
1490 + sw zero, 0(t0) /* Put processor to sleep */
1502 /* This is where we return upon wakeup.
1503 * Reload all of the registers and return.
1512 + lw k0, PT_C0STATUS(sp) // 0x20
1515 + lw k0, PT_CONTEXT(sp) // 0x1c
1516 mtc0 k0, CP0_CONTEXT
1518 + lw k0, PT_PAGEMASK(sp) // 0x18
1519 mtc0 k0, CP0_PAGEMASK
1521 + lw k0, PT_CONFIG(sp) // 0x14
1525 @@ -120,14 +193,6 @@ sdsleep:
1531 - lw $10, PT_R10(sp)
1532 - lw $11, PT_R11(sp)
1533 - lw $12, PT_R12(sp)
1534 - lw $13, PT_R13(sp)
1535 - lw $14, PT_R14(sp)
1536 - lw $15, PT_R15(sp)
1540 @@ -136,15 +201,36 @@ sdsleep:
1544 - lw $24, PT_R24(sp)
1545 - lw $25, PT_R25(sp)
1546 - lw $26, PT_R26(sp)
1547 - lw $27, PT_R27(sp)
1549 - lw $29, PT_R29(sp)
1556 + /* clear the wake source, but save it as the return value of the function */
1557 + li t0, SYS_WAKESRC
1564 + lw gp, save_and_sleep_frmsz-44(sp)
1565 + lw s8, save_and_sleep_frmsz-40(sp)
1566 + lw s7, save_and_sleep_frmsz-36(sp)
1567 + lw s6, save_and_sleep_frmsz-32(sp)
1568 + lw s5, save_and_sleep_frmsz-28(sp)
1569 + lw s4, save_and_sleep_frmsz-24(sp)
1570 + lw s3, save_and_sleep_frmsz-20(sp)
1571 + lw s2, save_and_sleep_frmsz-16(sp)
1572 + lw s1, save_and_sleep_frmsz-12(sp)
1573 + lw s0, save_and_sleep_frmsz-8(sp)
1574 + lw ra, save_and_sleep_frmsz-4(sp)
1576 + addu sp, save_and_sleep_frmsz
1582 --- a/arch/mips/au1000/common/time.c
1583 +++ b/arch/mips/au1000/common/time.c
1585 #include <linux/mc146818rtc.h>
1586 #include <linux/timex.h>
1588 -extern void startup_match20_interrupt(void);
1589 extern void do_softirq(void);
1590 extern volatile unsigned long wall_jiffies;
1591 unsigned long missed_heart_beats = 0;
1592 @@ -59,14 +58,14 @@ static unsigned long r4k_offset; /* Amou
1593 static unsigned long r4k_cur; /* What counter should be at next timer irq */
1594 extern rwlock_t xtime_lock;
1595 int no_au1xxx_32khz;
1596 -void (*au1k_wait_ptr)(void);
1597 +extern int allow_au1k_wait; /* default off for CP0 Counter */
1599 /* Cycle counter value at the previous timer interrupt.. */
1600 static unsigned int timerhi = 0, timerlo = 0;
1603 #define MATCH20_INC 328
1604 -extern void startup_match20_interrupt(void);
1605 +extern void startup_match20_interrupt(void (*handler)(int, void *, struct pt_regs *));
1606 static unsigned long last_pc0, last_match20;
1609 @@ -385,7 +384,6 @@ void __init au1xxx_timer_setup(void)
1611 unsigned int est_freq;
1612 extern unsigned long (*do_gettimeoffset)(void);
1613 - extern void au1k_wait(void);
1615 printk("calculating r4koff... ");
1616 r4k_offset = cal_r4koff();
1617 @@ -437,9 +435,6 @@ void __init au1xxx_timer_setup(void)
1618 au_writel(0, SYS_TOYWRITE);
1619 while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C0S);
1621 - au_writel(au_readl(SYS_WAKEMSK) | (1<<8), SYS_WAKEMSK);
1622 - au_writel(~0, SYS_WAKESRC);
1624 while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20);
1626 /* setup match20 to interrupt once every 10ms */
1627 @@ -447,13 +442,13 @@ void __init au1xxx_timer_setup(void)
1628 au_writel(last_match20 + MATCH20_INC, SYS_TOYMATCH2);
1630 while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20);
1631 - startup_match20_interrupt();
1632 + startup_match20_interrupt(counter0_irq);
1634 do_gettimeoffset = do_fast_pm_gettimeoffset;
1636 /* We can use the real 'wait' instruction.
1638 - au1k_wait_ptr = au1k_wait;
1639 + allow_au1k_wait = 1;
1643 --- a/arch/mips/au1000/db1x00/board_setup.c
1644 +++ b/arch/mips/au1000/db1x00/board_setup.c
1646 #include <asm/au1000.h>
1647 #include <asm/db1x00.h>
1649 -extern struct rtc_ops no_rtc_ops;
1650 +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX) && defined(CONFIG_MIPS_DB1550)
1651 +#include <asm/au1xxx_dbdma.h>
1652 +extern struct ide_ops *ide_ops;
1653 +extern struct ide_ops au1xxx_ide_ops;
1654 +extern u32 au1xxx_ide_virtbase;
1655 +extern u64 au1xxx_ide_physbase;
1656 +extern int au1xxx_ide_irq;
1659 +chan_tab_t *ide_read_ch, *ide_write_ch;
1660 +u32 au1xxx_ide_ddma_enable = 0, switch4ddma = 1; // PIO+ddma
1662 +dbdev_tab_t new_dbdev_tab_element = { DSCR_CMD0_THROTTLE, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 };
1663 +#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX */
1665 -/* not correct for db1550 */
1666 -static BCSR * const bcsr = (BCSR *)0xAE000000;
1667 +extern struct rtc_ops no_rtc_ops;
1669 void board_reset (void)
1671 @@ -57,6 +69,13 @@ void board_reset (void)
1672 au_writel(0x00000000, 0xAE00001C);
1675 +void board_power_off (void)
1677 +#ifdef CONFIG_MIPS_MIRAGE
1678 + au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT);
1682 void __init board_setup(void)
1685 @@ -108,8 +127,42 @@ void __init board_setup(void)
1686 au_writel(0x02000200, GPIO2_OUTPUT);
1689 +#if defined(CONFIG_AU1XXX_SMC91111)
1690 +#define CPLD_CONTROL (0xAF00000C)
1692 + extern uint32_t au1xxx_smc91111_base;
1693 + extern unsigned int au1xxx_smc91111_irq;
1694 + extern int au1xxx_smc91111_nowait;
1696 + au1xxx_smc91111_base = 0xAC000300;
1697 + au1xxx_smc91111_irq = AU1000_GPIO_8;
1698 + au1xxx_smc91111_nowait = 1;
1700 + /* set up the Static Bus timing - only 396Mhz */
1701 + bcsr->resets |= 0x7;
1702 + au_writel(0x00010003, MEM_STCFG0);
1703 + au_writel(0x000c00c0, MEM_STCFG2);
1704 + au_writel(0x85E1900D, MEM_STTIME2);
1706 +#endif /* end CONFIG_SMC91111 */
1709 +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX) && defined(CONFIG_MIPS_DB1550)
1711 + * Iniz IDE parameters
1713 + ide_ops = &au1xxx_ide_ops;
1714 + au1xxx_ide_irq = DAUGHTER_CARD_IRQ;
1715 + au1xxx_ide_physbase = AU1XXX_ATA_PHYS_ADDR;
1716 + au1xxx_ide_virtbase = KSEG1ADDR(AU1XXX_ATA_PHYS_ADDR);
1719 + * change PIO or PIO+Ddma
1720 + * check the GPIO-6 pin condition. db1550:s6_dot
1722 + switch4ddma = (au_readl(SYS_PINSTATERD) & (1 << 6)) ? 1 : 0;
1725 #ifdef CONFIG_MIPS_DB1000
1726 printk("AMD Alchemy Au1000/Db1000 Board\n");
1728 --- a/arch/mips/au1000/db1x00/irqmap.c
1729 +++ b/arch/mips/au1000/db1x00/irqmap.c
1730 @@ -53,6 +53,7 @@ au1xxx_irq_map_t au1xxx_irq_map[] = {
1731 #ifdef CONFIG_MIPS_DB1550
1732 { AU1000_GPIO_3, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card 0 IRQ#
1733 { AU1000_GPIO_5, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card 1 IRQ#
1734 + { AU1000_GPIO_8, INTC_INT_LOW_LEVEL, 0 }, // Daughtercard IRQ#
1736 { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card 0 Fully_Interted#
1737 { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card 0 STSCHG#
1738 --- a/arch/mips/au1000/db1x00/Makefile
1739 +++ b/arch/mips/au1000/db1x00/Makefile
1740 @@ -17,4 +17,11 @@ O_TARGET := db1x00.o
1741 obj-y := init.o board_setup.o irqmap.o
1742 obj-$(CONFIG_WM97XX_COMODULE) += mirage_ts.o
1744 +ifdef CONFIG_MIPS_DB1100
1746 +obj-y += mmc_support.o
1747 +export-objs += mmc_support.o
1751 include $(TOPDIR)/Rules.make
1753 +++ b/arch/mips/au1000/db1x00/mmc_support.c
1756 + * BRIEF MODULE DESCRIPTION
1758 + * MMC support routines for DB1100.
1761 + * Copyright (c) 2003-2004 Embedded Edge, LLC.
1762 + * Author: Embedded Edge, LLC.
1763 + * Contact: dan@embeddededge.com
1765 + * This program is free software; you can redistribute it and/or modify it
1766 + * under the terms of the GNU General Public License as published by the
1767 + * Free Software Foundation; either version 2 of the License, or (at your
1768 + * option) any later version.
1770 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
1771 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1772 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
1773 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1774 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1775 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
1776 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
1777 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1778 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1779 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1781 + * You should have received a copy of the GNU General Public License along
1782 + * with this program; if not, write to the Free Software Foundation, Inc.,
1783 + * 675 Mass Ave, Cambridge, MA 02139, USA.
1788 +#include <linux/config.h>
1789 +#include <linux/kernel.h>
1790 +#include <linux/module.h>
1791 +#include <linux/init.h>
1793 +#include <asm/irq.h>
1794 +#include <asm/au1000.h>
1795 +#include <asm/au1100_mmc.h>
1796 +#include <asm/db1x00.h>
1799 +/* SD/MMC controller support functions */
1804 +void mmc_card_inserted(int _n_, int *_res_)
1806 + u32 gpios = au_readl(SYS_PINSTATERD);
1807 + u32 emptybit = (_n_) ? (1<<20) : (1<<19);
1808 + *_res_ = ((gpios & emptybit) == 0);
1812 + * Check card write protection.
1814 +void mmc_card_writable(int _n_, int *_res_)
1816 + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
1817 + unsigned long mmc_wp, board_specific;
1820 + mmc_wp = BCSR_BOARD_SD1_WP;
1822 + mmc_wp = BCSR_BOARD_SD0_WP;
1825 + board_specific = au_readl((unsigned long)(&bcsr->specific));
1827 + if (!(board_specific & mmc_wp)) {/* low means card writable */
1835 + * Apply power to card slot.
1837 +void mmc_power_on(int _n_)
1839 + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
1840 + unsigned long mmc_pwr, board_specific;
1843 + mmc_pwr = BCSR_BOARD_SD1_PWR;
1845 + mmc_pwr = BCSR_BOARD_SD0_PWR;
1848 + board_specific = au_readl((unsigned long)(&bcsr->specific));
1849 + board_specific |= mmc_pwr;
1851 + au_writel(board_specific, (int)(&bcsr->specific));
1856 + * Remove power from card slot.
1858 +void mmc_power_off(int _n_)
1860 + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
1861 + unsigned long mmc_pwr, board_specific;
1864 + mmc_pwr = BCSR_BOARD_SD1_PWR;
1866 + mmc_pwr = BCSR_BOARD_SD0_PWR;
1869 + board_specific = au_readl((unsigned long)(&bcsr->specific));
1870 + board_specific &= ~mmc_pwr;
1872 + au_writel(board_specific, (int)(&bcsr->specific));
1876 +EXPORT_SYMBOL(mmc_card_inserted);
1877 +EXPORT_SYMBOL(mmc_card_writable);
1878 +EXPORT_SYMBOL(mmc_power_on);
1879 +EXPORT_SYMBOL(mmc_power_off);
1882 +++ b/arch/mips/au1000/ficmmp/au1200_ibutton.c
1884 +/* ----------------------------------------------------------------------
1887 + * Copyright (C) 2003 Intrinsyc Software Inc.
1889 + * Intel Personal Media Player buttons
1891 + * This program is free software; you can redistribute it and/or modify
1892 + * it under the terms of the GNU General Public License version 2 as
1893 + * published by the Free Software Foundation.
1895 + * May 02, 2003 : Initial version [FB]
1897 + ------------------------------------------------------------------------*/
1899 +#include <linux/config.h>
1900 +#include <linux/module.h>
1901 +#include <linux/kernel.h>
1902 +#include <linux/init.h>
1903 +#include <linux/fs.h>
1904 +#include <linux/sched.h>
1905 +#include <linux/miscdevice.h>
1906 +#include <linux/errno.h>
1907 +#include <linux/poll.h>
1908 +#include <linux/delay.h>
1909 +#include <linux/input.h>
1911 +#include <asm/au1000.h>
1912 +#include <asm/uaccess.h>
1913 +#include <asm/au1xxx_gpio.h>
1914 +#include <asm/irq.h>
1915 +#include <asm/keyboard.h>
1916 +#include <linux/time.h>
1918 +#define DRIVER_VERSION "V1.0"
1919 +#define DRIVER_AUTHOR "FIC"
1920 +#define DRIVER_DESC "FIC Travis Media Player Button Driver"
1921 +#define DRIVER_NAME "Au1200Button"
1923 +#define BUTTON_MAIN (1<<1)
1924 +#define BUTTON_SELECT (1<<6)
1925 +#define BUTTON_GUIDE (1<<12)
1926 +#define BUTTON_DOWN (1<<17)
1927 +#define BUTTON_LEFT (1<<19)
1928 +#define BUTTON_RIGHT (1<<26)
1929 +#define BUTTON_UP (1<<28)
1931 +#define BUTTON_MASK (\
1941 +#define BUTTON_INVERT (\
1951 +char button_map[32]={0,KEY_S,0,0,0,0,KEY_ENTER,0,0,0,0,0,KEY_G,0,0,0,0,KEY_DOWN,0,KEY_LEFT,0,0,0,0,0,0,KEY_RIGHT,0,KEY_UP,0,0,0};
1952 +//char button_map[32]={0,0,0,0,0,0,KEY_ENTER,0,0,0,0,0,KEY_G,0,0,0,0,KEY_DOWN,0,KEY_LEFT,0,0,0,0,0,0,KEY_RIGHT,0,KEY_UP,0,0,0};
1954 +//char button_map[32]={0,KEY_TAB,0,0,0,0,KEY_M,0,0,0,0,0,KEY_S,0,0,0,0,KEY_DOWN,0,KEY_LEFT,0,0,0,0,0,0,KEY_RIGHT,0,KEY_UP,0,0,0};
1955 +//char button_map[32]={0,0,0,0,0,0,KEY_M,0,0,0,0,0,KEY_S,0,0,0,0,KEY_DOWN,0,KEY_LEFT,0,0,0,0,0,0,KEY_RIGHT,0,KEY_UP,0,0,0};
1957 +#define BUTTON_COUNT (sizeof (button_map) / sizeof (button_map[0]))
1959 +struct input_dev dev;
1960 +struct timeval cur_tv;
1962 +static unsigned int old_tv_usec = 0;
1964 +static unsigned int read_button_state(void)
1966 + unsigned int state;
1968 + state = au_readl(SYS_PINSTATERD) & BUTTON_MASK; /* get gpio status */
1970 + state ^= BUTTON_INVERT; /* invert main & guide button */
1972 + /* printk("au1200_ibutton.c: button state [0x%X]\r\n",state); */
1976 +//This function returns 0 if the allowed microseconds have elapsed since the last call to ths function, otherwise it returns 1 to indicate a bounce condition
1977 +static unsigned int bounce()
1980 + unsigned int elapsed_time;
1982 + do_gettimeofday (&cur_tv);
1984 + if (!old_tv_usec) {
1985 + old_tv_usec = cur_tv.tv_usec;
1989 + if(cur_tv.tv_usec > old_tv_usec) {
1990 + /* If there hasn't been rollover */
1991 + elapsed_time = ((cur_tv.tv_usec - old_tv_usec));
1994 + /* Accounting for rollover */
1995 + elapsed_time = ((1000000 - old_tv_usec + cur_tv.tv_usec));
1998 + if (elapsed_time > 250000) {
1999 + old_tv_usec = 0; /* reset the bounce time */
2006 +/* button interrupt handler */
2007 +static void button_interrupt(int irq, void *dev, struct pt_regs *regs)
2010 + unsigned int i,bit_mask, key_choice;
2013 + /* Report state to upper level */
2015 + button_state = read_button_state() & BUTTON_MASK; /* get new gpio status */
2017 + /* Return if this is a repeated (bouncing) event */
2021 + /* we want to make keystrokes */
2022 + for( i=0; i< BUTTON_COUNT; i++) {
2024 + if (button_state & bit_mask) {
2025 + key_choice = button_map[i];
2026 + /* toggle key down */
2027 + input_report_key(dev, key_choice, 1);
2028 + /* toggle key up */
2029 + input_report_key(dev, key_choice, 0);
2030 + printk("ibutton gpio %d stat %x scan code %d\r\n",
2031 + i, button_state, key_choice);
2032 + /* Only report the first key event; it doesn't make
2033 + * sense for two keys to be pressed at the same time,
2034 + * and causes problems with the directional keys
2042 +button_translate(unsigned char scancode, unsigned char *keycode, char raw_mode)
2044 + static int prev_scancode;
2046 + printk( "ibutton.c: translate: scancode=%x raw_mode=%x\n",
2047 + scancode, raw_mode);
2049 + if (scancode == 0xe0 || scancode == 0xe1) {
2050 + prev_scancode = scancode;
2054 + if (scancode == 0x00 || scancode == 0xff) {
2055 + prev_scancode = 0;
2059 + *keycode = scancode;
2064 +/* init button hardware */
2065 +static int button_hw_init(void)
2067 + unsigned int ipinfunc=0;
2069 + printk("au1200_ibutton.c: Initializing buttons hardware\n");
2071 + // initialize GPIO pin function assignments
2073 + ipinfunc = au_readl(SYS_PINFUNC);
2075 + ipinfunc &= ~(SYS_PINFUNC_DMA | SYS_PINFUNC_S0A | SYS_PINFUNC_S0B);
2076 + au_writel( ipinfunc ,SYS_PINFUNC);
2078 + ipinfunc |= (SYS_PINFUNC_S0C);
2079 + au_writel( ipinfunc ,SYS_PINFUNC);
2084 +/* button driver init */
2085 +static int __init button_init(void)
2088 + unsigned int flag=0;
2090 + printk("au1200_ibutton.c: button_init()\r\n");
2094 + /* register all button irq handler */
2096 + for(i=0; i< sizeof(button_map)/sizeof(button_map[0]); i++)
2098 + /* register irq <-- gpio 1 ,6 ,12 , 17 ,19 , 26 ,28 */
2099 + if(button_map[i] != 0)
2101 + ret = request_irq(AU1000_GPIO_0 + i ,
2102 + &button_interrupt , SA_INTERRUPT ,
2103 + DRIVER_NAME , &dev);
2104 + if(ret) flag |= 1<<i;
2108 + printk("au1200_ibutton.c: request_irq,ret:0x%x\r\n",ret);
2111 + printk("au1200_ibutton.c: request_irq:%X failed\r\n",flag);
2115 + dev.name = DRIVER_NAME;
2116 + dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
2118 + for (i=0;i<sizeof(button_map)/sizeof(button_map[0]);i++)
2120 + dev.keybit[LONG(button_map[i])] |= BIT(button_map[i]);
2123 + input_register_device(&dev);
2125 + /* ready to receive interrupts */
2130 +/* button driver exit */
2131 +static void __exit button_exit(void)
2135 + for(i=0;i<sizeof(button_map)/sizeof(button_map[0]);i++)
2137 + if(button_map[i] != 0)
2139 + free_irq( AU1000_GPIO_0 + i, &dev);
2143 + input_unregister_device(&dev);
2145 + printk("au1200_ibutton.c: button_exit()\r\n");
2148 +module_init(button_init);
2149 +module_exit(button_exit);
2151 +MODULE_AUTHOR( DRIVER_AUTHOR );
2152 +MODULE_DESCRIPTION( DRIVER_DESC );
2153 +MODULE_LICENSE("GPL");
2155 +++ b/arch/mips/au1000/ficmmp/au1xxx_dock.c
2158 + * Copyright (C) 2003 Metrowerks, All Rights Reserved.
2160 + * This program is free software; you can redistribute it and/or modify
2161 + * it under the terms of the GNU General Public License version 2 as
2162 + * published by the Free Software Foundation.
2165 +#include <linux/config.h>
2166 +#include <linux/module.h>
2167 +#include <linux/init.h>
2168 +#include <linux/fs.h>
2169 +#include <linux/sched.h>
2170 +#include <linux/miscdevice.h>
2171 +#include <linux/errno.h>
2172 +#include <linux/poll.h>
2173 +#include <asm/au1000.h>
2174 +#include <asm/uaccess.h>
2175 +#include <asm/au1xxx_gpio.h>
2178 +#if defined(CONFIG_MIPS_FICMMP)
2179 + #define DOCK_GPIO 215
2181 + #error Unsupported Au1xxx Platform
2184 +#define MAKE_FLAG 0x20
2192 +#define DPRINTK(format, args...) printk(__FUNCTION__ ": " format, ## args)
2194 +#define DPRINTK(format, args...) do { } while (0)
2197 +/* Please note that this driver is based on a timer and is not interrupt
2198 + * driven. If you are going to make use of this driver, you will need to have
2199 + * your application open the dock listing from the /dev directory first.
2202 +struct au1xxx_dock {
2203 + struct fasync_struct *fasync;
2204 + wait_queue_head_t read_wait;
2206 + unsigned int debounce;
2207 + unsigned int current;
2208 + unsigned int last;
2211 +static struct au1xxx_dock dock_info;
2214 +static void dock_timer_periodic(void *data);
2216 +static struct tq_struct dock_task = {
2217 + routine: dock_timer_periodic,
2221 +static int cleanup_flag = 0;
2222 +static DECLARE_WAIT_QUEUE_HEAD(cleanup_wait_queue);
2225 +static unsigned int read_dock_state(void)
2229 + state = au1xxx_gpio_read(DOCK_GPIO);
2231 + /* printk( "Current Dock State: %d\n", state ); */
2237 +static void dock_timer_periodic(void *data)
2239 + struct au1xxx_dock *dock = (struct au1xxx_dock *)data;
2240 + unsigned long dock_state;
2242 + /* If cleanup wants us to die */
2243 + if (cleanup_flag) {
2244 + /* now cleanup_module can return */
2245 + wake_up(&cleanup_wait_queue);
2247 + /* put ourselves back in the task queue */
2248 + queue_task(&dock_task, &tq_timer);
2251 + /* read current dock */
2252 + dock_state = read_dock_state();
2254 + /* if dock states hasn't changed */
2255 + /* save time and be done. */
2256 + if (dock_state == dock->current) {
2260 + if (dock_state == dock->debounce) {
2261 + dock->current = dock_state;
2263 + dock->debounce = dock_state;
2265 + if (dock->current != dock->last) {
2266 + if (waitqueue_active(&dock->read_wait)) {
2267 + wake_up_interruptible(&dock->read_wait);
2273 +static ssize_t au1xxx_dock_read(struct file *filp, char *buffer, size_t count, loff_t *ppos)
2275 + struct au1xxx_dock *dock = filp->private_data;
2283 + while (dock->current == dock->last) {
2284 + if (filp->f_flags & O_NONBLOCK) {
2287 + interruptible_sleep_on(&dock->read_wait);
2288 + if (signal_pending(current)) {
2289 + return -ERESTARTSYS;
2293 + cur = dock->current;
2294 + last = dock->last;
2298 + event[0] = cur ? 'D' : 'U';
2306 + err = copy_to_user(buffer, &event, 3);
2315 +static int au1xxx_dock_open(struct inode *inode, struct file *filp)
2317 + struct au1xxx_dock *dock = &dock_info;
2319 + MOD_INC_USE_COUNT;
2321 + filp->private_data = dock;
2323 + if (dock->open_count++ == 0) {
2324 + dock_task.data = dock;
2326 + queue_task(&dock_task, &tq_timer);
2333 +static unsigned int au1xxx_dock_poll(struct file *filp, poll_table *wait)
2335 + struct au1xxx_dock *dock = filp->private_data;
2338 + DPRINTK("start\n");
2339 + poll_wait(filp, &dock->read_wait, wait);
2340 + if (dock->current != dock->last) {
2341 + ret = POLLIN | POLLRDNORM;
2347 +static int au1xxx_dock_release(struct inode *inode, struct file *filp)
2349 + struct au1xxx_dock *dock = filp->private_data;
2351 + DPRINTK("start\n");
2353 + if (--dock->open_count == 0) {
2355 + sleep_on(&cleanup_wait_queue);
2357 + MOD_DEC_USE_COUNT;
2364 +static struct file_operations au1xxx_dock_fops = {
2365 + owner: THIS_MODULE,
2366 + read: au1xxx_dock_read,
2367 + poll: au1xxx_dock_poll,
2368 + open: au1xxx_dock_open,
2369 + release: au1xxx_dock_release,
2373 + * The au1xxx dock is a misc device:
2375 + * Minor 22 /dev/dock
2377 + * This is /dev/misc/dock if devfs is used.
2380 +static struct miscdevice au1xxx_dock_dev = {
2383 + fops: &au1xxx_dock_fops,
2386 +static int __init au1xxx_dock_init(void)
2388 + struct au1xxx_dock *dock = &dock_info;
2391 + DPRINTK("Initializing dock driver\n");
2392 + dock->open_count = 0;
2394 + init_waitqueue_head(&dock->read_wait);
2397 + /* yamon configures GPIO pins for the dock
2398 + * no initialization needed
2401 + ret = misc_register(&au1xxx_dock_dev);
2403 + DPRINTK("dock driver fully initialized.\n");
2409 +static void __exit au1xxx_dock_exit(void)
2411 + DPRINTK("unloading dock driver\n");
2412 + misc_deregister(&au1xxx_dock_dev);
2416 +module_init(au1xxx_dock_init);
2417 +module_exit(au1xxx_dock_exit);
2419 +++ b/arch/mips/au1000/ficmmp/board_setup.c
2423 + * BRIEF MODULE DESCRIPTION
2424 + * Alchemy Pb1200 board setup.
2426 + * This program is free software; you can redistribute it and/or modify it
2427 + * under the terms of the GNU General Public License as published by the
2428 + * Free Software Foundation; either version 2 of the License, or (at your
2429 + * option) any later version.
2431 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
2432 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2433 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
2434 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2435 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2436 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
2437 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2438 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2439 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2440 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2442 + * You should have received a copy of the GNU General Public License along
2443 + * with this program; if not, write to the Free Software Foundation, Inc.,
2444 + * 675 Mass Ave, Cambridge, MA 02139, USA.
2446 +#include <linux/config.h>
2447 +#include <linux/init.h>
2448 +#include <linux/sched.h>
2449 +#include <linux/ioport.h>
2450 +#include <linux/mm.h>
2451 +#include <linux/console.h>
2452 +#include <linux/mc146818rtc.h>
2453 +#include <linux/delay.h>
2454 +#include <linux/ide.h>
2456 +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
2457 +#include <linux/ide.h>
2460 +#include <asm/cpu.h>
2461 +#include <asm/bootinfo.h>
2462 +#include <asm/irq.h>
2463 +#include <asm/keyboard.h>
2464 +#include <asm/mipsregs.h>
2465 +#include <asm/reboot.h>
2466 +#include <asm/pgtable.h>
2467 +#include <asm/au1000.h>
2468 +#include <asm/ficmmp.h>
2469 +#include <asm/au1xxx_dbdma.h>
2470 +#include <asm/au1xxx_gpio.h>
2472 +extern struct rtc_ops no_rtc_ops;
2474 +/* value currently in the board configuration register */
2475 +u16 ficmmp_config = 0;
2477 +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
2478 +extern struct ide_ops *ide_ops;
2479 +extern struct ide_ops au1xxx_ide_ops;
2480 +extern u32 au1xxx_ide_virtbase;
2481 +extern u64 au1xxx_ide_physbase;
2482 +extern int au1xxx_ide_irq;
2486 +chan_tab_t *ide_read_ch, *ide_write_ch;
2487 +u32 au1xxx_ide_ddma_enable = 0, switch4ddma = 1; // PIO+ddma
2489 +dbdev_tab_t new_dbdev_tab_element = { DSCR_CMD0_THROTTLE, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 };
2490 +#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX */
2492 +void board_reset (void)
2494 + au_writel(0, 0xAD80001C);
2497 +void board_power_off (void)
2501 +void __init board_setup(void)
2503 + char *argptr = NULL;
2505 + rtc_ops = &no_rtc_ops;
2507 + ficmmp_config_init(); //Initialize FIC control register
2510 + /* Enable PSC1 SYNC for AC97. Normaly done in audio driver,
2511 + * but it is board specific code, so put it here.
2513 + pin_func = au_readl(SYS_PINFUNC);
2515 + pin_func |= SYS_PF_MUST_BE_SET | SYS_PF_PSC1_S1;
2516 + au_writel(pin_func, SYS_PINFUNC);
2518 + au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */
2522 +#if defined( CONFIG_I2C_ALGO_AU1550 )
2524 + u32 freq0, clksrc;
2526 + /* Select SMBUS in CPLD */
2527 + /* bcsr->resets &= ~(BCSR_RESETS_PCS0MUX); */
2529 + pin_func = au_readl(SYS_PINFUNC);
2531 + pin_func &= ~(3<<17 | 1<<4);
2532 + /* Set GPIOs correctly */
2533 + pin_func |= 2<<17;
2534 + au_writel(pin_func, SYS_PINFUNC);
2537 + /* The i2c driver depends on 50Mhz clock */
2538 + freq0 = au_readl(SYS_FREQCTRL0);
2540 + freq0 &= ~(SYS_FC_FRDIV1_MASK | SYS_FC_FS1 | SYS_FC_FE1);
2541 + freq0 |= (3<<SYS_FC_FRDIV1_BIT);
2542 + /* 396Mhz / (3+1)*2 == 49.5Mhz */
2543 + au_writel(freq0, SYS_FREQCTRL0);
2545 + freq0 |= SYS_FC_FE1;
2546 + au_writel(freq0, SYS_FREQCTRL0);
2549 + clksrc = au_readl(SYS_CLKSRC);
2551 + clksrc &= ~0x01f00000;
2552 + /* bit 22 is EXTCLK0 for PSC0 */
2553 + clksrc |= (0x3 << 22);
2554 + au_writel(clksrc, SYS_CLKSRC);
2559 +#ifdef CONFIG_FB_AU1200
2560 + argptr = prom_getcmdline();
2561 + strcat(argptr, " video=au1200fb:");
2564 +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
2566 + * Iniz IDE parameters
2568 + ide_ops = &au1xxx_ide_ops;
2569 + au1xxx_ide_irq = FICMMP_IDE_INT;
2570 + au1xxx_ide_physbase = AU1XXX_ATA_PHYS_ADDR;
2571 + au1xxx_ide_virtbase = KSEG1ADDR(AU1XXX_ATA_PHYS_ADDR);
2574 + ide_ops = &au1xxx_ide_ops;
2575 + au1xxx_ide_irq = FICMMP_IDE_INT;
2576 + au1xxx_ide_base = KSEG1ADDR(AU1XXX_ATA_BASE);
2578 + au1xxx_gpio_write(9, 1);
2579 + printk("B4001010: %X\n", *((u32*)0xB4001010));
2580 + printk("B4001014: %X\n", *((u32*)0xB4001014));
2581 + printk("B4001018: %X\n", *((u32*)0xB4001018));
2582 + printk("B1900100: %X\n", *((u32*)0xB1900100));
2585 + ficmmp_config_clear(FICMMP_CONFIG_IDERST);
2587 + ficmmp_config_set(FICMMP_CONFIG_IDERST);
2591 + * change PIO or PIO+Ddma
2592 + * check the GPIO-5 pin condition. pb1200:s18_dot
2594 +/* switch4ddma = 0; //(au_readl(SYS_PINSTATERD) & (1 << 5)) ? 1 : 0; */
2597 + /* The Pb1200 development board uses external MUX for PSC0 to
2598 + support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI
2600 +#if defined(CONFIG_AU1550_PSC_SPI) && defined(CONFIG_I2C_ALGO_AU1550)
2601 + #error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\
2602 + Refer to Pb1200 documentation.
2603 +#elif defined( CONFIG_AU1550_PSC_SPI )
2604 + //bcsr->resets |= BCSR_RESETS_PCS0MUX;
2605 +#elif defined( CONFIG_I2C_ALGO_AU1550 )
2606 + //bcsr->resets &= (~BCSR_RESETS_PCS0MUX);
2610 + printk("FIC Multimedia Player Board\n");
2611 + au1xxx_gpio_tristate(5);
2612 + printk("B1900100: %X\n", *((volatile u32*)0xB1900100));
2613 + printk("B190002C: %X\n", *((volatile u32*)0xB190002C));
2617 +board_au1200fb_panel (void)
2619 + au1xxx_gpio_tristate(6);
2621 + if (au1xxx_gpio_read(12) == 0)
2622 + return 9; /* FS453_640x480 (Composite/S-Video) */
2624 + return 7; /* Sharp 320x240 TFT */
2628 +board_au1200fb_panel_init (void)
2630 + /*Enable data buffers*/
2631 + ficmmp_config_clear(FICMMP_CONFIG_LCMDATAOUT);
2632 + /*Take LCD out of reset*/
2633 + ficmmp_config_set(FICMMP_CONFIG_LCMPWREN | FICMMP_CONFIG_LCMEN);
2638 +board_au1200fb_panel_shutdown (void)
2640 + /*Disable data buffers*/
2641 + ficmmp_config_set(FICMMP_CONFIG_LCMDATAOUT);
2642 + /*Put LCD in reset, remove power*/
2643 + ficmmp_config_clear(FICMMP_CONFIG_LCMEN | FICMMP_CONFIG_LCMPWREN);
2648 +++ b/arch/mips/au1000/ficmmp/init.c
2652 + * BRIEF MODULE DESCRIPTION
2653 + * PB1200 board setup
2655 + * This program is free software; you can redistribute it and/or modify it
2656 + * under the terms of the GNU General Public License as published by the
2657 + * Free Software Foundation; either version 2 of the License, or (at your
2658 + * option) any later version.
2660 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
2661 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2662 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
2663 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2664 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2665 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
2666 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2667 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2668 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2669 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2671 + * You should have received a copy of the GNU General Public License along
2672 + * with this program; if not, write to the Free Software Foundation, Inc.,
2673 + * 675 Mass Ave, Cambridge, MA 02139, USA.
2676 +#include <linux/init.h>
2677 +#include <linux/mm.h>
2678 +#include <linux/sched.h>
2679 +#include <linux/bootmem.h>
2680 +#include <asm/addrspace.h>
2681 +#include <asm/bootinfo.h>
2682 +#include <linux/config.h>
2683 +#include <linux/string.h>
2684 +#include <linux/kernel.h>
2685 +#include <linux/sched.h>
2688 +char **prom_argv, **prom_envp;
2689 +extern void __init prom_init_cmdline(void);
2690 +extern char *prom_getenv(char *envname);
2692 +const char *get_system_type(void)
2694 + return "FIC Multimedia Player (Au1200)";
2697 +u32 mae_memsize = 0;
2699 +int __init prom_init(int argc, char **argv, char **envp, int *prom_vec)
2701 + unsigned char *memsize_str;
2702 + unsigned long memsize;
2708 + mips_machgroup = MACH_GROUP_ALCHEMY;
2709 + mips_machtype = MACH_PB1000; /* set the platform # */
2710 + prom_init_cmdline();
2712 + memsize_str = prom_getenv("memsize");
2713 + if (!memsize_str) {
2714 + memsize = 0x08000000;
2716 + memsize = simple_strtol(memsize_str, NULL, 0);
2719 + /* reserved 32MB for MAE driver */
2720 + memsize -= (32 * 1024 * 1024);
2721 + add_memory_region(0, memsize, BOOT_MEM_RAM);
2722 + mae_memsize = memsize; /* for drivers/char/au1xxx_mae.c */
2727 +++ b/arch/mips/au1000/ficmmp/irqmap.c
2730 + * BRIEF MODULE DESCRIPTION
2731 + * Au1xxx irq map table
2733 + * This program is free software; you can redistribute it and/or modify it
2734 + * under the terms of the GNU General Public License as published by the
2735 + * Free Software Foundation; either version 2 of the License, or (at your
2736 + * option) any later version.
2738 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
2739 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2740 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
2741 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2742 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2743 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
2744 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2745 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2746 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2747 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2749 + * You should have received a copy of the GNU General Public License along
2750 + * with this program; if not, write to the Free Software Foundation, Inc.,
2751 + * 675 Mass Ave, Cambridge, MA 02139, USA.
2753 +#include <linux/errno.h>
2754 +#include <linux/init.h>
2755 +#include <linux/irq.h>
2756 +#include <linux/kernel_stat.h>
2757 +#include <linux/module.h>
2758 +#include <linux/signal.h>
2759 +#include <linux/sched.h>
2760 +#include <linux/types.h>
2761 +#include <linux/interrupt.h>
2762 +#include <linux/ioport.h>
2763 +#include <linux/timex.h>
2764 +#include <linux/slab.h>
2765 +#include <linux/random.h>
2766 +#include <linux/delay.h>
2768 +#include <asm/bitops.h>
2769 +#include <asm/bootinfo.h>
2770 +#include <asm/io.h>
2771 +#include <asm/mipsregs.h>
2772 +#include <asm/system.h>
2773 +#include <asm/au1000.h>
2774 +#include <asm/ficmmp.h>
2776 +au1xxx_irq_map_t au1xxx_irq_map[] = {
2777 + { FICMMP_IDE_INT, INTC_INT_HIGH_LEVEL, 0 },
2778 + { AU1XXX_SMC91111_IRQ, INTC_INT_HIGH_LEVEL, 0 },
2779 + { AU1000_GPIO_1 , INTC_INT_FALL_EDGE, 0 }, // main button
2780 + { AU1000_GPIO_6 , INTC_INT_RISE_EDGE, 0 }, // select button
2781 + { AU1000_GPIO_12, INTC_INT_FALL_EDGE, 0 }, // guide button
2782 + { AU1000_GPIO_17, INTC_INT_RISE_EDGE, 0 }, // down button
2783 + { AU1000_GPIO_19, INTC_INT_RISE_EDGE, 0 }, // left button
2784 + { AU1000_GPIO_26, INTC_INT_RISE_EDGE, 0 }, // right button
2785 + { AU1000_GPIO_28, INTC_INT_RISE_EDGE, 0 }, // up button
2788 +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t);
2791 +++ b/arch/mips/au1000/ficmmp/Makefile
2794 +# Copyright 2000 MontaVista Software Inc.
2795 +# Author: MontaVista Software, Inc.
2796 +# ppopov@mvista.com or source@mvista.com
2798 +# Makefile for the Alchemy Semiconductor FIC board.
2800 +# Note! Dependencies are done automagically by 'make dep', which also
2801 +# removes any old dependencies. DON'T put your own dependencies here
2802 +# unless it's something special (ie not a .c file).
2805 +USE_STANDARD_AS_RULE := true
2807 +O_TARGET := ficmmp.o
2809 +obj-y := init.o board_setup.o irqmap.o au1200_ibutton.o au1xxx_dock.o
2812 +obj-y += mmc_support.o
2813 +export-objs +=mmc_support.o
2817 +include $(TOPDIR)/Rules.make
2818 --- a/arch/mips/au1000/hydrogen3/board_setup.c
2819 +++ b/arch/mips/au1000/hydrogen3/board_setup.c
2820 @@ -51,12 +51,19 @@ void board_reset (void)
2824 +void board_power_off (void)
2828 void __init board_setup(void)
2832 rtc_ops = &no_rtc_ops;
2834 + /* Set GPIO14 high to make CD/DAT1 high for MMC to work */
2835 + au_writel(1<<14, SYS_OUTPUTSET);
2837 #ifdef CONFIG_AU1X00_USB_DEVICE
2838 // 2nd USB port is USB device
2839 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
2841 +++ b/arch/mips/au1000/hydrogen3/buttons.c
2844 + * Copyright (C) 2003 Metrowerks, All Rights Reserved.
2846 + * This program is free software; you can redistribute it and/or modify
2847 + * it under the terms of the GNU General Public License version 2 as
2848 + * published by the Free Software Foundation.
2851 +#include <linux/config.h>
2852 +#include <linux/module.h>
2853 +#include <linux/init.h>
2854 +#include <linux/fs.h>
2855 +#include <linux/sched.h>
2856 +#include <linux/miscdevice.h>
2857 +#include <linux/errno.h>
2858 +#include <linux/poll.h>
2859 +#include <asm/au1000.h>
2860 +#include <asm/uaccess.h>
2862 +#define BUTTON_SELECT (1<<1)
2863 +#define BUTTON_1 (1<<2)
2864 +#define BUTTON_2 (1<<3)
2865 +#define BUTTON_ONOFF (1<<6)
2866 +#define BUTTON_3 (1<<7)
2867 +#define BUTTON_4 (1<<8)
2868 +#define BUTTON_LEFT (1<<9)
2869 +#define BUTTON_DOWN (1<<10)
2870 +#define BUTTON_RIGHT (1<<11)
2871 +#define BUTTON_UP (1<<12)
2873 +#define BUTTON_MASK (\
2886 +#define BUTTON_INVERT (\
2900 +#define MAKE_FLAG 0x20
2908 +#define DPRINTK(format, args...) printk(__FUNCTION__ ": " format, ## args)
2910 +#define DPRINTK(format, args...) do { } while (0)
2913 +/* Please note that this driver is based on a timer and is not interrupt
2914 + * driven. If you are going to make use of this driver, you will need to have
2915 + * your application open the buttons listing from the /dev directory first.
2918 +struct hydrogen3_buttons {
2919 + struct fasync_struct *fasync;
2920 + wait_queue_head_t read_wait;
2922 + unsigned int debounce;
2923 + unsigned int current;
2924 + unsigned int last;
2927 +static struct hydrogen3_buttons buttons_info;
2930 +static void button_timer_periodic(void *data);
2932 +static struct tq_struct button_task = {
2933 + routine: button_timer_periodic,
2937 +static int cleanup_flag = 0;
2938 +static DECLARE_WAIT_QUEUE_HEAD(cleanup_wait_queue);
2941 +static unsigned int read_button_state(void)
2943 + unsigned long state;
2945 + state = inl(SYS_PINSTATERD) & BUTTON_MASK;
2946 + state ^= BUTTON_INVERT;
2948 + DPRINTK( "Current Button State: %d\n", state );
2954 +static void button_timer_periodic(void *data)
2956 + struct hydrogen3_buttons *buttons = (struct hydrogen3_buttons *)data;
2957 + unsigned long button_state;
2959 + // If cleanup wants us to die
2960 + if (cleanup_flag) {
2961 + wake_up(&cleanup_wait_queue); // now cleanup_module can return
2963 + queue_task(&button_task, &tq_timer); // put ourselves back in the task queue
2966 + // read current buttons
2967 + button_state = read_button_state();
2969 + // if no buttons are down and nothing to do then
2970 + // save time and be done.
2971 + if ((button_state == 0) && (buttons->current == 0)) {
2975 + if (button_state == buttons->debounce) {
2976 + buttons->current = button_state;
2978 + buttons->debounce = button_state;
2980 +// printk("0x%04x\n", button_state);
2981 + if (buttons->current != buttons->last) {
2982 + if (waitqueue_active(&buttons->read_wait)) {
2983 + wake_up_interruptible(&buttons->read_wait);
2989 +static ssize_t hydrogen3_buttons_read(struct file *filp, char *buffer, size_t count, loff_t *ppos)
2991 + struct hydrogen3_buttons *buttons = filp->private_data;
3000 + DPRINTK("start\n");
3004 + while (buttons->current == buttons->last) {
3005 + if (filp->f_flags & O_NONBLOCK) {
3008 + interruptible_sleep_on(&buttons->read_wait);
3009 + if (signal_pending(current)) {
3010 + return -ERESTARTSYS;
3014 + cur = buttons->current;
3015 + last = buttons->last;
3019 + for (bit = 0; (bit < 16) && count; bit++) {
3020 + if ((cur ^ last) & bit_mask) {
3021 + if (cur & bit_mask) {
3022 + events[index] = (bit | MAKE_FLAG) + 'A';
3025 + events[index] = bit + 'A';
3026 + last &= ~bit_mask;
3033 + buttons->last = last;
3039 + err = copy_to_user(buffer, events, index);
3048 +static int hydrogen3_buttons_open(struct inode *inode, struct file *filp)
3050 + struct hydrogen3_buttons *buttons = &buttons_info;
3052 + DPRINTK("start\n");
3053 + MOD_INC_USE_COUNT;
3055 + filp->private_data = buttons;
3057 + if (buttons->open_count++ == 0) {
3058 + button_task.data = buttons;
3060 + queue_task(&button_task, &tq_timer);
3067 +static unsigned int hydrogen3_buttons_poll(struct file *filp, poll_table *wait)
3069 + struct hydrogen3_buttons *buttons = filp->private_data;
3072 + DPRINTK("start\n");
3073 + poll_wait(filp, &buttons->read_wait, wait);
3074 + if (buttons->current != buttons->last) {
3075 + ret = POLLIN | POLLRDNORM;
3081 +static int hydrogen3_buttons_release(struct inode *inode, struct file *filp)
3083 + struct hydrogen3_buttons *buttons = filp->private_data;
3085 + DPRINTK("start\n");
3087 + if (--buttons->open_count == 0) {
3089 + sleep_on(&cleanup_wait_queue);
3091 + MOD_DEC_USE_COUNT;
3098 +static struct file_operations hydrogen3_buttons_fops = {
3099 + owner: THIS_MODULE,
3100 + read: hydrogen3_buttons_read,
3101 + poll: hydrogen3_buttons_poll,
3102 + open: hydrogen3_buttons_open,
3103 + release: hydrogen3_buttons_release,
3107 + * The hydrogen3 buttons is a misc device:
3109 + * Minor 22 /dev/buttons
3111 + * This is /dev/misc/buttons if devfs is used.
3114 +static struct miscdevice hydrogen3_buttons_dev = {
3117 + fops: &hydrogen3_buttons_fops,
3120 +static int __init hydrogen3_buttons_init(void)
3122 + struct hydrogen3_buttons *buttons = &buttons_info;
3125 + DPRINTK("Initializing buttons driver\n");
3126 + buttons->open_count = 0;
3128 + init_waitqueue_head(&buttons->read_wait);
3131 + // yamon configures GPIO pins for the buttons
3132 + // no initialization needed
3134 + ret = misc_register(&hydrogen3_buttons_dev);
3136 + DPRINTK("Buttons driver fully initialized.\n");
3142 +static void __exit hydrogen3_buttons_exit(void)
3144 + DPRINTK("unloading buttons driver\n");
3145 + misc_deregister(&hydrogen3_buttons_dev);
3149 +module_init(hydrogen3_buttons_init);
3150 +module_exit(hydrogen3_buttons_exit);
3151 --- a/arch/mips/au1000/hydrogen3/Makefile
3152 +++ b/arch/mips/au1000/hydrogen3/Makefile
3153 @@ -14,6 +14,11 @@ USE_STANDARD_AS_RULE := true
3155 O_TARGET := hydrogen3.o
3157 -obj-y := init.o board_setup.o irqmap.o
3158 +obj-y := init.o board_setup.o irqmap.o buttons.o
3161 +obj-y += mmc_support.o
3162 +export-objs +=mmc_support.o
3165 include $(TOPDIR)/Rules.make
3167 +++ b/arch/mips/au1000/hydrogen3/mmc_support.c
3170 + * BRIEF MODULE DESCRIPTION
3172 + * MMC support routines for Hydrogen3.
3175 + * Copyright (c) 2003-2004 Embedded Edge, LLC.
3176 + * Author: Embedded Edge, LLC.
3177 + * Contact: dan@embeddededge.com
3179 + * This program is free software; you can redistribute it and/or modify it
3180 + * under the terms of the GNU General Public License as published by the
3181 + * Free Software Foundation; either version 2 of the License, or (at your
3182 + * option) any later version.
3184 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
3185 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3186 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
3187 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
3188 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3189 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
3190 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3191 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3192 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3193 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3195 + * You should have received a copy of the GNU General Public License along
3196 + * with this program; if not, write to the Free Software Foundation, Inc.,
3197 + * 675 Mass Ave, Cambridge, MA 02139, USA.
3202 +#include <linux/config.h>
3203 +#include <linux/kernel.h>
3204 +#include <linux/module.h>
3205 +#include <linux/init.h>
3207 +#include <asm/irq.h>
3208 +#include <asm/au1000.h>
3209 +#include <asm/au1100_mmc.h>
3211 +#define GPIO_17_WP 0x20000
3213 +/* SD/MMC controller support functions */
3218 +void mmc_card_inserted(int _n_, int *_res_)
3220 + u32 gpios = au_readl(SYS_PINSTATERD);
3221 + u32 emptybit = (1<<16);
3222 + *_res_ = ((gpios & emptybit) == 0);
3226 + * Check card write protection.
3228 +void mmc_card_writable(int _n_, int *_res_)
3230 + unsigned long mmc_wp, board_specific;
3231 + board_specific = au_readl(SYS_OUTPUTSET);
3232 + mmc_wp=GPIO_17_WP;
3233 + if (!(board_specific & mmc_wp)) {/* low means card writable */
3240 + * Apply power to card slot.
3242 +void mmc_power_on(int _n_)
3247 + * Remove power from card slot.
3249 +void mmc_power_off(int _n_)
3253 +EXPORT_SYMBOL(mmc_card_inserted);
3254 +EXPORT_SYMBOL(mmc_card_writable);
3255 +EXPORT_SYMBOL(mmc_power_on);
3256 +EXPORT_SYMBOL(mmc_power_off);
3258 --- a/arch/mips/au1000/mtx-1/board_setup.c
3259 +++ b/arch/mips/au1000/mtx-1/board_setup.c
3262 extern struct rtc_ops no_rtc_ops;
3264 +void board_reset (void)
3266 + /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
3267 + au_writel(0x00000000, 0xAE00001C);
3270 void __init board_setup(void)
3272 rtc_ops = &no_rtc_ops;
3273 --- a/arch/mips/au1000/mtx-1/irqmap.c
3274 +++ b/arch/mips/au1000/mtx-1/irqmap.c
3275 @@ -72,10 +72,10 @@ au1xxx_pci_irqmap(struct pci_dev *dev, u
3279 - {INTA, INTB, INTC, INTD}, /* IDSEL 0 */
3280 - {INTA, INTB, INTC, INTD}, /* IDSEL 1 */
3281 - {INTA, INTB, INTC, INTD}, /* IDSEL 2 */
3282 - {INTA, INTB, INTC, INTD}, /* IDSEL 3 */
3283 + {INTA, INTB, INTX, INTX}, /* IDSEL 0 */
3284 + {INTB, INTA, INTX, INTX}, /* IDSEL 1 */
3285 + {INTC, INTD, INTX, INTX}, /* IDSEL 2 */
3286 + {INTD, INTC, INTX, INTX}, /* IDSEL 3 */
3288 const long min_idsel = 0, max_idsel = 3, irqs_per_slot = 4;
3289 return PCI_IRQ_TABLE_LOOKUP;
3290 --- a/arch/mips/au1000/pb1000/board_setup.c
3291 +++ b/arch/mips/au1000/pb1000/board_setup.c
3292 @@ -58,6 +58,10 @@ void board_reset (void)
3296 +void board_power_off (void)
3300 void __init board_setup(void)
3302 u32 pin_func, static_cfg0;
3303 --- a/arch/mips/au1000/pb1100/board_setup.c
3304 +++ b/arch/mips/au1000/pb1100/board_setup.c
3305 @@ -62,6 +62,10 @@ void board_reset (void)
3306 au_writel(0x00000000, 0xAE00001C);
3309 +void board_power_off (void)
3313 void __init board_setup(void)
3316 --- a/arch/mips/au1000/pb1100/Makefile
3317 +++ b/arch/mips/au1000/pb1100/Makefile
3318 @@ -16,4 +16,10 @@ O_TARGET := pb1100.o
3320 obj-y := init.o board_setup.o irqmap.o
3324 +obj-y += mmc_support.o
3325 +export-objs += mmc_support.o
3328 include $(TOPDIR)/Rules.make
3330 +++ b/arch/mips/au1000/pb1100/mmc_support.c
3333 + * BRIEF MODULE DESCRIPTION
3335 + * MMC support routines for PB1100.
3338 + * Copyright (c) 2003-2004 Embedded Edge, LLC.
3339 + * Author: Embedded Edge, LLC.
3340 + * Contact: dan@embeddededge.com
3342 + * This program is free software; you can redistribute it and/or modify it
3343 + * under the terms of the GNU General Public License as published by the
3344 + * Free Software Foundation; either version 2 of the License, or (at your
3345 + * option) any later version.
3347 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
3348 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3349 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
3350 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
3351 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3352 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
3353 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3354 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3355 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3356 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3358 + * You should have received a copy of the GNU General Public License along
3359 + * with this program; if not, write to the Free Software Foundation, Inc.,
3360 + * 675 Mass Ave, Cambridge, MA 02139, USA.
3365 +#include <linux/config.h>
3366 +#include <linux/kernel.h>
3367 +#include <linux/module.h>
3368 +#include <linux/init.h>
3370 +#include <asm/irq.h>
3371 +#include <asm/au1000.h>
3372 +#include <asm/au1100_mmc.h>
3373 +#include <asm/pb1100.h>
3376 +/* SD/MMC controller support functions */
3381 +void mmc_card_inserted(int _n_, int *_res_)
3383 + u32 gpios = au_readl(SYS_PINSTATERD);
3384 + u32 emptybit = (_n_) ? (1<<15) : (1<<14);
3385 + *_res_ = ((gpios & emptybit) == 0);
3389 + * Check card write protection.
3391 +void mmc_card_writable(int _n_, int *_res_)
3393 + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
3394 + unsigned long mmc_wp, board_specific;
3397 + mmc_wp = BCSR_PCMCIA_SD1_WP;
3399 + mmc_wp = BCSR_PCMCIA_SD0_WP;
3402 + board_specific = au_readl((unsigned long)(&bcsr->pcmcia));
3404 + if (!(board_specific & mmc_wp)) {/* low means card writable */
3412 + * Apply power to card slot.
3414 +void mmc_power_on(int _n_)
3416 + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
3417 + unsigned long mmc_pwr, board_specific;
3420 + mmc_pwr = BCSR_PCMCIA_SD1_PWR;
3422 + mmc_pwr = BCSR_PCMCIA_SD0_PWR;
3425 + board_specific = au_readl((unsigned long)(&bcsr->pcmcia));
3426 + board_specific |= mmc_pwr;
3428 + au_writel(board_specific, (int)(&bcsr->pcmcia));
3433 + * Remove power from card slot.
3435 +void mmc_power_off(int _n_)
3437 + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
3438 + unsigned long mmc_pwr, board_specific;
3441 + mmc_pwr = BCSR_PCMCIA_SD1_PWR;
3443 + mmc_pwr = BCSR_PCMCIA_SD0_PWR;
3446 + board_specific = au_readl((unsigned long)(&bcsr->pcmcia));
3447 + board_specific &= ~mmc_pwr;
3449 + au_writel(board_specific, (int)(&bcsr->pcmcia));
3453 +EXPORT_SYMBOL(mmc_card_inserted);
3454 +EXPORT_SYMBOL(mmc_card_writable);
3455 +EXPORT_SYMBOL(mmc_power_on);
3456 +EXPORT_SYMBOL(mmc_power_off);
3459 +++ b/arch/mips/au1000/pb1200/board_setup.c
3463 + * BRIEF MODULE DESCRIPTION
3464 + * Alchemy Pb1200 board setup.
3466 + * This program is free software; you can redistribute it and/or modify it
3467 + * under the terms of the GNU General Public License as published by the
3468 + * Free Software Foundation; either version 2 of the License, or (at your
3469 + * option) any later version.
3471 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
3472 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3473 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
3474 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
3475 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3476 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
3477 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3478 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3479 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3480 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3482 + * You should have received a copy of the GNU General Public License along
3483 + * with this program; if not, write to the Free Software Foundation, Inc.,
3484 + * 675 Mass Ave, Cambridge, MA 02139, USA.
3486 +#include <linux/config.h>
3487 +#include <linux/init.h>
3488 +#include <linux/sched.h>
3489 +#include <linux/ioport.h>
3490 +#include <linux/mm.h>
3491 +#include <linux/console.h>
3492 +#include <linux/mc146818rtc.h>
3493 +#include <linux/delay.h>
3495 +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
3496 +#include <linux/ide.h>
3499 +#include <asm/cpu.h>
3500 +#include <asm/bootinfo.h>
3501 +#include <asm/irq.h>
3502 +#include <asm/keyboard.h>
3503 +#include <asm/mipsregs.h>
3504 +#include <asm/reboot.h>
3505 +#include <asm/pgtable.h>
3506 +#include <asm/au1000.h>
3507 +#include <asm/au1xxx_dbdma.h>
3509 +#ifdef CONFIG_MIPS_PB1200
3510 +#include <asm/pb1200.h>
3513 +#ifdef CONFIG_MIPS_DB1200
3514 +#include <asm/db1200.h>
3515 +#define PB1200_ETH_INT DB1200_ETH_INT
3516 +#define PB1200_IDE_INT DB1200_IDE_INT
3519 +extern struct rtc_ops no_rtc_ops;
3521 +extern void _board_init_irq(void);
3522 +extern void (*board_init_irq)(void);
3524 +#ifdef CONFIG_BLK_DEV_IDE_AU1XXX
3525 +extern struct ide_ops *ide_ops;
3526 +extern struct ide_ops au1xxx_ide_ops;
3527 +extern u32 au1xxx_ide_virtbase;
3528 +extern u64 au1xxx_ide_physbase;
3529 +extern int au1xxx_ide_irq;
3533 +chan_tab_t *ide_read_ch, *ide_write_ch;
3534 +u32 au1xxx_ide_ddma_enable = 0, switch4ddma = 1; // PIO+ddma
3536 +dbdev_tab_t new_dbdev_tab_element = { DSCR_CMD0_THROTTLE, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 };
3537 +#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX */
3539 +void board_reset (void)
3544 +void board_power_off (void)
3546 + bcsr->resets = 0xC000;
3549 +void __init board_setup(void)
3551 + char *argptr = NULL;
3553 + rtc_ops = &no_rtc_ops;
3556 + /* Enable PSC1 SYNC for AC97. Normaly done in audio driver,
3557 + * but it is board specific code, so put it here.
3559 + pin_func = au_readl(SYS_PINFUNC);
3561 + pin_func |= SYS_PF_MUST_BE_SET | SYS_PF_PSC1_S1;
3562 + au_writel(pin_func, SYS_PINFUNC);
3564 + au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */
3568 +#if defined( CONFIG_I2C_ALGO_AU1550 )
3570 + u32 freq0, clksrc;
3572 + /* Select SMBUS in CPLD */
3573 + bcsr->resets &= ~(BCSR_RESETS_PCS0MUX);
3575 + pin_func = au_readl(SYS_PINFUNC);
3577 + pin_func &= ~(3<<17 | 1<<4);
3578 + /* Set GPIOs correctly */
3579 + pin_func |= 2<<17;
3580 + au_writel(pin_func, SYS_PINFUNC);
3583 + /* The i2c driver depends on 50Mhz clock */
3584 + freq0 = au_readl(SYS_FREQCTRL0);
3586 + freq0 &= ~(SYS_FC_FRDIV1_MASK | SYS_FC_FS1 | SYS_FC_FE1);
3587 + freq0 |= (3<<SYS_FC_FRDIV1_BIT);
3588 + /* 396Mhz / (3+1)*2 == 49.5Mhz */
3589 + au_writel(freq0, SYS_FREQCTRL0);
3591 + freq0 |= SYS_FC_FE1;
3592 + au_writel(freq0, SYS_FREQCTRL0);
3595 + clksrc = au_readl(SYS_CLKSRC);
3597 + clksrc &= ~0x01f00000;
3598 + /* bit 22 is EXTCLK0 for PSC0 */
3599 + clksrc |= (0x3 << 22);
3600 + au_writel(clksrc, SYS_CLKSRC);
3605 +#ifdef CONFIG_FB_AU1200
3606 + argptr = prom_getcmdline();
3607 + strcat(argptr, " video=au1200fb:");
3610 +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
3612 + * Iniz IDE parameters
3614 + ide_ops = &au1xxx_ide_ops;
3615 + au1xxx_ide_irq = PB1200_IDE_INT;
3616 + au1xxx_ide_physbase = AU1XXX_ATA_PHYS_ADDR;
3617 + au1xxx_ide_virtbase = KSEG1ADDR(AU1XXX_ATA_PHYS_ADDR);
3619 + * change PIO or PIO+Ddma
3620 + * check the GPIO-5 pin condition. pb1200:s18_dot */
3621 + switch4ddma = (au_readl(SYS_PINSTATERD) & (1 << 5)) ? 1 : 0;
3624 + /* The Pb1200 development board uses external MUX for PSC0 to
3625 + support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI
3627 +#if defined(CONFIG_AU1550_PSC_SPI) && defined(CONFIG_I2C_ALGO_AU1550)
3628 + #error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\
3629 + Refer to Pb1200/Db1200 documentation.
3630 +#elif defined( CONFIG_AU1550_PSC_SPI )
3631 + bcsr->resets |= BCSR_RESETS_PCS0MUX;
3632 +#elif defined( CONFIG_I2C_ALGO_AU1550 )
3633 + bcsr->resets &= (~BCSR_RESETS_PCS0MUX);
3637 +#ifdef CONFIG_MIPS_PB1200
3638 + printk("AMD Alchemy Pb1200 Board\n");
3640 +#ifdef CONFIG_MIPS_DB1200
3641 + printk("AMD Alchemy Db1200 Board\n");
3644 + /* Setup Pb1200 External Interrupt Controller */
3646 + extern void (*board_init_irq)(void);
3647 + extern void _board_init_irq(void);
3648 + board_init_irq = _board_init_irq;
3653 +board_au1200fb_panel (void)
3655 + BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;
3658 + p = bcsr->switches;
3665 +board_au1200fb_panel_init (void)
3668 + BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;
3669 + bcsr->board |= (BCSR_BOARD_LCDVEE | BCSR_BOARD_LCDVDD | BCSR_BOARD_LCDBL);
3674 +board_au1200fb_panel_shutdown (void)
3676 + /* Remove power */
3677 + BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;
3678 + bcsr->board &= ~(BCSR_BOARD_LCDVEE | BCSR_BOARD_LCDVDD | BCSR_BOARD_LCDBL);
3683 +++ b/arch/mips/au1000/pb1200/init.c
3687 + * BRIEF MODULE DESCRIPTION
3688 + * PB1200 board setup
3690 + * This program is free software; you can redistribute it and/or modify it
3691 + * under the terms of the GNU General Public License as published by the
3692 + * Free Software Foundation; either version 2 of the License, or (at your
3693 + * option) any later version.
3695 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
3696 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3697 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
3698 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
3699 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3700 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
3701 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3702 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3703 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3704 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3706 + * You should have received a copy of the GNU General Public License along
3707 + * with this program; if not, write to the Free Software Foundation, Inc.,
3708 + * 675 Mass Ave, Cambridge, MA 02139, USA.
3711 +#include <linux/init.h>
3712 +#include <linux/mm.h>
3713 +#include <linux/sched.h>
3714 +#include <linux/bootmem.h>
3715 +#include <asm/addrspace.h>
3716 +#include <asm/bootinfo.h>
3717 +#include <linux/config.h>
3718 +#include <linux/string.h>
3719 +#include <linux/kernel.h>
3720 +#include <linux/sched.h>
3723 +char **prom_argv, **prom_envp;
3724 +extern void __init prom_init_cmdline(void);
3725 +extern char *prom_getenv(char *envname);
3727 +const char *get_system_type(void)
3729 + return "AMD Alchemy Au1200/Pb1200";
3732 +u32 mae_memsize = 0;
3734 +int __init prom_init(int argc, char **argv, char **envp, int *prom_vec)
3736 + unsigned char *memsize_str;
3737 + unsigned long memsize;
3743 + mips_machgroup = MACH_GROUP_ALCHEMY;
3744 + mips_machtype = MACH_PB1000; /* set the platform # */
3745 + prom_init_cmdline();
3747 + memsize_str = prom_getenv("memsize");
3748 + if (!memsize_str) {
3749 + memsize = 0x08000000;
3751 + memsize = simple_strtol(memsize_str, NULL, 0);
3753 + add_memory_region(0, memsize, BOOT_MEM_RAM);
3758 +++ b/arch/mips/au1000/pb1200/irqmap.c
3761 + * BRIEF MODULE DESCRIPTION
3762 + * Au1xxx irq map table
3764 + * This program is free software; you can redistribute it and/or modify it
3765 + * under the terms of the GNU General Public License as published by the
3766 + * Free Software Foundation; either version 2 of the License, or (at your
3767 + * option) any later version.
3769 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
3770 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3771 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
3772 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
3773 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3774 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
3775 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3776 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3777 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3778 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3780 + * You should have received a copy of the GNU General Public License along
3781 + * with this program; if not, write to the Free Software Foundation, Inc.,
3782 + * 675 Mass Ave, Cambridge, MA 02139, USA.
3784 +#include <linux/errno.h>
3785 +#include <linux/init.h>
3786 +#include <linux/irq.h>
3787 +#include <linux/kernel_stat.h>
3788 +#include <linux/module.h>
3789 +#include <linux/signal.h>
3790 +#include <linux/sched.h>
3791 +#include <linux/types.h>
3792 +#include <linux/interrupt.h>
3793 +#include <linux/ioport.h>
3794 +#include <linux/timex.h>
3795 +#include <linux/slab.h>
3796 +#include <linux/random.h>
3797 +#include <linux/delay.h>
3799 +#include <asm/bitops.h>
3800 +#include <asm/bootinfo.h>
3801 +#include <asm/io.h>
3802 +#include <asm/mipsregs.h>
3803 +#include <asm/system.h>
3804 +#include <asm/au1000.h>
3806 +#ifdef CONFIG_MIPS_PB1200
3807 +#include <asm/pb1200.h>
3810 +#ifdef CONFIG_MIPS_DB1200
3811 +#include <asm/db1200.h>
3812 +#define PB1200_INT_BEGIN DB1200_INT_BEGIN
3813 +#define PB1200_INT_END DB1200_INT_END
3816 +au1xxx_irq_map_t au1xxx_irq_map[] = {
3817 + { AU1000_GPIO_7, INTC_INT_LOW_LEVEL, 0 }, // This is exteranl interrupt cascade
3820 +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t);
3823 + * Support for External interrupts on the PbAu1200 Development platform.
3825 +static volatile int pb1200_cascade_en=0;
3827 +void pb1200_cascade_handler( int irq, void *dev_id, struct pt_regs *regs)
3829 + unsigned short bisr = bcsr->int_status;
3830 + int extirq_nr = 0;
3832 + /* Clear all the edge interrupts. This has no effect on level */
3833 + bcsr->int_status = bisr;
3834 + for( ; bisr; bisr &= (bisr-1) )
3836 + extirq_nr = (PB1200_INT_BEGIN-1) + au_ffs(bisr);
3837 + /* Ack and dispatch IRQ */
3838 + do_IRQ(extirq_nr,regs);
3842 +inline void pb1200_enable_irq(unsigned int irq_nr)
3844 + bcsr->intset_mask = 1<<(irq_nr - PB1200_INT_BEGIN);
3845 + bcsr->intset = 1<<(irq_nr - PB1200_INT_BEGIN);
3848 +inline void pb1200_disable_irq(unsigned int irq_nr)
3850 + bcsr->intclr_mask = 1<<(irq_nr - PB1200_INT_BEGIN);
3851 + bcsr->intclr = 1<<(irq_nr - PB1200_INT_BEGIN);
3854 +static unsigned int pb1200_startup_irq( unsigned int irq_nr )
3856 + if (++pb1200_cascade_en == 1)
3858 + request_irq(AU1000_GPIO_7, &pb1200_cascade_handler,
3859 + 0, "Pb1200 Cascade", &pb1200_cascade_handler );
3860 +#ifdef CONFIG_MIPS_PB1200
3861 + /* We have a problem with CPLD rev3. Enable a workaround */
3862 + if( ((bcsr->whoami & BCSR_WHOAMI_CPLD)>>4) <= 3)
3864 + printk("\nWARNING!!!\n");
3865 + printk("\nWARNING!!!\n");
3866 + printk("\nWARNING!!!\n");
3867 + printk("\nWARNING!!!\n");
3868 + printk("\nWARNING!!!\n");
3869 + printk("\nWARNING!!!\n");
3870 + printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n");
3871 + printk("updated to latest revision. This software will not\n");
3872 + printk("work on anything less than CPLD rev4\n");
3873 + printk("\nWARNING!!!\n");
3874 + printk("\nWARNING!!!\n");
3875 + printk("\nWARNING!!!\n");
3876 + printk("\nWARNING!!!\n");
3877 + printk("\nWARNING!!!\n");
3878 + printk("\nWARNING!!!\n");
3883 + pb1200_enable_irq(irq_nr);
3887 +static void pb1200_shutdown_irq( unsigned int irq_nr )
3889 + pb1200_disable_irq(irq_nr);
3890 + if (--pb1200_cascade_en == 0)
3892 + free_irq(AU1000_GPIO_7,&pb1200_cascade_handler );
3897 +static inline void pb1200_mask_and_ack_irq(unsigned int irq_nr)
3899 + pb1200_disable_irq( irq_nr );
3902 +static void pb1200_end_irq(unsigned int irq_nr)
3904 + if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))) {
3905 + pb1200_enable_irq(irq_nr);
3909 +static struct hw_interrupt_type external_irq_type =
3911 +#ifdef CONFIG_MIPS_PB1200
3914 +#ifdef CONFIG_MIPS_DB1200
3917 + pb1200_startup_irq,
3918 + pb1200_shutdown_irq,
3919 + pb1200_enable_irq,
3920 + pb1200_disable_irq,
3921 + pb1200_mask_and_ack_irq,
3926 +void _board_init_irq(void)
3930 + for (irq_nr = PB1200_INT_BEGIN; irq_nr <= PB1200_INT_END; irq_nr++)
3932 + irq_desc[irq_nr].handler = &external_irq_type;
3933 + pb1200_disable_irq(irq_nr);
3936 + /* GPIO_7 can not be hooked here, so it is hooked upon first
3937 + request of any source attached to the cascade */
3941 +++ b/arch/mips/au1000/pb1200/Makefile
3944 +# Copyright 2000 MontaVista Software Inc.
3945 +# Author: MontaVista Software, Inc.
3946 +# ppopov@mvista.com or source@mvista.com
3948 +# Makefile for the Alchemy Semiconductor PB1000 board.
3950 +# Note! Dependencies are done automagically by 'make dep', which also
3951 +# removes any old dependencies. DON'T put your own dependencies here
3952 +# unless it's something special (ie not a .c file).
3955 +USE_STANDARD_AS_RULE := true
3957 +O_TARGET := pb1200.o
3959 +obj-y := init.o board_setup.o irqmap.o
3962 +obj-y += mmc_support.o
3963 +export-objs +=mmc_support.o
3967 +include $(TOPDIR)/Rules.make
3969 +++ b/arch/mips/au1000/pb1200/mmc_support.c
3972 + * BRIEF MODULE DESCRIPTION
3974 + * MMC support routines for PB1200.
3977 + * Copyright (c) 2003-2004 Embedded Edge, LLC.
3978 + * Author: Embedded Edge, LLC.
3979 + * Contact: dan@embeddededge.com
3981 + * This program is free software; you can redistribute it and/or modify it
3982 + * under the terms of the GNU General Public License as published by the
3983 + * Free Software Foundation; either version 2 of the License, or (at your
3984 + * option) any later version.
3986 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
3987 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3988 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
3989 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
3990 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3991 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
3992 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3993 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3994 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3995 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3997 + * You should have received a copy of the GNU General Public License along
3998 + * with this program; if not, write to the Free Software Foundation, Inc.,
3999 + * 675 Mass Ave, Cambridge, MA 02139, USA.
4004 +#include <linux/config.h>
4005 +#include <linux/kernel.h>
4006 +#include <linux/module.h>
4007 +#include <linux/init.h>
4009 +#include <asm/irq.h>
4010 +#include <asm/au1000.h>
4011 +#include <asm/au1100_mmc.h>
4013 +#ifdef CONFIG_MIPS_PB1200
4014 +#include <asm/pb1200.h>
4017 +#ifdef CONFIG_MIPS_DB1200
4018 +/* NOTE: DB1200 only has SD0 pinned out and usable */
4019 +#include <asm/db1200.h>
4022 +/* SD/MMC controller support functions */
4027 +void mmc_card_inserted(int socket, int *result)
4032 +#ifdef CONFIG_MIPS_DB1200
4035 + mask = BCSR_INT_SD1INSERT;
4038 + mask = BCSR_INT_SD0INSERT;
4040 + *result = ((bcsr->sig_status & mask) != 0);
4044 + * Check card write protection.
4046 +void mmc_card_writable(int socket, int *result)
4051 +#ifdef CONFIG_MIPS_DB1200
4054 + mask = BCSR_STATUS_SD1WP;
4057 + mask = BCSR_STATUS_SD0WP;
4059 + /* low means card writable */
4060 + if (!(bcsr->status & mask)) {
4068 + * Apply power to card slot.
4070 +void mmc_power_on(int socket)
4075 +#ifdef CONFIG_MIPS_DB1200
4078 + mask = BCSR_BOARD_SD1PWR;
4081 + mask = BCSR_BOARD_SD0PWR;
4083 + bcsr->board |= mask;
4088 + * Remove power from card slot.
4090 +void mmc_power_off(int socket)
4095 +#ifdef CONFIG_MIPS_DB1200
4098 + mask = BCSR_BOARD_SD1PWR;
4101 + mask = BCSR_BOARD_SD0PWR;
4103 + bcsr->board &= ~mask;
4107 +EXPORT_SYMBOL(mmc_card_inserted);
4108 +EXPORT_SYMBOL(mmc_card_writable);
4109 +EXPORT_SYMBOL(mmc_power_on);
4110 +EXPORT_SYMBOL(mmc_power_off);
4112 --- a/arch/mips/au1000/pb1500/board_setup.c
4113 +++ b/arch/mips/au1000/pb1500/board_setup.c
4114 @@ -62,6 +62,10 @@ void board_reset (void)
4115 au_writel(0x00000000, 0xAE00001C);
4118 +void board_power_off (void)
4122 void __init board_setup(void)
4125 --- a/arch/mips/au1000/pb1550/board_setup.c
4126 +++ b/arch/mips/au1000/pb1550/board_setup.c
4129 extern struct rtc_ops no_rtc_ops;
4131 +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
4132 +extern struct ide_ops *ide_ops;
4133 +extern struct ide_ops au1xxx_ide_ops;
4134 +extern u32 au1xxx_ide_virtbase;
4135 +extern u64 au1xxx_ide_physbase;
4136 +extern unsigned int au1xxx_ide_irq;
4138 +u32 au1xxx_ide_ddma_enable = 0, switch4ddma = 1; // PIO+ddma
4139 +#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX */
4141 void board_reset (void)
4143 /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
4144 au_writew(au_readw(0xAF00001C) & ~(1<<15), 0xAF00001C);
4147 +void board_power_off (void)
4149 + /* power off system */
4150 + printk("\n** Powering off Pb1550\n");
4151 + au_writew(au_readw(0xAF00001C) | (3<<14), 0xAF00001C);
4153 + while(1); /* should not get here */
4156 void __init board_setup(void)
4159 @@ -78,5 +97,36 @@ void __init board_setup(void)
4160 au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */
4163 +#if defined(CONFIG_AU1XXX_SMC91111)
4164 +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
4165 +#error "Resource conflict occured. Disable either Ethernet or IDE daughter card."
4167 +#define CPLD_CONTROL (0xAF00000C)
4169 + /* set up the Static Bus timing */
4171 + /* reset the DC */
4172 + au_writew(au_readw(CPLD_CONTROL) | 0x0f, CPLD_CONTROL);
4173 + au_writel(0x00010003, MEM_STCFG0);
4174 + au_writel(0x000c00c0, MEM_STCFG2);
4175 + au_writel(0x85E1900D, MEM_STTIME2);
4178 +#endif /* end CONFIG_SMC91111 */
4180 +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
4182 + * Iniz IDE parameters
4184 + ide_ops = &au1xxx_ide_ops;
4185 + au1xxx_ide_irq = DAUGHTER_CARD_IRQ;;
4186 + au1xxx_ide_physbase = AU1XXX_ATA_PHYS_ADDR;
4187 + au1xxx_ide_virtbase = KSEG1ADDR(AU1XXX_ATA_PHYS_ADDR);
4189 + * change PIO or PIO+Ddma
4190 + * check the GPIO-6 pin condition. pb1550:s15_dot
4192 + switch4ddma = (au_readl(SYS_PINSTATERD) & (1 << 6)) ? 1 : 0;
4194 printk("AMD Alchemy Pb1550 Board\n");
4196 --- a/arch/mips/au1000/pb1550/irqmap.c
4197 +++ b/arch/mips/au1000/pb1550/irqmap.c
4199 au1xxx_irq_map_t au1xxx_irq_map[] = {
4200 { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 },
4201 { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 },
4202 +#ifdef CONFIG_AU1XXX_SMC91111
4203 + { AU1000_GPIO_3, INTC_INT_LOW_LEVEL, 0 },
4207 int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t);
4208 --- a/arch/mips/config-shared.in
4209 +++ b/arch/mips/config-shared.in
4210 @@ -21,16 +21,19 @@ mainmenu_option next_comment
4211 comment 'Machine selection'
4212 dep_bool 'Support for Acer PICA 1 chipset (EXPERIMENTAL)' CONFIG_ACER_PICA_61 $CONFIG_EXPERIMENTAL
4213 dep_bool 'Support for Alchemy Bosporus board' CONFIG_MIPS_BOSPORUS $CONFIG_MIPS32
4214 +dep_bool 'Support for FIC Multimedia Player board' CONFIG_MIPS_FICMMP $CONFIG_MIPS32
4215 dep_bool 'Support for Alchemy Mirage board' CONFIG_MIPS_MIRAGE $CONFIG_MIPS32
4216 dep_bool 'Support for Alchemy Db1000 board' CONFIG_MIPS_DB1000 $CONFIG_MIPS32
4217 dep_bool 'Support for Alchemy Db1100 board' CONFIG_MIPS_DB1100 $CONFIG_MIPS32
4218 dep_bool 'Support for Alchemy Db1500 board' CONFIG_MIPS_DB1500 $CONFIG_MIPS32
4219 dep_bool 'Support for Alchemy Db1550 board' CONFIG_MIPS_DB1550 $CONFIG_MIPS32
4220 +dep_bool 'Support for Alchemy Db1200 board' CONFIG_MIPS_DB1200 $CONFIG_MIPS32
4221 dep_bool 'Support for Alchemy PB1000 board' CONFIG_MIPS_PB1000 $CONFIG_MIPS32
4222 dep_bool 'Support for Alchemy PB1100 board' CONFIG_MIPS_PB1100 $CONFIG_MIPS32
4223 dep_bool 'Support for Alchemy PB1500 board' CONFIG_MIPS_PB1500 $CONFIG_MIPS32
4224 -dep_bool 'Support for Alchemy Hydrogen3 board' CONFIG_MIPS_HYDROGEN3 $CONFIG_MIPS32
4225 dep_bool 'Support for Alchemy PB1550 board' CONFIG_MIPS_PB1550 $CONFIG_MIPS32
4226 +dep_bool 'Support for Alchemy PB1200 board' CONFIG_MIPS_PB1200 $CONFIG_MIPS32
4227 +dep_bool 'Support for Alchemy Hydrogen3 board' CONFIG_MIPS_HYDROGEN3 $CONFIG_MIPS32
4228 dep_bool 'Support for MyCable XXS1500 board' CONFIG_MIPS_XXS1500 $CONFIG_MIPS32
4229 dep_bool 'Support for 4G Systems MTX-1 board' CONFIG_MIPS_MTX1 $CONFIG_MIPS32
4230 dep_bool 'Support for Cogent CSB250 board' CONFIG_COGENT_CSB250 $CONFIG_MIPS32
4231 @@ -249,6 +252,12 @@ if [ "$CONFIG_MIPS_MIRAGE" = "y" ]; then
4232 define_bool CONFIG_PC_KEYB y
4233 define_bool CONFIG_NONCOHERENT_IO y
4235 +if [ "$CONFIG_MIPS_FICMMP" = "y" ]; then
4236 + define_bool CONFIG_SOC_AU1X00 y
4237 + define_bool CONFIG_SOC_AU1200 y
4238 + define_bool CONFIG_NONCOHERENT_IO y
4239 + define_bool CONFIG_PC_KEYB y
4241 if [ "$CONFIG_MIPS_BOSPORUS" = "y" ]; then
4242 define_bool CONFIG_SOC_AU1X00 y
4243 define_bool CONFIG_SOC_AU1500 y
4244 @@ -263,6 +272,12 @@ if [ "$CONFIG_MIPS_PB1000" = "y" ]; then
4245 define_bool CONFIG_SWAP_IO_SPACE_W y
4246 define_bool CONFIG_SWAP_IO_SPACE_L y
4248 +if [ "$CONFIG_MIPS_PB1500" = "y" ]; then
4249 + define_bool CONFIG_SOC_AU1X00 y
4250 + define_bool CONFIG_SOC_AU1500 y
4251 + define_bool CONFIG_NONCOHERENT_IO y
4252 + define_bool CONFIG_PC_KEYB y
4254 if [ "$CONFIG_MIPS_PB1100" = "y" ]; then
4255 define_bool CONFIG_SOC_AU1X00 y
4256 define_bool CONFIG_SOC_AU1100 y
4257 @@ -271,9 +286,15 @@ if [ "$CONFIG_MIPS_PB1100" = "y" ]; then
4258 define_bool CONFIG_SWAP_IO_SPACE_W y
4259 define_bool CONFIG_SWAP_IO_SPACE_L y
4261 -if [ "$CONFIG_MIPS_PB1500" = "y" ]; then
4262 +if [ "$CONFIG_MIPS_PB1550" = "y" ]; then
4263 define_bool CONFIG_SOC_AU1X00 y
4264 - define_bool CONFIG_SOC_AU1500 y
4265 + define_bool CONFIG_SOC_AU1550 y
4266 + define_bool CONFIG_NONCOHERENT_IO n
4267 + define_bool CONFIG_PC_KEYB y
4269 +if [ "$CONFIG_MIPS_PB1200" = "y" ]; then
4270 + define_bool CONFIG_SOC_AU1X00 y
4271 + define_bool CONFIG_SOC_AU1200 y
4272 define_bool CONFIG_NONCOHERENT_IO y
4273 define_bool CONFIG_PC_KEYB y
4275 @@ -290,18 +311,24 @@ if [ "$CONFIG_MIPS_DB1500" = "y" ]; then
4276 define_bool CONFIG_NONCOHERENT_IO y
4277 define_bool CONFIG_PC_KEYB y
4279 +if [ "$CONFIG_MIPS_DB1100" = "y" ]; then
4280 + define_bool CONFIG_SOC_AU1X00 y
4281 + define_bool CONFIG_SOC_AU1100 y
4282 + define_bool CONFIG_NONCOHERENT_IO y
4283 + define_bool CONFIG_PC_KEYB y
4284 + define_bool CONFIG_SWAP_IO_SPACE y
4286 if [ "$CONFIG_MIPS_DB1550" = "y" ]; then
4287 define_bool CONFIG_SOC_AU1X00 y
4288 define_bool CONFIG_SOC_AU1550 y
4289 define_bool CONFIG_NONCOHERENT_IO y
4290 define_bool CONFIG_PC_KEYB y
4292 -if [ "$CONFIG_MIPS_DB1100" = "y" ]; then
4293 +if [ "$CONFIG_MIPS_DB1200" = "y" ]; then
4294 define_bool CONFIG_SOC_AU1X00 y
4295 - define_bool CONFIG_SOC_AU1100 y
4296 + define_bool CONFIG_SOC_AU1200 y
4297 define_bool CONFIG_NONCOHERENT_IO y
4298 define_bool CONFIG_PC_KEYB y
4299 - define_bool CONFIG_SWAP_IO_SPACE y
4301 if [ "$CONFIG_MIPS_HYDROGEN3" = "y" ]; then
4302 define_bool CONFIG_SOC_AU1X00 y
4303 @@ -327,12 +354,6 @@ if [ "$CONFIG_COGENT_CSB250" = "y" ]; th
4304 define_bool CONFIG_NONCOHERENT_IO y
4305 define_bool CONFIG_PC_KEYB y
4307 -if [ "$CONFIG_MIPS_PB1550" = "y" ]; then
4308 - define_bool CONFIG_SOC_AU1X00 y
4309 - define_bool CONFIG_SOC_AU1550 y
4310 - define_bool CONFIG_NONCOHERENT_IO n
4311 - define_bool CONFIG_PC_KEYB y
4313 if [ "$CONFIG_MIPS_COBALT" = "y" ]; then
4314 define_bool CONFIG_BOOT_ELF32 y
4315 define_bool CONFIG_COBALT_LCD y
4316 @@ -729,6 +750,13 @@ if [ "$CONFIG_ACER_PICA_61" = "y" -o \
4317 "$CONFIG_MIPS_PB1000" = "y" -o \
4318 "$CONFIG_MIPS_PB1100" = "y" -o \
4319 "$CONFIG_MIPS_PB1500" = "y" -o \
4320 + "$CONFIG_MIPS_PB1550" = "y" -o \
4321 + "$CONFIG_MIPS_PB1200" = "y" -o \
4322 + "$CONFIG_MIPS_DB1000" = "y" -o \
4323 + "$CONFIG_MIPS_DB1100" = "y" -o \
4324 + "$CONFIG_MIPS_DB1500" = "y" -o \
4325 + "$CONFIG_MIPS_DB1550" = "y" -o \
4326 + "$CONFIG_MIPS_DB1200" = "y" -o \
4327 "$CONFIG_NEC_OSPREY" = "y" -o \
4328 "$CONFIG_NEC_EAGLE" = "y" -o \
4329 "$CONFIG_NINO" = "y" -o \
4330 --- a/arch/mips/defconfig
4331 +++ b/arch/mips/defconfig
4332 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
4333 # CONFIG_MIPS_PB1000 is not set
4334 # CONFIG_MIPS_PB1100 is not set
4335 # CONFIG_MIPS_PB1500 is not set
4336 -# CONFIG_MIPS_HYDROGEN3 is not set
4337 # CONFIG_MIPS_PB1550 is not set
4338 +# CONFIG_MIPS_HYDROGEN3 is not set
4339 # CONFIG_MIPS_XXS1500 is not set
4340 # CONFIG_MIPS_MTX1 is not set
4341 # CONFIG_COGENT_CSB250 is not set
4342 @@ -235,11 +235,6 @@ CONFIG_IP_PNP_BOOTP=y
4344 # CONFIG_IPX is not set
4345 # CONFIG_ATALK is not set
4348 -# Appletalk devices
4350 -# CONFIG_DEV_APPLETALK is not set
4351 # CONFIG_DECNET is not set
4352 # CONFIG_BRIDGE is not set
4353 # CONFIG_X25 is not set
4354 @@ -319,9 +314,11 @@ CONFIG_SGIWD93_SCSI=y
4355 # CONFIG_SCSI_MEGARAID is not set
4356 # CONFIG_SCSI_MEGARAID2 is not set
4357 # CONFIG_SCSI_SATA is not set
4358 +# CONFIG_SCSI_SATA_AHCI is not set
4359 # CONFIG_SCSI_SATA_SVW is not set
4360 # CONFIG_SCSI_ATA_PIIX is not set
4361 # CONFIG_SCSI_SATA_NV is not set
4362 +# CONFIG_SCSI_SATA_QSTOR is not set
4363 # CONFIG_SCSI_SATA_PROMISE is not set
4364 # CONFIG_SCSI_SATA_SX4 is not set
4365 # CONFIG_SCSI_SATA_SIL is not set
4366 @@ -465,7 +462,6 @@ CONFIG_VT_CONSOLE=y
4367 # CONFIG_SERIAL is not set
4368 # CONFIG_SERIAL_EXTENDED is not set
4369 # CONFIG_SERIAL_NONSTANDARD is not set
4370 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
4371 CONFIG_UNIX98_PTYS=y
4372 CONFIG_UNIX98_PTY_COUNT=256
4374 --- a/arch/mips/defconfig-atlas
4375 +++ b/arch/mips/defconfig-atlas
4376 @@ -28,8 +28,8 @@ CONFIG_EXPERIMENTAL=y
4377 # CONFIG_MIPS_PB1000 is not set
4378 # CONFIG_MIPS_PB1100 is not set
4379 # CONFIG_MIPS_PB1500 is not set
4380 -# CONFIG_MIPS_HYDROGEN3 is not set
4381 # CONFIG_MIPS_PB1550 is not set
4382 +# CONFIG_MIPS_HYDROGEN3 is not set
4383 # CONFIG_MIPS_XXS1500 is not set
4384 # CONFIG_MIPS_MTX1 is not set
4385 # CONFIG_COGENT_CSB250 is not set
4386 @@ -235,11 +235,6 @@ CONFIG_IP_PNP=y
4388 # CONFIG_IPX is not set
4389 # CONFIG_ATALK is not set
4392 -# Appletalk devices
4394 -# CONFIG_DEV_APPLETALK is not set
4395 # CONFIG_DECNET is not set
4396 # CONFIG_BRIDGE is not set
4397 # CONFIG_X25 is not set
4398 @@ -317,9 +312,11 @@ CONFIG_SD_EXTRA_DEVS=40
4399 # CONFIG_SCSI_MEGARAID is not set
4400 # CONFIG_SCSI_MEGARAID2 is not set
4401 # CONFIG_SCSI_SATA is not set
4402 +# CONFIG_SCSI_SATA_AHCI is not set
4403 # CONFIG_SCSI_SATA_SVW is not set
4404 # CONFIG_SCSI_ATA_PIIX is not set
4405 # CONFIG_SCSI_SATA_NV is not set
4406 +# CONFIG_SCSI_SATA_QSTOR is not set
4407 # CONFIG_SCSI_SATA_PROMISE is not set
4408 # CONFIG_SCSI_SATA_SX4 is not set
4409 # CONFIG_SCSI_SATA_SIL is not set
4410 @@ -528,7 +525,6 @@ CONFIG_SERIAL=y
4411 CONFIG_SERIAL_CONSOLE=y
4412 # CONFIG_SERIAL_EXTENDED is not set
4413 # CONFIG_SERIAL_NONSTANDARD is not set
4414 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
4415 CONFIG_UNIX98_PTYS=y
4416 CONFIG_UNIX98_PTY_COUNT=256
4418 --- a/arch/mips/defconfig-bosporus
4419 +++ b/arch/mips/defconfig-bosporus
4420 @@ -30,8 +30,8 @@ CONFIG_MIPS_BOSPORUS=y
4421 # CONFIG_MIPS_PB1000 is not set
4422 # CONFIG_MIPS_PB1100 is not set
4423 # CONFIG_MIPS_PB1500 is not set
4424 -# CONFIG_MIPS_HYDROGEN3 is not set
4425 # CONFIG_MIPS_PB1550 is not set
4426 +# CONFIG_MIPS_HYDROGEN3 is not set
4427 # CONFIG_MIPS_XXS1500 is not set
4428 # CONFIG_MIPS_MTX1 is not set
4429 # CONFIG_COGENT_CSB250 is not set
4430 @@ -208,9 +208,7 @@ CONFIG_MTD_CFI_AMDSTD=y
4431 CONFIG_MTD_BOSPORUS=y
4432 # CONFIG_MTD_XXS1500 is not set
4433 # CONFIG_MTD_MTX1 is not set
4434 -# CONFIG_MTD_DB1X00 is not set
4435 # CONFIG_MTD_PB1550 is not set
4436 -# CONFIG_MTD_HYDROGEN3 is not set
4437 # CONFIG_MTD_MIRAGE is not set
4438 # CONFIG_MTD_CSTM_MIPS_IXX is not set
4439 # CONFIG_MTD_OCELOT is not set
4440 @@ -229,7 +227,6 @@ CONFIG_MTD_BOSPORUS=y
4442 # Disk-On-Chip Device Drivers
4444 -# CONFIG_MTD_DOC1000 is not set
4445 # CONFIG_MTD_DOC2000 is not set
4446 # CONFIG_MTD_DOC2001 is not set
4447 # CONFIG_MTD_DOCPROBE is not set
4448 @@ -373,11 +370,6 @@ CONFIG_IP_NF_MANGLE=m
4450 # CONFIG_IPX is not set
4451 # CONFIG_ATALK is not set
4454 -# Appletalk devices
4456 -# CONFIG_DEV_APPLETALK is not set
4457 # CONFIG_DECNET is not set
4458 # CONFIG_BRIDGE is not set
4459 # CONFIG_X25 is not set
4460 @@ -457,9 +449,11 @@ CONFIG_SCSI_CONSTANTS=y
4461 # CONFIG_SCSI_MEGARAID is not set
4462 # CONFIG_SCSI_MEGARAID2 is not set
4463 # CONFIG_SCSI_SATA is not set
4464 +# CONFIG_SCSI_SATA_AHCI is not set
4465 # CONFIG_SCSI_SATA_SVW is not set
4466 # CONFIG_SCSI_ATA_PIIX is not set
4467 # CONFIG_SCSI_SATA_NV is not set
4468 +# CONFIG_SCSI_SATA_QSTOR is not set
4469 # CONFIG_SCSI_SATA_PROMISE is not set
4470 # CONFIG_SCSI_SATA_SX4 is not set
4471 # CONFIG_SCSI_SATA_SIL is not set
4472 @@ -681,7 +675,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
4473 # CONFIG_AU1X00_USB_TTY is not set
4474 # CONFIG_AU1X00_USB_RAW is not set
4475 # CONFIG_TXX927_SERIAL is not set
4476 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
4477 CONFIG_UNIX98_PTYS=y
4478 CONFIG_UNIX98_PTY_COUNT=256
4480 --- a/arch/mips/defconfig-capcella
4481 +++ b/arch/mips/defconfig-capcella
4482 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
4483 # CONFIG_MIPS_PB1000 is not set
4484 # CONFIG_MIPS_PB1100 is not set
4485 # CONFIG_MIPS_PB1500 is not set
4486 -# CONFIG_MIPS_HYDROGEN3 is not set
4487 # CONFIG_MIPS_PB1550 is not set
4488 +# CONFIG_MIPS_HYDROGEN3 is not set
4489 # CONFIG_MIPS_XXS1500 is not set
4490 # CONFIG_MIPS_MTX1 is not set
4491 # CONFIG_COGENT_CSB250 is not set
4492 @@ -228,11 +228,6 @@ CONFIG_IP_PNP_BOOTP=y
4494 # CONFIG_IPX is not set
4495 # CONFIG_ATALK is not set
4498 -# Appletalk devices
4500 -# CONFIG_DEV_APPLETALK is not set
4501 # CONFIG_DECNET is not set
4502 # CONFIG_BRIDGE is not set
4503 # CONFIG_X25 is not set
4504 @@ -472,7 +467,6 @@ CONFIG_SERIAL=y
4505 CONFIG_SERIAL_CONSOLE=y
4506 # CONFIG_SERIAL_EXTENDED is not set
4507 # CONFIG_SERIAL_NONSTANDARD is not set
4508 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
4509 # CONFIG_VR41XX_KIU is not set
4510 CONFIG_UNIX98_PTYS=y
4511 CONFIG_UNIX98_PTY_COUNT=256
4512 --- a/arch/mips/defconfig-cobalt
4513 +++ b/arch/mips/defconfig-cobalt
4514 @@ -28,8 +28,8 @@ CONFIG_EXPERIMENTAL=y
4515 # CONFIG_MIPS_PB1000 is not set
4516 # CONFIG_MIPS_PB1100 is not set
4517 # CONFIG_MIPS_PB1500 is not set
4518 -# CONFIG_MIPS_HYDROGEN3 is not set
4519 # CONFIG_MIPS_PB1550 is not set
4520 +# CONFIG_MIPS_HYDROGEN3 is not set
4521 # CONFIG_MIPS_XXS1500 is not set
4522 # CONFIG_MIPS_MTX1 is not set
4523 # CONFIG_COGENT_CSB250 is not set
4524 @@ -222,11 +222,6 @@ CONFIG_INET=y
4526 # CONFIG_IPX is not set
4527 # CONFIG_ATALK is not set
4530 -# Appletalk devices
4532 -# CONFIG_DEV_APPLETALK is not set
4533 # CONFIG_DECNET is not set
4534 # CONFIG_BRIDGE is not set
4535 # CONFIG_X25 is not set
4536 @@ -505,7 +500,6 @@ CONFIG_SERIAL=y
4537 CONFIG_SERIAL_CONSOLE=y
4538 # CONFIG_SERIAL_EXTENDED is not set
4539 # CONFIG_SERIAL_NONSTANDARD is not set
4540 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
4541 CONFIG_UNIX98_PTYS=y
4542 CONFIG_UNIX98_PTY_COUNT=16
4544 --- a/arch/mips/defconfig-csb250
4545 +++ b/arch/mips/defconfig-csb250
4546 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
4547 # CONFIG_MIPS_PB1000 is not set
4548 # CONFIG_MIPS_PB1100 is not set
4549 # CONFIG_MIPS_PB1500 is not set
4550 -# CONFIG_MIPS_HYDROGEN3 is not set
4551 # CONFIG_MIPS_PB1550 is not set
4552 +# CONFIG_MIPS_HYDROGEN3 is not set
4553 # CONFIG_MIPS_XXS1500 is not set
4554 # CONFIG_MIPS_MTX1 is not set
4555 CONFIG_COGENT_CSB250=y
4556 @@ -268,11 +268,6 @@ CONFIG_IP_PNP_BOOTP=y
4558 # CONFIG_IPX is not set
4559 # CONFIG_ATALK is not set
4562 -# Appletalk devices
4564 -# CONFIG_DEV_APPLETALK is not set
4565 # CONFIG_DECNET is not set
4566 # CONFIG_BRIDGE is not set
4567 # CONFIG_X25 is not set
4568 @@ -556,7 +551,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
4569 # CONFIG_AU1X00_USB_TTY is not set
4570 # CONFIG_AU1X00_USB_RAW is not set
4571 # CONFIG_TXX927_SERIAL is not set
4572 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
4573 CONFIG_UNIX98_PTYS=y
4574 CONFIG_UNIX98_PTY_COUNT=256
4576 --- a/arch/mips/defconfig-db1000
4577 +++ b/arch/mips/defconfig-db1000
4578 @@ -30,8 +30,8 @@ CONFIG_MIPS_DB1000=y
4579 # CONFIG_MIPS_PB1000 is not set
4580 # CONFIG_MIPS_PB1100 is not set
4581 # CONFIG_MIPS_PB1500 is not set
4582 -# CONFIG_MIPS_HYDROGEN3 is not set
4583 # CONFIG_MIPS_PB1550 is not set
4584 +# CONFIG_MIPS_HYDROGEN3 is not set
4585 # CONFIG_MIPS_XXS1500 is not set
4586 # CONFIG_MIPS_MTX1 is not set
4587 # CONFIG_COGENT_CSB250 is not set
4588 @@ -214,11 +214,7 @@ CONFIG_MTD_CFI_AMDSTD=y
4589 # CONFIG_MTD_BOSPORUS is not set
4590 # CONFIG_MTD_XXS1500 is not set
4591 # CONFIG_MTD_MTX1 is not set
4592 -CONFIG_MTD_DB1X00=y
4593 -CONFIG_MTD_DB1X00_BOOT=y
4594 -CONFIG_MTD_DB1X00_USER=y
4595 # CONFIG_MTD_PB1550 is not set
4596 -# CONFIG_MTD_HYDROGEN3 is not set
4597 # CONFIG_MTD_MIRAGE is not set
4598 # CONFIG_MTD_CSTM_MIPS_IXX is not set
4599 # CONFIG_MTD_OCELOT is not set
4600 @@ -237,7 +233,6 @@ CONFIG_MTD_DB1X00_USER=y
4602 # Disk-On-Chip Device Drivers
4604 -# CONFIG_MTD_DOC1000 is not set
4605 # CONFIG_MTD_DOC2000 is not set
4606 # CONFIG_MTD_DOC2001 is not set
4607 # CONFIG_MTD_DOCPROBE is not set
4608 @@ -342,11 +337,6 @@ CONFIG_IP_PNP_BOOTP=y
4610 # CONFIG_IPX is not set
4611 # CONFIG_ATALK is not set
4614 -# Appletalk devices
4616 -# CONFIG_DEV_APPLETALK is not set
4617 # CONFIG_DECNET is not set
4618 # CONFIG_BRIDGE is not set
4619 # CONFIG_X25 is not set
4620 @@ -636,7 +626,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
4621 # CONFIG_AU1X00_USB_TTY is not set
4622 # CONFIG_AU1X00_USB_RAW is not set
4623 # CONFIG_TXX927_SERIAL is not set
4624 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
4625 CONFIG_UNIX98_PTYS=y
4626 CONFIG_UNIX98_PTY_COUNT=256
4628 --- a/arch/mips/defconfig-db1100
4629 +++ b/arch/mips/defconfig-db1100
4630 @@ -30,8 +30,8 @@ CONFIG_MIPS_DB1100=y
4631 # CONFIG_MIPS_PB1000 is not set
4632 # CONFIG_MIPS_PB1100 is not set
4633 # CONFIG_MIPS_PB1500 is not set
4634 -# CONFIG_MIPS_HYDROGEN3 is not set
4635 # CONFIG_MIPS_PB1550 is not set
4636 +# CONFIG_MIPS_HYDROGEN3 is not set
4637 # CONFIG_MIPS_XXS1500 is not set
4638 # CONFIG_MIPS_MTX1 is not set
4639 # CONFIG_COGENT_CSB250 is not set
4640 @@ -214,11 +214,7 @@ CONFIG_MTD_CFI_AMDSTD=y
4641 # CONFIG_MTD_BOSPORUS is not set
4642 # CONFIG_MTD_XXS1500 is not set
4643 # CONFIG_MTD_MTX1 is not set
4644 -CONFIG_MTD_DB1X00=y
4645 -# CONFIG_MTD_DB1X00_BOOT is not set
4646 -CONFIG_MTD_DB1X00_USER=y
4647 # CONFIG_MTD_PB1550 is not set
4648 -# CONFIG_MTD_HYDROGEN3 is not set
4649 # CONFIG_MTD_MIRAGE is not set
4650 # CONFIG_MTD_CSTM_MIPS_IXX is not set
4651 # CONFIG_MTD_OCELOT is not set
4652 @@ -237,7 +233,6 @@ CONFIG_MTD_DB1X00_USER=y
4654 # Disk-On-Chip Device Drivers
4656 -# CONFIG_MTD_DOC1000 is not set
4657 # CONFIG_MTD_DOC2000 is not set
4658 # CONFIG_MTD_DOC2001 is not set
4659 # CONFIG_MTD_DOCPROBE is not set
4660 @@ -342,11 +337,6 @@ CONFIG_IP_PNP_BOOTP=y
4662 # CONFIG_IPX is not set
4663 # CONFIG_ATALK is not set
4666 -# Appletalk devices
4668 -# CONFIG_DEV_APPLETALK is not set
4669 # CONFIG_DECNET is not set
4670 # CONFIG_BRIDGE is not set
4671 # CONFIG_X25 is not set
4672 @@ -636,7 +626,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
4673 # CONFIG_AU1X00_USB_TTY is not set
4674 # CONFIG_AU1X00_USB_RAW is not set
4675 # CONFIG_TXX927_SERIAL is not set
4676 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
4677 CONFIG_UNIX98_PTYS=y
4678 CONFIG_UNIX98_PTY_COUNT=256
4680 @@ -884,6 +873,7 @@ CONFIG_DUMMY_CONSOLE=y
4681 # CONFIG_FB_PM2 is not set
4682 # CONFIG_FB_PM3 is not set
4683 # CONFIG_FB_CYBER2000 is not set
4685 # CONFIG_FB_MATROX is not set
4686 # CONFIG_FB_ATY is not set
4687 # CONFIG_FB_RADEON is not set
4688 @@ -895,7 +885,6 @@ CONFIG_DUMMY_CONSOLE=y
4689 # CONFIG_FB_VOODOO1 is not set
4690 # CONFIG_FB_TRIDENT is not set
4691 # CONFIG_FB_E1356 is not set
4693 # CONFIG_FB_IT8181 is not set
4694 # CONFIG_FB_VIRTUAL is not set
4695 CONFIG_FBCON_ADVANCED=y
4697 +++ b/arch/mips/defconfig-db1200
4700 +# Automatically generated make config: don't edit
4704 +# CONFIG_MIPS64 is not set
4707 +# Code maturity level options
4709 +CONFIG_EXPERIMENTAL=y
4712 +# Loadable module support
4715 +# CONFIG_MODVERSIONS is not set
4719 +# Machine selection
4721 +# CONFIG_ACER_PICA_61 is not set
4722 +# CONFIG_MIPS_BOSPORUS is not set
4723 +# CONFIG_MIPS_MIRAGE is not set
4724 +# CONFIG_MIPS_DB1000 is not set
4725 +# CONFIG_MIPS_DB1100 is not set
4726 +# CONFIG_MIPS_DB1500 is not set
4727 +# CONFIG_MIPS_DB1550 is not set
4728 +# CONFIG_MIPS_PB1000 is not set
4729 +# CONFIG_MIPS_PB1100 is not set
4730 +# CONFIG_MIPS_PB1500 is not set
4731 +# CONFIG_MIPS_PB1550 is not set
4732 +# CONFIG_MIPS_HYDROGEN3 is not set
4733 +# CONFIG_MIPS_XXS1500 is not set
4734 +# CONFIG_MIPS_MTX1 is not set
4735 +# CONFIG_COGENT_CSB250 is not set
4736 +# CONFIG_BAGET_MIPS is not set
4737 +# CONFIG_CASIO_E55 is not set
4738 +# CONFIG_MIPS_COBALT is not set
4739 +# CONFIG_DECSTATION is not set
4740 +# CONFIG_MIPS_EV64120 is not set
4741 +# CONFIG_MIPS_EV96100 is not set
4742 +# CONFIG_MIPS_IVR is not set
4743 +# CONFIG_HP_LASERJET is not set
4744 +# CONFIG_IBM_WORKPAD is not set
4745 +# CONFIG_LASAT is not set
4746 +# CONFIG_MIPS_ITE8172 is not set
4747 +# CONFIG_MIPS_ATLAS is not set
4748 +# CONFIG_MIPS_MAGNUM_4000 is not set
4749 +# CONFIG_MIPS_MALTA is not set
4750 +# CONFIG_MIPS_SEAD is not set
4751 +# CONFIG_MOMENCO_OCELOT is not set
4752 +# CONFIG_MOMENCO_OCELOT_G is not set
4753 +# CONFIG_MOMENCO_OCELOT_C is not set
4754 +# CONFIG_MOMENCO_JAGUAR_ATX is not set
4755 +# CONFIG_PMC_BIG_SUR is not set
4756 +# CONFIG_PMC_STRETCH is not set
4757 +# CONFIG_PMC_YOSEMITE is not set
4758 +# CONFIG_DDB5074 is not set
4759 +# CONFIG_DDB5476 is not set
4760 +# CONFIG_DDB5477 is not set
4761 +# CONFIG_NEC_OSPREY is not set
4762 +# CONFIG_NEC_EAGLE is not set
4763 +# CONFIG_OLIVETTI_M700 is not set
4764 +# CONFIG_NINO is not set
4765 +# CONFIG_SGI_IP22 is not set
4766 +# CONFIG_SGI_IP27 is not set
4767 +# CONFIG_SIBYTE_SB1xxx_SOC is not set
4768 +# CONFIG_SNI_RM200_PCI is not set
4769 +# CONFIG_TANBAC_TB0226 is not set
4770 +# CONFIG_TANBAC_TB0229 is not set
4771 +# CONFIG_TOSHIBA_JMR3927 is not set
4772 +# CONFIG_TOSHIBA_RBTX4927 is not set
4773 +# CONFIG_VICTOR_MPC30X is not set
4774 +# CONFIG_ZAO_CAPCELLA is not set
4775 +# CONFIG_HIGHMEM is not set
4776 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
4777 +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
4778 +# CONFIG_MIPS_AU1000 is not set
4783 +CONFIG_CPU_MIPS32=y
4784 +# CONFIG_CPU_MIPS64 is not set
4785 +# CONFIG_CPU_R3000 is not set
4786 +# CONFIG_CPU_TX39XX is not set
4787 +# CONFIG_CPU_VR41XX is not set
4788 +# CONFIG_CPU_R4300 is not set
4789 +# CONFIG_CPU_R4X00 is not set
4790 +# CONFIG_CPU_TX49XX is not set
4791 +# CONFIG_CPU_R5000 is not set
4792 +# CONFIG_CPU_R5432 is not set
4793 +# CONFIG_CPU_R6000 is not set
4794 +# CONFIG_CPU_NEVADA is not set
4795 +# CONFIG_CPU_R8000 is not set
4796 +# CONFIG_CPU_R10000 is not set
4797 +# CONFIG_CPU_RM7000 is not set
4798 +# CONFIG_CPU_RM9000 is not set
4799 +# CONFIG_CPU_SB1 is not set
4800 +CONFIG_PAGE_SIZE_4KB=y
4801 +# CONFIG_PAGE_SIZE_16KB is not set
4802 +# CONFIG_PAGE_SIZE_64KB is not set
4803 +CONFIG_CPU_HAS_PREFETCH=y
4804 +# CONFIG_VTAG_ICACHE is not set
4805 +CONFIG_64BIT_PHYS_ADDR=y
4806 +# CONFIG_CPU_ADVANCED is not set
4807 +CONFIG_CPU_HAS_LLSC=y
4808 +# CONFIG_CPU_HAS_LLDSCD is not set
4809 +# CONFIG_CPU_HAS_WB is not set
4810 +CONFIG_CPU_HAS_SYNC=y
4815 +CONFIG_CPU_LITTLE_ENDIAN=y
4816 +# CONFIG_BUILD_ELF64 is not set
4821 +# CONFIG_PCI_NAMES is not set
4822 +# CONFIG_ISA is not set
4823 +# CONFIG_TC is not set
4824 +# CONFIG_MCA is not set
4825 +# CONFIG_SBUS is not set
4829 +# PCMCIA/CardBus support
4832 +# CONFIG_CARDBUS is not set
4833 +# CONFIG_TCIC is not set
4834 +# CONFIG_I82092 is not set
4835 +# CONFIG_I82365 is not set
4838 +# PCI Hotplug Support
4840 +# CONFIG_HOTPLUG_PCI is not set
4841 +# CONFIG_HOTPLUG_PCI_COMPAQ is not set
4842 +# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
4843 +# CONFIG_HOTPLUG_PCI_SHPC is not set
4844 +# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
4845 +# CONFIG_HOTPLUG_PCI_PCIE is not set
4846 +# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
4848 +# CONFIG_BSD_PROCESS_ACCT is not set
4851 +# CONFIG_KCORE_AOUT is not set
4852 +# CONFIG_BINFMT_AOUT is not set
4853 +CONFIG_BINFMT_ELF=y
4854 +# CONFIG_MIPS32_COMPAT is not set
4855 +# CONFIG_MIPS32_O32 is not set
4856 +# CONFIG_MIPS32_N32 is not set
4857 +# CONFIG_BINFMT_ELF32 is not set
4858 +# CONFIG_BINFMT_MISC is not set
4859 +# CONFIG_OOM_KILLER is not set
4860 +CONFIG_CMDLINE_BOOL=y
4861 +CONFIG_CMDLINE="mem=96M"
4864 +# Memory Technology Devices (MTD)
4866 +# CONFIG_MTD is not set
4869 +# Parallel port support
4871 +# CONFIG_PARPORT is not set
4874 +# Plug and Play configuration
4876 +# CONFIG_PNP is not set
4877 +# CONFIG_ISAPNP is not set
4882 +# CONFIG_BLK_DEV_FD is not set
4883 +# CONFIG_BLK_DEV_XD is not set
4884 +# CONFIG_PARIDE is not set
4885 +# CONFIG_BLK_CPQ_DA is not set
4886 +# CONFIG_BLK_CPQ_CISS_DA is not set
4887 +# CONFIG_CISS_SCSI_TAPE is not set
4888 +# CONFIG_CISS_MONITOR_THREAD is not set
4889 +# CONFIG_BLK_DEV_DAC960 is not set
4890 +# CONFIG_BLK_DEV_UMEM is not set
4891 +# CONFIG_BLK_DEV_SX8 is not set
4892 +CONFIG_BLK_DEV_LOOP=y
4893 +# CONFIG_BLK_DEV_NBD is not set
4894 +# CONFIG_BLK_DEV_RAM is not set
4895 +# CONFIG_BLK_DEV_INITRD is not set
4896 +# CONFIG_BLK_STATS is not set
4899 +# Multi-device support (RAID and LVM)
4901 +# CONFIG_MD is not set
4902 +# CONFIG_BLK_DEV_MD is not set
4903 +# CONFIG_MD_LINEAR is not set
4904 +# CONFIG_MD_RAID0 is not set
4905 +# CONFIG_MD_RAID1 is not set
4906 +# CONFIG_MD_RAID5 is not set
4907 +# CONFIG_MD_MULTIPATH is not set
4908 +# CONFIG_BLK_DEV_LVM is not set
4911 +# Networking options
4914 +# CONFIG_PACKET_MMAP is not set
4915 +# CONFIG_NETLINK_DEV is not set
4917 +# CONFIG_NETFILTER_DEBUG is not set
4921 +CONFIG_IP_MULTICAST=y
4922 +# CONFIG_IP_ADVANCED_ROUTER is not set
4924 +# CONFIG_IP_PNP_DHCP is not set
4925 +CONFIG_IP_PNP_BOOTP=y
4926 +# CONFIG_IP_PNP_RARP is not set
4927 +# CONFIG_NET_IPIP is not set
4928 +# CONFIG_NET_IPGRE is not set
4929 +# CONFIG_IP_MROUTE is not set
4930 +# CONFIG_ARPD is not set
4931 +# CONFIG_INET_ECN is not set
4932 +# CONFIG_SYN_COOKIES is not set
4935 +# IP: Netfilter Configuration
4937 +# CONFIG_IP_NF_CONNTRACK is not set
4938 +# CONFIG_IP_NF_QUEUE is not set
4939 +# CONFIG_IP_NF_IPTABLES is not set
4940 +# CONFIG_IP_NF_ARPTABLES is not set
4941 +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
4942 +# CONFIG_IP_NF_COMPAT_IPFWADM is not set
4945 +# IP: Virtual Server Configuration
4947 +# CONFIG_IP_VS is not set
4948 +# CONFIG_IPV6 is not set
4949 +# CONFIG_KHTTPD is not set
4952 +# SCTP Configuration (EXPERIMENTAL)
4954 +# CONFIG_IP_SCTP is not set
4955 +# CONFIG_ATM is not set
4956 +# CONFIG_VLAN_8021Q is not set
4961 +# CONFIG_IPX is not set
4962 +# CONFIG_ATALK is not set
4963 +# CONFIG_DECNET is not set
4964 +# CONFIG_BRIDGE is not set
4965 +# CONFIG_X25 is not set
4966 +# CONFIG_LAPB is not set
4967 +# CONFIG_LLC is not set
4968 +# CONFIG_NET_DIVERT is not set
4969 +# CONFIG_ECONET is not set
4970 +# CONFIG_WAN_ROUTER is not set
4971 +# CONFIG_NET_FASTROUTE is not set
4972 +# CONFIG_NET_HW_FLOWCONTROL is not set
4975 +# QoS and/or fair queueing
4977 +# CONFIG_NET_SCHED is not set
4982 +# CONFIG_NET_PKTGEN is not set
4985 +# Telephony Support
4987 +# CONFIG_PHONE is not set
4988 +# CONFIG_PHONE_IXJ is not set
4989 +# CONFIG_PHONE_IXJ_PCMCIA is not set
4992 +# ATA/IDE/MFM/RLL support
4997 +# IDE, ATA and ATAPI Block devices
4999 +CONFIG_BLK_DEV_IDE=y
5002 +# Please see Documentation/ide.txt for help/info on IDE drives
5004 +# CONFIG_BLK_DEV_HD_IDE is not set
5005 +# CONFIG_BLK_DEV_HD is not set
5006 +# CONFIG_BLK_DEV_IDE_SATA is not set
5007 +CONFIG_BLK_DEV_IDEDISK=y
5008 +CONFIG_IDEDISK_MULTI_MODE=y
5009 +CONFIG_IDEDISK_STROKE=y
5010 +CONFIG_BLK_DEV_IDECS=m
5011 +# CONFIG_BLK_DEV_DELKIN is not set
5012 +# CONFIG_BLK_DEV_IDECD is not set
5013 +# CONFIG_BLK_DEV_IDETAPE is not set
5014 +# CONFIG_BLK_DEV_IDEFLOPPY is not set
5015 +# CONFIG_BLK_DEV_IDESCSI is not set
5016 +# CONFIG_IDE_TASK_IOCTL is not set
5019 +# IDE chipset support/bugfixes
5021 +# CONFIG_BLK_DEV_CMD640 is not set
5022 +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
5023 +# CONFIG_BLK_DEV_ISAPNP is not set
5024 +# CONFIG_BLK_DEV_IDEPCI is not set
5025 +# CONFIG_IDE_CHIPSETS is not set
5026 +# CONFIG_IDEDMA_AUTO is not set
5027 +# CONFIG_DMA_NONPCI is not set
5028 +# CONFIG_BLK_DEV_ATARAID is not set
5029 +# CONFIG_BLK_DEV_ATARAID_PDC is not set
5030 +# CONFIG_BLK_DEV_ATARAID_HPT is not set
5031 +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
5032 +# CONFIG_BLK_DEV_ATARAID_SII is not set
5040 +# SCSI support type (disk, tape, CD-ROM)
5042 +CONFIG_BLK_DEV_SD=y
5043 +CONFIG_SD_EXTRA_DEVS=40
5044 +CONFIG_CHR_DEV_ST=y
5045 +# CONFIG_CHR_DEV_OSST is not set
5046 +CONFIG_BLK_DEV_SR=y
5047 +# CONFIG_BLK_DEV_SR_VENDOR is not set
5048 +CONFIG_SR_EXTRA_DEVS=2
5049 +# CONFIG_CHR_DEV_SG is not set
5052 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
5054 +# CONFIG_SCSI_DEBUG_QUEUES is not set
5055 +# CONFIG_SCSI_MULTI_LUN is not set
5056 +CONFIG_SCSI_CONSTANTS=y
5057 +# CONFIG_SCSI_LOGGING is not set
5060 +# SCSI low-level drivers
5062 +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
5063 +# CONFIG_SCSI_7000FASST is not set
5064 +# CONFIG_SCSI_ACARD is not set
5065 +# CONFIG_SCSI_AHA152X is not set
5066 +# CONFIG_SCSI_AHA1542 is not set
5067 +# CONFIG_SCSI_AHA1740 is not set
5068 +# CONFIG_SCSI_AACRAID is not set
5069 +# CONFIG_SCSI_AIC7XXX is not set
5070 +# CONFIG_SCSI_AIC79XX is not set
5071 +# CONFIG_SCSI_AIC7XXX_OLD is not set
5072 +# CONFIG_SCSI_DPT_I2O is not set
5073 +# CONFIG_SCSI_ADVANSYS is not set
5074 +# CONFIG_SCSI_IN2000 is not set
5075 +# CONFIG_SCSI_AM53C974 is not set
5076 +# CONFIG_SCSI_MEGARAID is not set
5077 +# CONFIG_SCSI_MEGARAID2 is not set
5078 +# CONFIG_SCSI_SATA is not set
5079 +# CONFIG_SCSI_SATA_AHCI is not set
5080 +# CONFIG_SCSI_SATA_SVW is not set
5081 +# CONFIG_SCSI_ATA_PIIX is not set
5082 +# CONFIG_SCSI_SATA_NV is not set
5083 +# CONFIG_SCSI_SATA_QSTOR is not set
5084 +# CONFIG_SCSI_SATA_PROMISE is not set
5085 +# CONFIG_SCSI_SATA_SX4 is not set
5086 +# CONFIG_SCSI_SATA_SIL is not set
5087 +# CONFIG_SCSI_SATA_SIS is not set
5088 +# CONFIG_SCSI_SATA_ULI is not set
5089 +# CONFIG_SCSI_SATA_VIA is not set
5090 +# CONFIG_SCSI_SATA_VITESSE is not set
5091 +# CONFIG_SCSI_BUSLOGIC is not set
5092 +# CONFIG_SCSI_CPQFCTS is not set
5093 +# CONFIG_SCSI_DMX3191D is not set
5094 +# CONFIG_SCSI_DTC3280 is not set
5095 +# CONFIG_SCSI_EATA is not set
5096 +# CONFIG_SCSI_EATA_DMA is not set
5097 +# CONFIG_SCSI_EATA_PIO is not set
5098 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
5099 +# CONFIG_SCSI_GDTH is not set
5100 +# CONFIG_SCSI_GENERIC_NCR5380 is not set
5101 +# CONFIG_SCSI_INITIO is not set
5102 +# CONFIG_SCSI_INIA100 is not set
5103 +# CONFIG_SCSI_NCR53C406A is not set
5104 +# CONFIG_SCSI_NCR53C7xx is not set
5105 +# CONFIG_SCSI_SYM53C8XX_2 is not set
5106 +# CONFIG_SCSI_NCR53C8XX is not set
5107 +# CONFIG_SCSI_SYM53C8XX is not set
5108 +# CONFIG_SCSI_PAS16 is not set
5109 +# CONFIG_SCSI_PCI2000 is not set
5110 +# CONFIG_SCSI_PCI2220I is not set
5111 +# CONFIG_SCSI_PSI240I is not set
5112 +# CONFIG_SCSI_QLOGIC_FAS is not set
5113 +# CONFIG_SCSI_QLOGIC_ISP is not set
5114 +# CONFIG_SCSI_QLOGIC_FC is not set
5115 +# CONFIG_SCSI_QLOGIC_1280 is not set
5116 +# CONFIG_SCSI_SIM710 is not set
5117 +# CONFIG_SCSI_SYM53C416 is not set
5118 +# CONFIG_SCSI_DC390T is not set
5119 +# CONFIG_SCSI_T128 is not set
5120 +# CONFIG_SCSI_U14_34F is not set
5121 +# CONFIG_SCSI_NSP32 is not set
5122 +# CONFIG_SCSI_DEBUG is not set
5125 +# PCMCIA SCSI adapter support
5127 +# CONFIG_SCSI_PCMCIA is not set
5130 +# Fusion MPT device support
5132 +# CONFIG_FUSION is not set
5133 +# CONFIG_FUSION_BOOT is not set
5134 +# CONFIG_FUSION_ISENSE is not set
5135 +# CONFIG_FUSION_CTL is not set
5136 +# CONFIG_FUSION_LAN is not set
5139 +# IEEE 1394 (FireWire) support (EXPERIMENTAL)
5141 +# CONFIG_IEEE1394 is not set
5144 +# I2O device support
5146 +# CONFIG_I2O is not set
5147 +# CONFIG_I2O_PCI is not set
5148 +# CONFIG_I2O_BLOCK is not set
5149 +# CONFIG_I2O_LAN is not set
5150 +# CONFIG_I2O_SCSI is not set
5151 +# CONFIG_I2O_PROC is not set
5154 +# Network device support
5156 +CONFIG_NETDEVICES=y
5161 +# CONFIG_ARCNET is not set
5162 +# CONFIG_DUMMY is not set
5163 +# CONFIG_BONDING is not set
5164 +# CONFIG_EQUALIZER is not set
5165 +# CONFIG_TUN is not set
5166 +# CONFIG_ETHERTAP is not set
5169 +# Ethernet (10 or 100Mbit)
5171 +CONFIG_NET_ETHERNET=y
5172 +# CONFIG_SUNLANCE is not set
5173 +# CONFIG_HAPPYMEAL is not set
5174 +# CONFIG_SUNBMAC is not set
5175 +# CONFIG_SUNQE is not set
5176 +# CONFIG_SUNGEM is not set
5177 +# CONFIG_NET_VENDOR_3COM is not set
5178 +# CONFIG_LANCE is not set
5179 +# CONFIG_NET_VENDOR_SMC is not set
5180 +# CONFIG_NET_VENDOR_RACAL is not set
5181 +# CONFIG_HP100 is not set
5182 +# CONFIG_NET_ISA is not set
5183 +# CONFIG_NET_PCI is not set
5184 +# CONFIG_NET_POCKET is not set
5187 +# Ethernet (1000 Mbit)
5189 +# CONFIG_ACENIC is not set
5190 +# CONFIG_DL2K is not set
5191 +# CONFIG_E1000 is not set
5192 +# CONFIG_MYRI_SBUS is not set
5193 +# CONFIG_NS83820 is not set
5194 +# CONFIG_HAMACHI is not set
5195 +# CONFIG_YELLOWFIN is not set
5196 +# CONFIG_R8169 is not set
5197 +# CONFIG_SK98LIN is not set
5198 +# CONFIG_TIGON3 is not set
5199 +# CONFIG_FDDI is not set
5200 +# CONFIG_HIPPI is not set
5201 +# CONFIG_PLIP is not set
5202 +# CONFIG_PPP is not set
5203 +# CONFIG_SLIP is not set
5206 +# Wireless LAN (non-hamradio)
5208 +# CONFIG_NET_RADIO is not set
5211 +# Token Ring devices
5213 +# CONFIG_TR is not set
5214 +# CONFIG_NET_FC is not set
5215 +# CONFIG_RCPCI is not set
5216 +# CONFIG_SHAPER is not set
5221 +# CONFIG_WAN is not set
5224 +# PCMCIA network device support
5226 +# CONFIG_NET_PCMCIA is not set
5229 +# Amateur Radio support
5231 +# CONFIG_HAMRADIO is not set
5234 +# IrDA (infrared) support
5236 +# CONFIG_IRDA is not set
5241 +# CONFIG_ISDN is not set
5244 +# Input core support
5247 +CONFIG_INPUT_KEYBDEV=y
5248 +CONFIG_INPUT_MOUSEDEV=y
5249 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
5250 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
5251 +# CONFIG_INPUT_JOYDEV is not set
5252 +CONFIG_INPUT_EVDEV=y
5253 +# CONFIG_INPUT_UINPUT is not set
5256 +# Character devices
5259 +# CONFIG_VT_CONSOLE is not set
5260 +# CONFIG_SERIAL is not set
5261 +# CONFIG_SERIAL_EXTENDED is not set
5262 +CONFIG_SERIAL_NONSTANDARD=y
5263 +# CONFIG_COMPUTONE is not set
5264 +# CONFIG_ROCKETPORT is not set
5265 +# CONFIG_CYCLADES is not set
5266 +# CONFIG_DIGIEPCA is not set
5267 +# CONFIG_DIGI is not set
5268 +# CONFIG_ESPSERIAL is not set
5269 +# CONFIG_MOXA_INTELLIO is not set
5270 +# CONFIG_MOXA_SMARTIO is not set
5271 +# CONFIG_ISI is not set
5272 +# CONFIG_SYNCLINK is not set
5273 +# CONFIG_SYNCLINKMP is not set
5274 +# CONFIG_N_HDLC is not set
5275 +# CONFIG_RISCOM8 is not set
5276 +# CONFIG_SPECIALIX is not set
5277 +# CONFIG_SX is not set
5278 +# CONFIG_RIO is not set
5279 +# CONFIG_STALDRV is not set
5280 +# CONFIG_SERIAL_TX3912 is not set
5281 +# CONFIG_SERIAL_TX3912_CONSOLE is not set
5282 +# CONFIG_SERIAL_TXX9 is not set
5283 +# CONFIG_SERIAL_TXX9_CONSOLE is not set
5284 +# CONFIG_TXX927_SERIAL is not set
5285 +CONFIG_UNIX98_PTYS=y
5286 +CONFIG_UNIX98_PTY_COUNT=256
5291 +# CONFIG_I2C is not set
5296 +# CONFIG_BUSMOUSE is not set
5297 +# CONFIG_MOUSE is not set
5302 +# CONFIG_INPUT_GAMEPORT is not set
5303 +# CONFIG_INPUT_NS558 is not set
5304 +# CONFIG_INPUT_LIGHTNING is not set
5305 +# CONFIG_INPUT_PCIGAME is not set
5306 +# CONFIG_INPUT_CS461X is not set
5307 +# CONFIG_INPUT_EMU10K1 is not set
5308 +# CONFIG_INPUT_SERIO is not set
5309 +# CONFIG_INPUT_SERPORT is not set
5314 +# CONFIG_INPUT_ANALOG is not set
5315 +# CONFIG_INPUT_A3D is not set
5316 +# CONFIG_INPUT_ADI is not set
5317 +# CONFIG_INPUT_COBRA is not set
5318 +# CONFIG_INPUT_GF2K is not set
5319 +# CONFIG_INPUT_GRIP is not set
5320 +# CONFIG_INPUT_INTERACT is not set
5321 +# CONFIG_INPUT_TMDC is not set
5322 +# CONFIG_INPUT_SIDEWINDER is not set
5323 +# CONFIG_INPUT_IFORCE_USB is not set
5324 +# CONFIG_INPUT_IFORCE_232 is not set
5325 +# CONFIG_INPUT_WARRIOR is not set
5326 +# CONFIG_INPUT_MAGELLAN is not set
5327 +# CONFIG_INPUT_SPACEORB is not set
5328 +# CONFIG_INPUT_SPACEBALL is not set
5329 +# CONFIG_INPUT_STINGER is not set
5330 +# CONFIG_INPUT_DB9 is not set
5331 +# CONFIG_INPUT_GAMECON is not set
5332 +# CONFIG_INPUT_TURBOGRAFX is not set
5333 +# CONFIG_QIC02_TAPE is not set
5334 +# CONFIG_IPMI_HANDLER is not set
5335 +# CONFIG_IPMI_PANIC_EVENT is not set
5336 +# CONFIG_IPMI_DEVICE_INTERFACE is not set
5337 +# CONFIG_IPMI_KCS is not set
5338 +# CONFIG_IPMI_WATCHDOG is not set
5343 +# CONFIG_WATCHDOG is not set
5344 +# CONFIG_SCx200 is not set
5345 +# CONFIG_SCx200_GPIO is not set
5346 +# CONFIG_AMD_PM768 is not set
5347 +# CONFIG_NVRAM is not set
5348 +# CONFIG_RTC is not set
5349 +# CONFIG_DTLK is not set
5350 +# CONFIG_R3964 is not set
5351 +# CONFIG_APPLICOM is not set
5354 +# Ftape, the floppy tape device driver
5356 +# CONFIG_FTAPE is not set
5357 +# CONFIG_AGP is not set
5360 +# Direct Rendering Manager (XFree86 DRI support)
5362 +# CONFIG_DRM is not set
5365 +# PCMCIA character devices
5367 +# CONFIG_PCMCIA_SERIAL_CS is not set
5368 +# CONFIG_SYNCLINK_CS is not set
5373 +# CONFIG_QUOTA is not set
5374 +# CONFIG_QFMT_V2 is not set
5376 +# CONFIG_AUTOFS4_FS is not set
5377 +# CONFIG_REISERFS_FS is not set
5378 +# CONFIG_REISERFS_CHECK is not set
5379 +# CONFIG_REISERFS_PROC_INFO is not set
5380 +# CONFIG_ADFS_FS is not set
5381 +# CONFIG_ADFS_FS_RW is not set
5382 +# CONFIG_AFFS_FS is not set
5383 +# CONFIG_HFS_FS is not set
5384 +# CONFIG_HFSPLUS_FS is not set
5385 +# CONFIG_BEFS_FS is not set
5386 +# CONFIG_BEFS_DEBUG is not set
5387 +# CONFIG_BFS_FS is not set
5390 +# CONFIG_JBD_DEBUG is not set
5393 +# CONFIG_UMSDOS_FS is not set
5395 +# CONFIG_EFS_FS is not set
5396 +# CONFIG_JFFS_FS is not set
5397 +# CONFIG_JFFS2_FS is not set
5398 +# CONFIG_CRAMFS is not set
5401 +# CONFIG_ISO9660_FS is not set
5402 +# CONFIG_JOLIET is not set
5403 +# CONFIG_ZISOFS is not set
5404 +# CONFIG_JFS_FS is not set
5405 +# CONFIG_JFS_DEBUG is not set
5406 +# CONFIG_JFS_STATISTICS is not set
5407 +# CONFIG_MINIX_FS is not set
5408 +# CONFIG_VXFS_FS is not set
5409 +# CONFIG_NTFS_FS is not set
5410 +# CONFIG_NTFS_RW is not set
5411 +# CONFIG_HPFS_FS is not set
5413 +# CONFIG_DEVFS_FS is not set
5414 +# CONFIG_DEVFS_MOUNT is not set
5415 +# CONFIG_DEVFS_DEBUG is not set
5417 +# CONFIG_QNX4FS_FS is not set
5418 +# CONFIG_QNX4FS_RW is not set
5419 +# CONFIG_ROMFS_FS is not set
5421 +# CONFIG_SYSV_FS is not set
5422 +# CONFIG_UDF_FS is not set
5423 +# CONFIG_UDF_RW is not set
5424 +# CONFIG_UFS_FS is not set
5425 +# CONFIG_UFS_FS_WRITE is not set
5426 +# CONFIG_XFS_FS is not set
5427 +# CONFIG_XFS_QUOTA is not set
5428 +# CONFIG_XFS_RT is not set
5429 +# CONFIG_XFS_TRACE is not set
5430 +# CONFIG_XFS_DEBUG is not set
5433 +# Network File Systems
5435 +# CONFIG_CODA_FS is not set
5436 +# CONFIG_INTERMEZZO_FS is not set
5439 +# CONFIG_NFS_DIRECTIO is not set
5441 +# CONFIG_NFSD is not set
5442 +# CONFIG_NFSD_V3 is not set
5443 +# CONFIG_NFSD_TCP is not set
5447 +# CONFIG_SMB_FS is not set
5448 +# CONFIG_NCP_FS is not set
5449 +# CONFIG_NCPFS_PACKET_SIGNING is not set
5450 +# CONFIG_NCPFS_IOCTL_LOCKING is not set
5451 +# CONFIG_NCPFS_STRONG is not set
5452 +# CONFIG_NCPFS_NFS_NS is not set
5453 +# CONFIG_NCPFS_OS2_NS is not set
5454 +# CONFIG_NCPFS_SMALLDOS is not set
5455 +# CONFIG_NCPFS_NLS is not set
5456 +# CONFIG_NCPFS_EXTRAS is not set
5457 +# CONFIG_ZISOFS_FS is not set
5462 +# CONFIG_PARTITION_ADVANCED is not set
5463 +CONFIG_MSDOS_PARTITION=y
5464 +# CONFIG_SMB_NLS is not set
5468 +# Native Language Support
5470 +CONFIG_NLS_DEFAULT="iso8859-1"
5471 +# CONFIG_NLS_CODEPAGE_437 is not set
5472 +# CONFIG_NLS_CODEPAGE_737 is not set
5473 +# CONFIG_NLS_CODEPAGE_775 is not set
5474 +# CONFIG_NLS_CODEPAGE_850 is not set
5475 +# CONFIG_NLS_CODEPAGE_852 is not set
5476 +# CONFIG_NLS_CODEPAGE_855 is not set
5477 +# CONFIG_NLS_CODEPAGE_857 is not set
5478 +# CONFIG_NLS_CODEPAGE_860 is not set
5479 +# CONFIG_NLS_CODEPAGE_861 is not set
5480 +# CONFIG_NLS_CODEPAGE_862 is not set
5481 +# CONFIG_NLS_CODEPAGE_863 is not set
5482 +# CONFIG_NLS_CODEPAGE_864 is not set
5483 +# CONFIG_NLS_CODEPAGE_865 is not set
5484 +# CONFIG_NLS_CODEPAGE_866 is not set
5485 +# CONFIG_NLS_CODEPAGE_869 is not set
5486 +# CONFIG_NLS_CODEPAGE_936 is not set
5487 +# CONFIG_NLS_CODEPAGE_950 is not set
5488 +# CONFIG_NLS_CODEPAGE_932 is not set
5489 +# CONFIG_NLS_CODEPAGE_949 is not set
5490 +# CONFIG_NLS_CODEPAGE_874 is not set
5491 +# CONFIG_NLS_ISO8859_8 is not set
5492 +# CONFIG_NLS_CODEPAGE_1250 is not set
5493 +# CONFIG_NLS_CODEPAGE_1251 is not set
5494 +# CONFIG_NLS_ISO8859_1 is not set
5495 +# CONFIG_NLS_ISO8859_2 is not set
5496 +# CONFIG_NLS_ISO8859_3 is not set
5497 +# CONFIG_NLS_ISO8859_4 is not set
5498 +# CONFIG_NLS_ISO8859_5 is not set
5499 +# CONFIG_NLS_ISO8859_6 is not set
5500 +# CONFIG_NLS_ISO8859_7 is not set
5501 +# CONFIG_NLS_ISO8859_9 is not set
5502 +# CONFIG_NLS_ISO8859_13 is not set
5503 +# CONFIG_NLS_ISO8859_14 is not set
5504 +# CONFIG_NLS_ISO8859_15 is not set
5505 +# CONFIG_NLS_KOI8_R is not set
5506 +# CONFIG_NLS_KOI8_U is not set
5507 +# CONFIG_NLS_UTF8 is not set
5510 +# Multimedia devices
5512 +# CONFIG_VIDEO_DEV is not set
5517 +# CONFIG_VGA_CONSOLE is not set
5518 +# CONFIG_MDA_CONSOLE is not set
5521 +# Frame-buffer support
5524 +CONFIG_DUMMY_CONSOLE=y
5525 +# CONFIG_FB_RIVA is not set
5526 +# CONFIG_FB_CLGEN is not set
5527 +# CONFIG_FB_PM2 is not set
5528 +# CONFIG_FB_PM3 is not set
5529 +# CONFIG_FB_CYBER2000 is not set
5530 +# CONFIG_FB_MATROX is not set
5531 +# CONFIG_FB_ATY is not set
5532 +# CONFIG_FB_RADEON is not set
5533 +# CONFIG_FB_ATY128 is not set
5534 +# CONFIG_FB_INTEL is not set
5535 +# CONFIG_FB_SIS is not set
5536 +# CONFIG_FB_NEOMAGIC is not set
5537 +# CONFIG_FB_3DFX is not set
5538 +# CONFIG_FB_VOODOO1 is not set
5539 +# CONFIG_FB_TRIDENT is not set
5540 +# CONFIG_FB_E1356 is not set
5541 +# CONFIG_FB_IT8181 is not set
5542 +# CONFIG_FB_VIRTUAL is not set
5543 +CONFIG_FBCON_ADVANCED=y
5544 +# CONFIG_FBCON_MFB is not set
5545 +# CONFIG_FBCON_CFB2 is not set
5546 +# CONFIG_FBCON_CFB4 is not set
5547 +# CONFIG_FBCON_CFB8 is not set
5548 +CONFIG_FBCON_CFB16=y
5549 +# CONFIG_FBCON_CFB24 is not set
5550 +CONFIG_FBCON_CFB32=y
5551 +# CONFIG_FBCON_AFB is not set
5552 +# CONFIG_FBCON_ILBM is not set
5553 +# CONFIG_FBCON_IPLAN2P2 is not set
5554 +# CONFIG_FBCON_IPLAN2P4 is not set
5555 +# CONFIG_FBCON_IPLAN2P8 is not set
5556 +# CONFIG_FBCON_MAC is not set
5557 +# CONFIG_FBCON_VGA_PLANES is not set
5558 +# CONFIG_FBCON_VGA is not set
5559 +# CONFIG_FBCON_HGA is not set
5560 +# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
5561 +CONFIG_FBCON_FONTS=y
5564 +# CONFIG_FONT_SUN8x16 is not set
5565 +# CONFIG_FONT_SUN12x22 is not set
5566 +# CONFIG_FONT_6x11 is not set
5567 +# CONFIG_FONT_PEARL_8x8 is not set
5568 +# CONFIG_FONT_ACORN_8x8 is not set
5574 +# CONFIG_SOUND_ALI5455 is not set
5575 +# CONFIG_SOUND_BT878 is not set
5576 +# CONFIG_SOUND_CMPCI is not set
5577 +# CONFIG_SOUND_EMU10K1 is not set
5578 +# CONFIG_MIDI_EMU10K1 is not set
5579 +# CONFIG_SOUND_FUSION is not set
5580 +# CONFIG_SOUND_CS4281 is not set
5581 +# CONFIG_SOUND_ES1370 is not set
5582 +# CONFIG_SOUND_ES1371 is not set
5583 +# CONFIG_SOUND_ESSSOLO1 is not set
5584 +# CONFIG_SOUND_MAESTRO is not set
5585 +# CONFIG_SOUND_MAESTRO3 is not set
5586 +# CONFIG_SOUND_FORTE is not set
5587 +# CONFIG_SOUND_ICH is not set
5588 +# CONFIG_SOUND_RME96XX is not set
5589 +# CONFIG_SOUND_SONICVIBES is not set
5590 +# CONFIG_SOUND_TRIDENT is not set
5591 +# CONFIG_SOUND_MSNDCLAS is not set
5592 +# CONFIG_SOUND_MSNDPIN is not set
5593 +# CONFIG_SOUND_VIA82CXXX is not set
5594 +# CONFIG_MIDI_VIA82CXXX is not set
5595 +# CONFIG_SOUND_OSS is not set
5596 +# CONFIG_SOUND_TVMIXER is not set
5597 +# CONFIG_SOUND_AD1980 is not set
5598 +# CONFIG_SOUND_WM97XX is not set
5604 +# CONFIG_USB_DEBUG is not set
5607 +# Miscellaneous USB options
5609 +CONFIG_USB_DEVICEFS=y
5610 +# CONFIG_USB_BANDWIDTH is not set
5613 +# USB Host Controller Drivers
5615 +# CONFIG_USB_EHCI_HCD is not set
5616 +# CONFIG_USB_UHCI is not set
5617 +# CONFIG_USB_UHCI_ALT is not set
5621 +# USB Device Class drivers
5623 +# CONFIG_USB_AUDIO is not set
5624 +# CONFIG_USB_EMI26 is not set
5625 +# CONFIG_USB_BLUETOOTH is not set
5626 +# CONFIG_USB_MIDI is not set
5627 +CONFIG_USB_STORAGE=y
5628 +# CONFIG_USB_STORAGE_DEBUG is not set
5629 +# CONFIG_USB_STORAGE_DATAFAB is not set
5630 +# CONFIG_USB_STORAGE_FREECOM is not set
5631 +# CONFIG_USB_STORAGE_ISD200 is not set
5632 +# CONFIG_USB_STORAGE_DPCM is not set
5633 +# CONFIG_USB_STORAGE_HP8200e is not set
5634 +# CONFIG_USB_STORAGE_SDDR09 is not set
5635 +# CONFIG_USB_STORAGE_SDDR55 is not set
5636 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
5637 +# CONFIG_USB_ACM is not set
5638 +# CONFIG_USB_PRINTER is not set
5641 +# USB Human Interface Devices (HID)
5644 +CONFIG_USB_HIDINPUT=y
5645 +CONFIG_USB_HIDDEV=y
5646 +# CONFIG_USB_AIPTEK is not set
5647 +# CONFIG_USB_WACOM is not set
5648 +# CONFIG_USB_KBTAB is not set
5649 +# CONFIG_USB_POWERMATE is not set
5652 +# USB Imaging devices
5654 +# CONFIG_USB_DC2XX is not set
5655 +# CONFIG_USB_MDC800 is not set
5656 +# CONFIG_USB_SCANNER is not set
5657 +# CONFIG_USB_MICROTEK is not set
5658 +# CONFIG_USB_HPUSBSCSI is not set
5661 +# USB Multimedia devices
5665 +# Video4Linux support is needed for USB Multimedia device support
5669 +# USB Network adaptors
5671 +# CONFIG_USB_PEGASUS is not set
5672 +# CONFIG_USB_RTL8150 is not set
5673 +# CONFIG_USB_KAWETH is not set
5674 +# CONFIG_USB_CATC is not set
5675 +# CONFIG_USB_CDCETHER is not set
5676 +# CONFIG_USB_USBNET is not set
5681 +# CONFIG_USB_USS720 is not set
5684 +# USB Serial Converter support
5686 +# CONFIG_USB_SERIAL is not set
5689 +# USB Miscellaneous drivers
5691 +# CONFIG_USB_RIO500 is not set
5692 +# CONFIG_USB_AUERSWALD is not set
5693 +# CONFIG_USB_TIGL is not set
5694 +# CONFIG_USB_BRLVGER is not set
5695 +# CONFIG_USB_LCD is not set
5698 +# Support for USB gadgets
5700 +# CONFIG_USB_GADGET is not set
5703 +# Bluetooth support
5705 +# CONFIG_BLUEZ is not set
5710 +CONFIG_CROSSCOMPILE=y
5711 +# CONFIG_RUNTIME_DEBUG is not set
5712 +# CONFIG_KGDB is not set
5713 +# CONFIG_GDB_CONSOLE is not set
5714 +# CONFIG_DEBUG_INFO is not set
5715 +# CONFIG_MAGIC_SYSRQ is not set
5716 +# CONFIG_MIPS_UNCACHED is not set
5717 +CONFIG_LOG_BUF_SHIFT=0
5720 +# Cryptographic options
5722 +# CONFIG_CRYPTO is not set
5727 +# CONFIG_CRC32 is not set
5728 +CONFIG_ZLIB_INFLATE=m
5729 +CONFIG_ZLIB_DEFLATE=m
5730 +# CONFIG_FW_LOADER is not set
5731 --- a/arch/mips/defconfig-db1500
5732 +++ b/arch/mips/defconfig-db1500
5733 @@ -30,8 +30,8 @@ CONFIG_MIPS_DB1500=y
5734 # CONFIG_MIPS_PB1000 is not set
5735 # CONFIG_MIPS_PB1100 is not set
5736 # CONFIG_MIPS_PB1500 is not set
5737 -# CONFIG_MIPS_HYDROGEN3 is not set
5738 # CONFIG_MIPS_PB1550 is not set
5739 +# CONFIG_MIPS_HYDROGEN3 is not set
5740 # CONFIG_MIPS_XXS1500 is not set
5741 # CONFIG_MIPS_MTX1 is not set
5742 # CONFIG_COGENT_CSB250 is not set
5743 @@ -267,11 +267,6 @@ CONFIG_IP_PNP_BOOTP=y
5745 # CONFIG_IPX is not set
5746 # CONFIG_ATALK is not set
5749 -# Appletalk devices
5751 -# CONFIG_DEV_APPLETALK is not set
5752 # CONFIG_DECNET is not set
5753 # CONFIG_BRIDGE is not set
5754 # CONFIG_X25 is not set
5755 @@ -555,7 +550,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
5756 # CONFIG_AU1X00_USB_TTY is not set
5757 # CONFIG_AU1X00_USB_RAW is not set
5758 # CONFIG_TXX927_SERIAL is not set
5759 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
5760 CONFIG_UNIX98_PTYS=y
5761 CONFIG_UNIX98_PTY_COUNT=256
5763 --- a/arch/mips/defconfig-db1550
5764 +++ b/arch/mips/defconfig-db1550
5765 @@ -30,8 +30,8 @@ CONFIG_MIPS_DB1550=y
5766 # CONFIG_MIPS_PB1000 is not set
5767 # CONFIG_MIPS_PB1100 is not set
5768 # CONFIG_MIPS_PB1500 is not set
5769 -# CONFIG_MIPS_HYDROGEN3 is not set
5770 # CONFIG_MIPS_PB1550 is not set
5771 +# CONFIG_MIPS_HYDROGEN3 is not set
5772 # CONFIG_MIPS_XXS1500 is not set
5773 # CONFIG_MIPS_MTX1 is not set
5774 # CONFIG_COGENT_CSB250 is not set
5775 @@ -213,11 +213,9 @@ CONFIG_MTD_CFI_AMDSTD=y
5776 # CONFIG_MTD_BOSPORUS is not set
5777 # CONFIG_MTD_XXS1500 is not set
5778 # CONFIG_MTD_MTX1 is not set
5779 -# CONFIG_MTD_DB1X00 is not set
5781 CONFIG_MTD_PB1550_BOOT=y
5782 CONFIG_MTD_PB1550_USER=y
5783 -# CONFIG_MTD_HYDROGEN3 is not set
5784 # CONFIG_MTD_MIRAGE is not set
5785 # CONFIG_MTD_CSTM_MIPS_IXX is not set
5786 # CONFIG_MTD_OCELOT is not set
5787 @@ -236,7 +234,6 @@ CONFIG_MTD_PB1550_USER=y
5789 # Disk-On-Chip Device Drivers
5791 -# CONFIG_MTD_DOC1000 is not set
5792 # CONFIG_MTD_DOC2000 is not set
5793 # CONFIG_MTD_DOC2001 is not set
5794 # CONFIG_MTD_DOCPROBE is not set
5795 @@ -343,11 +340,6 @@ CONFIG_IP_PNP_BOOTP=y
5797 # CONFIG_IPX is not set
5798 # CONFIG_ATALK is not set
5801 -# Appletalk devices
5803 -# CONFIG_DEV_APPLETALK is not set
5804 # CONFIG_DECNET is not set
5805 # CONFIG_BRIDGE is not set
5806 # CONFIG_X25 is not set
5807 @@ -633,7 +625,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
5808 # CONFIG_AU1X00_USB_TTY is not set
5809 # CONFIG_AU1X00_USB_RAW is not set
5810 # CONFIG_TXX927_SERIAL is not set
5811 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
5812 CONFIG_UNIX98_PTYS=y
5813 CONFIG_UNIX98_PTY_COUNT=256
5815 --- a/arch/mips/defconfig-ddb5476
5816 +++ b/arch/mips/defconfig-ddb5476
5817 @@ -28,8 +28,8 @@ CONFIG_EXPERIMENTAL=y
5818 # CONFIG_MIPS_PB1000 is not set
5819 # CONFIG_MIPS_PB1100 is not set
5820 # CONFIG_MIPS_PB1500 is not set
5821 -# CONFIG_MIPS_HYDROGEN3 is not set
5822 # CONFIG_MIPS_PB1550 is not set
5823 +# CONFIG_MIPS_HYDROGEN3 is not set
5824 # CONFIG_MIPS_XXS1500 is not set
5825 # CONFIG_MIPS_MTX1 is not set
5826 # CONFIG_COGENT_CSB250 is not set
5827 @@ -226,11 +226,6 @@ CONFIG_IP_PNP_BOOTP=y
5829 # CONFIG_IPX is not set
5830 # CONFIG_ATALK is not set
5833 -# Appletalk devices
5835 -# CONFIG_DEV_APPLETALK is not set
5836 # CONFIG_DECNET is not set
5837 # CONFIG_BRIDGE is not set
5838 # CONFIG_X25 is not set
5839 @@ -517,7 +512,6 @@ CONFIG_SERIAL=y
5840 CONFIG_SERIAL_CONSOLE=y
5841 # CONFIG_SERIAL_EXTENDED is not set
5842 # CONFIG_SERIAL_NONSTANDARD is not set
5843 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
5844 CONFIG_UNIX98_PTYS=y
5845 CONFIG_UNIX98_PTY_COUNT=256
5847 --- a/arch/mips/defconfig-ddb5477
5848 +++ b/arch/mips/defconfig-ddb5477
5849 @@ -28,8 +28,8 @@ CONFIG_EXPERIMENTAL=y
5850 # CONFIG_MIPS_PB1000 is not set
5851 # CONFIG_MIPS_PB1100 is not set
5852 # CONFIG_MIPS_PB1500 is not set
5853 -# CONFIG_MIPS_HYDROGEN3 is not set
5854 # CONFIG_MIPS_PB1550 is not set
5855 +# CONFIG_MIPS_HYDROGEN3 is not set
5856 # CONFIG_MIPS_XXS1500 is not set
5857 # CONFIG_MIPS_MTX1 is not set
5858 # CONFIG_COGENT_CSB250 is not set
5859 @@ -226,11 +226,6 @@ CONFIG_IP_PNP_BOOTP=y
5861 # CONFIG_IPX is not set
5862 # CONFIG_ATALK is not set
5865 -# Appletalk devices
5867 -# CONFIG_DEV_APPLETALK is not set
5868 # CONFIG_DECNET is not set
5869 # CONFIG_BRIDGE is not set
5870 # CONFIG_X25 is not set
5871 @@ -434,7 +429,6 @@ CONFIG_SERIAL=y
5872 CONFIG_SERIAL_CONSOLE=y
5873 # CONFIG_SERIAL_EXTENDED is not set
5874 # CONFIG_SERIAL_NONSTANDARD is not set
5875 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
5876 CONFIG_UNIX98_PTYS=y
5877 CONFIG_UNIX98_PTY_COUNT=256
5879 --- a/arch/mips/defconfig-decstation
5880 +++ b/arch/mips/defconfig-decstation
5881 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
5882 # CONFIG_MIPS_PB1000 is not set
5883 # CONFIG_MIPS_PB1100 is not set
5884 # CONFIG_MIPS_PB1500 is not set
5885 -# CONFIG_MIPS_HYDROGEN3 is not set
5886 # CONFIG_MIPS_PB1550 is not set
5887 +# CONFIG_MIPS_HYDROGEN3 is not set
5888 # CONFIG_MIPS_XXS1500 is not set
5889 # CONFIG_MIPS_MTX1 is not set
5890 # CONFIG_COGENT_CSB250 is not set
5891 @@ -223,11 +223,6 @@ CONFIG_IP_PNP_BOOTP=y
5893 # CONFIG_IPX is not set
5894 # CONFIG_ATALK is not set
5897 -# Appletalk devices
5899 -# CONFIG_DEV_APPLETALK is not set
5900 # CONFIG_DECNET is not set
5901 # CONFIG_BRIDGE is not set
5902 # CONFIG_X25 is not set
5903 @@ -306,9 +301,11 @@ CONFIG_SCSI_DECNCR=y
5904 # CONFIG_SCSI_MEGARAID is not set
5905 # CONFIG_SCSI_MEGARAID2 is not set
5906 # CONFIG_SCSI_SATA is not set
5907 +# CONFIG_SCSI_SATA_AHCI is not set
5908 # CONFIG_SCSI_SATA_SVW is not set
5909 # CONFIG_SCSI_ATA_PIIX is not set
5910 # CONFIG_SCSI_SATA_NV is not set
5911 +# CONFIG_SCSI_SATA_QSTOR is not set
5912 # CONFIG_SCSI_SATA_PROMISE is not set
5913 # CONFIG_SCSI_SATA_SX4 is not set
5914 # CONFIG_SCSI_SATA_SIL is not set
5915 @@ -477,7 +474,6 @@ CONFIG_SERIAL_DEC=y
5916 CONFIG_SERIAL_DEC_CONSOLE=y
5919 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
5920 CONFIG_UNIX98_PTYS=y
5921 CONFIG_UNIX98_PTY_COUNT=256
5923 --- a/arch/mips/defconfig-e55
5924 +++ b/arch/mips/defconfig-e55
5925 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
5926 # CONFIG_MIPS_PB1000 is not set
5927 # CONFIG_MIPS_PB1100 is not set
5928 # CONFIG_MIPS_PB1500 is not set
5929 -# CONFIG_MIPS_HYDROGEN3 is not set
5930 # CONFIG_MIPS_PB1550 is not set
5931 +# CONFIG_MIPS_HYDROGEN3 is not set
5932 # CONFIG_MIPS_XXS1500 is not set
5933 # CONFIG_MIPS_MTX1 is not set
5934 # CONFIG_COGENT_CSB250 is not set
5935 @@ -222,11 +222,6 @@ CONFIG_IP_MULTICAST=y
5937 # CONFIG_IPX is not set
5938 # CONFIG_ATALK is not set
5941 -# Appletalk devices
5943 -# CONFIG_DEV_APPLETALK is not set
5944 # CONFIG_DECNET is not set
5945 # CONFIG_BRIDGE is not set
5946 # CONFIG_X25 is not set
5947 @@ -426,7 +421,6 @@ CONFIG_SERIAL_MANY_PORTS=y
5948 # CONFIG_SERIAL_MULTIPORT is not set
5949 # CONFIG_HUB6 is not set
5950 # CONFIG_SERIAL_NONSTANDARD is not set
5951 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
5952 # CONFIG_VR41XX_KIU is not set
5953 CONFIG_UNIX98_PTYS=y
5954 CONFIG_UNIX98_PTY_COUNT=256
5955 --- a/arch/mips/defconfig-eagle
5956 +++ b/arch/mips/defconfig-eagle
5957 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
5958 # CONFIG_MIPS_PB1000 is not set
5959 # CONFIG_MIPS_PB1100 is not set
5960 # CONFIG_MIPS_PB1500 is not set
5961 -# CONFIG_MIPS_HYDROGEN3 is not set
5962 # CONFIG_MIPS_PB1550 is not set
5963 +# CONFIG_MIPS_HYDROGEN3 is not set
5964 # CONFIG_MIPS_XXS1500 is not set
5965 # CONFIG_MIPS_MTX1 is not set
5966 # CONFIG_COGENT_CSB250 is not set
5967 @@ -208,8 +208,8 @@ CONFIG_MTD_CFI_INTELEXT=y
5968 # Mapping drivers for chip access
5970 CONFIG_MTD_PHYSMAP=y
5971 -CONFIG_MTD_PHYSMAP_START=1c000000
5972 -CONFIG_MTD_PHYSMAP_LEN=2000000
5973 +CONFIG_MTD_PHYSMAP_START=0x1c000000
5974 +CONFIG_MTD_PHYSMAP_LEN=0x2000000
5975 CONFIG_MTD_PHYSMAP_BUSWIDTH=4
5976 # CONFIG_MTD_PB1000 is not set
5977 # CONFIG_MTD_PB1500 is not set
5978 @@ -217,9 +217,7 @@ CONFIG_MTD_PHYSMAP_BUSWIDTH=4
5979 # CONFIG_MTD_BOSPORUS is not set
5980 # CONFIG_MTD_XXS1500 is not set
5981 # CONFIG_MTD_MTX1 is not set
5982 -# CONFIG_MTD_DB1X00 is not set
5983 # CONFIG_MTD_PB1550 is not set
5984 -# CONFIG_MTD_HYDROGEN3 is not set
5985 # CONFIG_MTD_MIRAGE is not set
5986 # CONFIG_MTD_CSTM_MIPS_IXX is not set
5987 # CONFIG_MTD_OCELOT is not set
5988 @@ -238,7 +236,6 @@ CONFIG_MTD_PHYSMAP_BUSWIDTH=4
5990 # Disk-On-Chip Device Drivers
5992 -# CONFIG_MTD_DOC1000 is not set
5993 # CONFIG_MTD_DOC2000 is not set
5994 # CONFIG_MTD_DOC2001 is not set
5995 # CONFIG_MTD_DOCPROBE is not set
5996 @@ -327,11 +324,6 @@ CONFIG_IP_PNP_BOOTP=y
5998 # CONFIG_IPX is not set
5999 # CONFIG_ATALK is not set
6002 -# Appletalk devices
6004 -# CONFIG_DEV_APPLETALK is not set
6005 # CONFIG_DECNET is not set
6006 # CONFIG_BRIDGE is not set
6007 # CONFIG_X25 is not set
6008 @@ -587,7 +579,6 @@ CONFIG_SERIAL=y
6009 CONFIG_SERIAL_CONSOLE=y
6010 # CONFIG_SERIAL_EXTENDED is not set
6011 # CONFIG_SERIAL_NONSTANDARD is not set
6012 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
6013 # CONFIG_VR41XX_KIU is not set
6014 CONFIG_UNIX98_PTYS=y
6015 CONFIG_UNIX98_PTY_COUNT=256
6016 --- a/arch/mips/defconfig-ev64120
6017 +++ b/arch/mips/defconfig-ev64120
6018 @@ -30,8 +30,8 @@ CONFIG_MODULES=y
6019 # CONFIG_MIPS_PB1000 is not set
6020 # CONFIG_MIPS_PB1100 is not set
6021 # CONFIG_MIPS_PB1500 is not set
6022 -# CONFIG_MIPS_HYDROGEN3 is not set
6023 # CONFIG_MIPS_PB1550 is not set
6024 +# CONFIG_MIPS_HYDROGEN3 is not set
6025 # CONFIG_MIPS_XXS1500 is not set
6026 # CONFIG_MIPS_MTX1 is not set
6027 # CONFIG_COGENT_CSB250 is not set
6028 @@ -230,11 +230,6 @@ CONFIG_IP_PNP=y
6030 # CONFIG_IPX is not set
6031 # CONFIG_ATALK is not set
6034 -# Appletalk devices
6036 -# CONFIG_DEV_APPLETALK is not set
6037 # CONFIG_DECNET is not set
6038 # CONFIG_BRIDGE is not set
6039 # CONFIG_X25 is not set
6040 @@ -443,7 +438,6 @@ CONFIG_SERIAL=y
6041 # CONFIG_SERIAL_CONSOLE is not set
6042 # CONFIG_SERIAL_EXTENDED is not set
6043 # CONFIG_SERIAL_NONSTANDARD is not set
6044 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
6045 CONFIG_UNIX98_PTYS=y
6046 CONFIG_UNIX98_PTY_COUNT=256
6048 --- a/arch/mips/defconfig-ev96100
6049 +++ b/arch/mips/defconfig-ev96100
6050 @@ -30,8 +30,8 @@ CONFIG_MODULES=y
6051 # CONFIG_MIPS_PB1000 is not set
6052 # CONFIG_MIPS_PB1100 is not set
6053 # CONFIG_MIPS_PB1500 is not set
6054 -# CONFIG_MIPS_HYDROGEN3 is not set
6055 # CONFIG_MIPS_PB1550 is not set
6056 +# CONFIG_MIPS_HYDROGEN3 is not set
6057 # CONFIG_MIPS_XXS1500 is not set
6058 # CONFIG_MIPS_MTX1 is not set
6059 # CONFIG_COGENT_CSB250 is not set
6060 @@ -232,11 +232,6 @@ CONFIG_IP_PNP_BOOTP=y
6062 # CONFIG_IPX is not set
6063 # CONFIG_ATALK is not set
6066 -# Appletalk devices
6068 -# CONFIG_DEV_APPLETALK is not set
6069 # CONFIG_DECNET is not set
6070 # CONFIG_BRIDGE is not set
6071 # CONFIG_X25 is not set
6072 @@ -441,7 +436,6 @@ CONFIG_SERIAL=y
6073 CONFIG_SERIAL_CONSOLE=y
6074 # CONFIG_SERIAL_EXTENDED is not set
6075 # CONFIG_SERIAL_NONSTANDARD is not set
6076 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
6077 CONFIG_UNIX98_PTYS=y
6078 CONFIG_UNIX98_PTY_COUNT=256
6081 +++ b/arch/mips/defconfig-ficmmp
6084 +# Automatically generated make config: don't edit
6088 +# CONFIG_MIPS64 is not set
6091 +# Code maturity level options
6093 +CONFIG_EXPERIMENTAL=y
6096 +# Loadable module support
6099 +# CONFIG_MODVERSIONS is not set
6103 +# Machine selection
6105 +# CONFIG_ACER_PICA_61 is not set
6106 +# CONFIG_MIPS_BOSPORUS is not set
6107 +# CONFIG_MIPS_MIRAGE is not set
6108 +# CONFIG_MIPS_DB1000 is not set
6109 +# CONFIG_MIPS_DB1100 is not set
6110 +# CONFIG_MIPS_DB1500 is not set
6111 +# CONFIG_MIPS_DB1550 is not set
6112 +# CONFIG_MIPS_PB1000 is not set
6113 +# CONFIG_MIPS_PB1100 is not set
6114 +# CONFIG_MIPS_PB1500 is not set
6115 +# CONFIG_MIPS_PB1550 is not set
6116 +# CONFIG_MIPS_HYDROGEN3 is not set
6117 +# CONFIG_MIPS_XXS1500 is not set
6118 +# CONFIG_MIPS_MTX1 is not set
6119 +# CONFIG_COGENT_CSB250 is not set
6120 +# CONFIG_BAGET_MIPS is not set
6121 +# CONFIG_CASIO_E55 is not set
6122 +# CONFIG_MIPS_COBALT is not set
6123 +# CONFIG_DECSTATION is not set
6124 +# CONFIG_MIPS_EV64120 is not set
6125 +# CONFIG_MIPS_EV96100 is not set
6126 +# CONFIG_MIPS_IVR is not set
6127 +# CONFIG_HP_LASERJET is not set
6128 +# CONFIG_IBM_WORKPAD is not set
6129 +# CONFIG_LASAT is not set
6130 +# CONFIG_MIPS_ITE8172 is not set
6131 +# CONFIG_MIPS_ATLAS is not set
6132 +# CONFIG_MIPS_MAGNUM_4000 is not set
6133 +# CONFIG_MIPS_MALTA is not set
6134 +# CONFIG_MIPS_SEAD is not set
6135 +# CONFIG_MOMENCO_OCELOT is not set
6136 +# CONFIG_MOMENCO_OCELOT_G is not set
6137 +# CONFIG_MOMENCO_OCELOT_C is not set
6138 +# CONFIG_MOMENCO_JAGUAR_ATX is not set
6139 +# CONFIG_PMC_BIG_SUR is not set
6140 +# CONFIG_PMC_STRETCH is not set
6141 +# CONFIG_PMC_YOSEMITE is not set
6142 +# CONFIG_DDB5074 is not set
6143 +# CONFIG_DDB5476 is not set
6144 +# CONFIG_DDB5477 is not set
6145 +# CONFIG_NEC_OSPREY is not set
6146 +# CONFIG_NEC_EAGLE is not set
6147 +# CONFIG_OLIVETTI_M700 is not set
6148 +# CONFIG_NINO is not set
6149 +# CONFIG_SGI_IP22 is not set
6150 +# CONFIG_SGI_IP27 is not set
6151 +# CONFIG_SIBYTE_SB1xxx_SOC is not set
6152 +# CONFIG_SNI_RM200_PCI is not set
6153 +# CONFIG_TANBAC_TB0226 is not set
6154 +# CONFIG_TANBAC_TB0229 is not set
6155 +# CONFIG_TOSHIBA_JMR3927 is not set
6156 +# CONFIG_TOSHIBA_RBTX4927 is not set
6157 +# CONFIG_VICTOR_MPC30X is not set
6158 +# CONFIG_ZAO_CAPCELLA is not set
6159 +# CONFIG_HIGHMEM is not set
6160 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
6161 +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
6162 +# CONFIG_MIPS_AU1000 is not set
6167 +CONFIG_CPU_MIPS32=y
6168 +# CONFIG_CPU_MIPS64 is not set
6169 +# CONFIG_CPU_R3000 is not set
6170 +# CONFIG_CPU_TX39XX is not set
6171 +# CONFIG_CPU_VR41XX is not set
6172 +# CONFIG_CPU_R4300 is not set
6173 +# CONFIG_CPU_R4X00 is not set
6174 +# CONFIG_CPU_TX49XX is not set
6175 +# CONFIG_CPU_R5000 is not set
6176 +# CONFIG_CPU_R5432 is not set
6177 +# CONFIG_CPU_R6000 is not set
6178 +# CONFIG_CPU_NEVADA is not set
6179 +# CONFIG_CPU_R8000 is not set
6180 +# CONFIG_CPU_R10000 is not set
6181 +# CONFIG_CPU_RM7000 is not set
6182 +# CONFIG_CPU_RM9000 is not set
6183 +# CONFIG_CPU_SB1 is not set
6184 +CONFIG_PAGE_SIZE_4KB=y
6185 +# CONFIG_PAGE_SIZE_16KB is not set
6186 +# CONFIG_PAGE_SIZE_64KB is not set
6187 +CONFIG_CPU_HAS_PREFETCH=y
6188 +# CONFIG_VTAG_ICACHE is not set
6189 +CONFIG_64BIT_PHYS_ADDR=y
6190 +# CONFIG_CPU_ADVANCED is not set
6191 +CONFIG_CPU_HAS_LLSC=y
6192 +# CONFIG_CPU_HAS_LLDSCD is not set
6193 +# CONFIG_CPU_HAS_WB is not set
6194 +CONFIG_CPU_HAS_SYNC=y
6199 +CONFIG_CPU_LITTLE_ENDIAN=y
6200 +# CONFIG_BUILD_ELF64 is not set
6202 +# CONFIG_PCI is not set
6203 +# CONFIG_PCI_NEW is not set
6205 +# CONFIG_ISA is not set
6206 +# CONFIG_TC is not set
6207 +# CONFIG_MCA is not set
6208 +# CONFIG_SBUS is not set
6209 +# CONFIG_HOTPLUG is not set
6210 +# CONFIG_PCMCIA is not set
6211 +# CONFIG_HOTPLUG_PCI is not set
6213 +# CONFIG_BSD_PROCESS_ACCT is not set
6216 +# CONFIG_KCORE_AOUT is not set
6217 +# CONFIG_BINFMT_AOUT is not set
6218 +CONFIG_BINFMT_ELF=y
6219 +# CONFIG_MIPS32_COMPAT is not set
6220 +# CONFIG_MIPS32_O32 is not set
6221 +# CONFIG_MIPS32_N32 is not set
6222 +# CONFIG_BINFMT_ELF32 is not set
6223 +# CONFIG_BINFMT_MISC is not set
6224 +# CONFIG_OOM_KILLER is not set
6225 +CONFIG_CMDLINE_BOOL=y
6226 +CONFIG_CMDLINE="ide3=dma mem=96M root=/dev/hda2 rootflags=data=journal"
6229 +# Memory Technology Devices (MTD)
6231 +# CONFIG_MTD is not set
6234 +# Parallel port support
6236 +# CONFIG_PARPORT is not set
6239 +# Plug and Play configuration
6241 +# CONFIG_PNP is not set
6242 +# CONFIG_ISAPNP is not set
6247 +# CONFIG_BLK_DEV_FD is not set
6248 +# CONFIG_BLK_DEV_XD is not set
6249 +# CONFIG_PARIDE is not set
6250 +# CONFIG_BLK_CPQ_DA is not set
6251 +# CONFIG_BLK_CPQ_CISS_DA is not set
6252 +# CONFIG_CISS_SCSI_TAPE is not set
6253 +# CONFIG_CISS_MONITOR_THREAD is not set
6254 +# CONFIG_BLK_DEV_DAC960 is not set
6255 +# CONFIG_BLK_DEV_UMEM is not set
6256 +# CONFIG_BLK_DEV_SX8 is not set
6257 +CONFIG_BLK_DEV_LOOP=y
6258 +# CONFIG_BLK_DEV_NBD is not set
6259 +# CONFIG_BLK_DEV_RAM is not set
6260 +# CONFIG_BLK_DEV_INITRD is not set
6261 +# CONFIG_BLK_STATS is not set
6264 +# Multi-device support (RAID and LVM)
6266 +# CONFIG_MD is not set
6267 +# CONFIG_BLK_DEV_MD is not set
6268 +# CONFIG_MD_LINEAR is not set
6269 +# CONFIG_MD_RAID0 is not set
6270 +# CONFIG_MD_RAID1 is not set
6271 +# CONFIG_MD_RAID5 is not set
6272 +# CONFIG_MD_MULTIPATH is not set
6273 +# CONFIG_BLK_DEV_LVM is not set
6276 +# Networking options
6279 +# CONFIG_PACKET_MMAP is not set
6280 +# CONFIG_NETLINK_DEV is not set
6282 +# CONFIG_NETFILTER_DEBUG is not set
6286 +CONFIG_IP_MULTICAST=y
6287 +# CONFIG_IP_ADVANCED_ROUTER is not set
6288 +# CONFIG_IP_PNP is not set
6289 +# CONFIG_NET_IPIP is not set
6290 +# CONFIG_NET_IPGRE is not set
6291 +# CONFIG_IP_MROUTE is not set
6292 +# CONFIG_ARPD is not set
6293 +# CONFIG_INET_ECN is not set
6294 +# CONFIG_SYN_COOKIES is not set
6297 +# IP: Netfilter Configuration
6299 +# CONFIG_IP_NF_CONNTRACK is not set
6300 +# CONFIG_IP_NF_QUEUE is not set
6301 +# CONFIG_IP_NF_IPTABLES is not set
6302 +# CONFIG_IP_NF_ARPTABLES is not set
6303 +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
6304 +# CONFIG_IP_NF_COMPAT_IPFWADM is not set
6307 +# IP: Virtual Server Configuration
6309 +# CONFIG_IP_VS is not set
6310 +# CONFIG_IPV6 is not set
6311 +# CONFIG_KHTTPD is not set
6314 +# SCTP Configuration (EXPERIMENTAL)
6316 +# CONFIG_IP_SCTP is not set
6317 +# CONFIG_ATM is not set
6318 +# CONFIG_VLAN_8021Q is not set
6323 +# CONFIG_IPX is not set
6324 +# CONFIG_ATALK is not set
6325 +# CONFIG_DECNET is not set
6326 +# CONFIG_BRIDGE is not set
6327 +# CONFIG_X25 is not set
6328 +# CONFIG_LAPB is not set
6329 +# CONFIG_LLC is not set
6330 +# CONFIG_NET_DIVERT is not set
6331 +# CONFIG_ECONET is not set
6332 +# CONFIG_WAN_ROUTER is not set
6333 +# CONFIG_NET_FASTROUTE is not set
6334 +# CONFIG_NET_HW_FLOWCONTROL is not set
6337 +# QoS and/or fair queueing
6339 +# CONFIG_NET_SCHED is not set
6344 +# CONFIG_NET_PKTGEN is not set
6347 +# Telephony Support
6349 +# CONFIG_PHONE is not set
6350 +# CONFIG_PHONE_IXJ is not set
6351 +# CONFIG_PHONE_IXJ_PCMCIA is not set
6354 +# ATA/IDE/MFM/RLL support
6359 +# IDE, ATA and ATAPI Block devices
6361 +CONFIG_BLK_DEV_IDE=y
6364 +# Please see Documentation/ide.txt for help/info on IDE drives
6366 +CONFIG_BLK_DEV_HD_IDE=y
6367 +CONFIG_BLK_DEV_HD=y
6368 +# CONFIG_BLK_DEV_IDE_SATA is not set
6369 +CONFIG_BLK_DEV_IDEDISK=y
6370 +CONFIG_IDEDISK_MULTI_MODE=y
6371 +CONFIG_IDEDISK_STROKE=y
6372 +# CONFIG_BLK_DEV_IDECS is not set
6373 +# CONFIG_BLK_DEV_DELKIN is not set
6374 +# CONFIG_BLK_DEV_IDECD is not set
6375 +# CONFIG_BLK_DEV_IDETAPE is not set
6376 +# CONFIG_BLK_DEV_IDEFLOPPY is not set
6377 +# CONFIG_BLK_DEV_IDESCSI is not set
6378 +# CONFIG_IDE_TASK_IOCTL is not set
6381 +# IDE chipset support/bugfixes
6383 +# CONFIG_BLK_DEV_CMD640 is not set
6384 +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
6385 +# CONFIG_BLK_DEV_ISAPNP is not set
6386 +# CONFIG_IDE_CHIPSETS is not set
6387 +# CONFIG_IDEDMA_AUTO is not set
6388 +# CONFIG_DMA_NONPCI is not set
6389 +# CONFIG_BLK_DEV_ATARAID is not set
6390 +# CONFIG_BLK_DEV_ATARAID_PDC is not set
6391 +# CONFIG_BLK_DEV_ATARAID_HPT is not set
6392 +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
6393 +# CONFIG_BLK_DEV_ATARAID_SII is not set
6401 +# SCSI support type (disk, tape, CD-ROM)
6403 +CONFIG_BLK_DEV_SD=y
6404 +CONFIG_SD_EXTRA_DEVS=40
6405 +CONFIG_CHR_DEV_ST=y
6406 +# CONFIG_CHR_DEV_OSST is not set
6407 +CONFIG_BLK_DEV_SR=y
6408 +# CONFIG_BLK_DEV_SR_VENDOR is not set
6409 +CONFIG_SR_EXTRA_DEVS=2
6410 +# CONFIG_CHR_DEV_SG is not set
6413 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
6415 +# CONFIG_SCSI_DEBUG_QUEUES is not set
6416 +# CONFIG_SCSI_MULTI_LUN is not set
6417 +CONFIG_SCSI_CONSTANTS=y
6418 +# CONFIG_SCSI_LOGGING is not set
6421 +# SCSI low-level drivers
6423 +# CONFIG_SCSI_7000FASST is not set
6424 +# CONFIG_SCSI_ACARD is not set
6425 +# CONFIG_SCSI_AHA152X is not set
6426 +# CONFIG_SCSI_AHA1542 is not set
6427 +# CONFIG_SCSI_AHA1740 is not set
6428 +# CONFIG_SCSI_AACRAID is not set
6429 +# CONFIG_SCSI_AIC7XXX is not set
6430 +# CONFIG_SCSI_AIC79XX is not set
6431 +# CONFIG_SCSI_AIC7XXX_OLD is not set
6432 +# CONFIG_SCSI_DPT_I2O is not set
6433 +# CONFIG_SCSI_ADVANSYS is not set
6434 +# CONFIG_SCSI_IN2000 is not set
6435 +# CONFIG_SCSI_AM53C974 is not set
6436 +# CONFIG_SCSI_MEGARAID is not set
6437 +# CONFIG_SCSI_MEGARAID2 is not set
6438 +# CONFIG_SCSI_SATA is not set
6439 +# CONFIG_SCSI_SATA_AHCI is not set
6440 +# CONFIG_SCSI_SATA_SVW is not set
6441 +# CONFIG_SCSI_ATA_PIIX is not set
6442 +# CONFIG_SCSI_SATA_NV is not set
6443 +# CONFIG_SCSI_SATA_QSTOR is not set
6444 +# CONFIG_SCSI_SATA_PROMISE is not set
6445 +# CONFIG_SCSI_SATA_SX4 is not set
6446 +# CONFIG_SCSI_SATA_SIL is not set
6447 +# CONFIG_SCSI_SATA_SIS is not set
6448 +# CONFIG_SCSI_SATA_ULI is not set
6449 +# CONFIG_SCSI_SATA_VIA is not set
6450 +# CONFIG_SCSI_SATA_VITESSE is not set
6451 +# CONFIG_SCSI_BUSLOGIC is not set
6452 +# CONFIG_SCSI_DMX3191D is not set
6453 +# CONFIG_SCSI_DTC3280 is not set
6454 +# CONFIG_SCSI_EATA is not set
6455 +# CONFIG_SCSI_EATA_DMA is not set
6456 +# CONFIG_SCSI_EATA_PIO is not set
6457 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
6458 +# CONFIG_SCSI_GDTH is not set
6459 +# CONFIG_SCSI_GENERIC_NCR5380 is not set
6460 +# CONFIG_SCSI_INITIO is not set
6461 +# CONFIG_SCSI_INIA100 is not set
6462 +# CONFIG_SCSI_NCR53C406A is not set
6463 +# CONFIG_SCSI_NCR53C7xx is not set
6464 +# CONFIG_SCSI_PAS16 is not set
6465 +# CONFIG_SCSI_PCI2000 is not set
6466 +# CONFIG_SCSI_PCI2220I is not set
6467 +# CONFIG_SCSI_PSI240I is not set
6468 +# CONFIG_SCSI_QLOGIC_FAS is not set
6469 +# CONFIG_SCSI_SIM710 is not set
6470 +# CONFIG_SCSI_SYM53C416 is not set
6471 +# CONFIG_SCSI_T128 is not set
6472 +# CONFIG_SCSI_U14_34F is not set
6473 +# CONFIG_SCSI_NSP32 is not set
6474 +# CONFIG_SCSI_DEBUG is not set
6477 +# Fusion MPT device support
6479 +# CONFIG_FUSION is not set
6480 +# CONFIG_FUSION_BOOT is not set
6481 +# CONFIG_FUSION_ISENSE is not set
6482 +# CONFIG_FUSION_CTL is not set
6483 +# CONFIG_FUSION_LAN is not set
6486 +# Network device support
6488 +CONFIG_NETDEVICES=y
6493 +# CONFIG_ARCNET is not set
6494 +# CONFIG_DUMMY is not set
6495 +# CONFIG_BONDING is not set
6496 +# CONFIG_EQUALIZER is not set
6497 +# CONFIG_TUN is not set
6498 +# CONFIG_ETHERTAP is not set
6501 +# Ethernet (10 or 100Mbit)
6503 +CONFIG_NET_ETHERNET=y
6504 +# CONFIG_SUNLANCE is not set
6505 +# CONFIG_SUNBMAC is not set
6506 +# CONFIG_SUNQE is not set
6507 +# CONFIG_SUNGEM is not set
6508 +# CONFIG_NET_VENDOR_3COM is not set
6509 +# CONFIG_LANCE is not set
6510 +# CONFIG_NET_VENDOR_SMC is not set
6511 +# CONFIG_NET_VENDOR_RACAL is not set
6512 +# CONFIG_NET_ISA is not set
6513 +# CONFIG_NET_PCI is not set
6514 +# CONFIG_NET_POCKET is not set
6517 +# Ethernet (1000 Mbit)
6519 +# CONFIG_ACENIC is not set
6520 +# CONFIG_DL2K is not set
6521 +# CONFIG_E1000 is not set
6522 +# CONFIG_MYRI_SBUS is not set
6523 +# CONFIG_NS83820 is not set
6524 +# CONFIG_HAMACHI is not set
6525 +# CONFIG_YELLOWFIN is not set
6526 +# CONFIG_R8169 is not set
6527 +# CONFIG_SK98LIN is not set
6528 +# CONFIG_TIGON3 is not set
6529 +# CONFIG_FDDI is not set
6530 +# CONFIG_HIPPI is not set
6531 +# CONFIG_PLIP is not set
6532 +# CONFIG_PPP is not set
6533 +# CONFIG_SLIP is not set
6536 +# Wireless LAN (non-hamradio)
6538 +# CONFIG_NET_RADIO is not set
6541 +# Token Ring devices
6543 +# CONFIG_TR is not set
6544 +# CONFIG_NET_FC is not set
6545 +# CONFIG_RCPCI is not set
6546 +# CONFIG_SHAPER is not set
6551 +# CONFIG_WAN is not set
6554 +# Amateur Radio support
6556 +# CONFIG_HAMRADIO is not set
6559 +# IrDA (infrared) support
6561 +# CONFIG_IRDA is not set
6566 +# CONFIG_ISDN is not set
6569 +# Input core support
6572 +CONFIG_INPUT_KEYBDEV=y
6573 +CONFIG_INPUT_MOUSEDEV=y
6574 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
6575 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
6576 +# CONFIG_INPUT_JOYDEV is not set
6577 +CONFIG_INPUT_EVDEV=y
6578 +# CONFIG_INPUT_UINPUT is not set
6581 +# Character devices
6584 +CONFIG_VT_CONSOLE=y
6585 +# CONFIG_SERIAL is not set
6586 +# CONFIG_SERIAL_EXTENDED is not set
6587 +CONFIG_SERIAL_NONSTANDARD=y
6588 +# CONFIG_COMPUTONE is not set
6589 +# CONFIG_ROCKETPORT is not set
6590 +# CONFIG_CYCLADES is not set
6591 +# CONFIG_DIGIEPCA is not set
6592 +# CONFIG_DIGI is not set
6593 +# CONFIG_ESPSERIAL is not set
6594 +# CONFIG_MOXA_INTELLIO is not set
6595 +# CONFIG_MOXA_SMARTIO is not set
6596 +# CONFIG_ISI is not set
6597 +# CONFIG_SYNCLINK is not set
6598 +# CONFIG_SYNCLINKMP is not set
6599 +# CONFIG_N_HDLC is not set
6600 +# CONFIG_RISCOM8 is not set
6601 +# CONFIG_SPECIALIX is not set
6602 +# CONFIG_SX is not set
6603 +# CONFIG_RIO is not set
6604 +# CONFIG_STALDRV is not set
6605 +# CONFIG_SERIAL_TX3912 is not set
6606 +# CONFIG_SERIAL_TX3912_CONSOLE is not set
6607 +# CONFIG_SERIAL_TXX9 is not set
6608 +# CONFIG_SERIAL_TXX9_CONSOLE is not set
6609 +# CONFIG_TXX927_SERIAL is not set
6610 +CONFIG_UNIX98_PTYS=y
6611 +CONFIG_UNIX98_PTY_COUNT=256
6617 +# CONFIG_I2C_ALGOBIT is not set
6618 +# CONFIG_SCx200_ACB is not set
6619 +# CONFIG_I2C_ALGOPCF is not set
6620 +# CONFIG_I2C_CHARDEV is not set
6621 +# CONFIG_I2C_PROC is not set
6626 +# CONFIG_BUSMOUSE is not set
6627 +# CONFIG_MOUSE is not set
6632 +# CONFIG_INPUT_GAMEPORT is not set
6633 +# CONFIG_INPUT_NS558 is not set
6634 +# CONFIG_INPUT_LIGHTNING is not set
6635 +# CONFIG_INPUT_PCIGAME is not set
6636 +# CONFIG_INPUT_CS461X is not set
6637 +# CONFIG_INPUT_EMU10K1 is not set
6638 +# CONFIG_INPUT_SERIO is not set
6639 +# CONFIG_INPUT_SERPORT is not set
6644 +# CONFIG_INPUT_ANALOG is not set
6645 +# CONFIG_INPUT_A3D is not set
6646 +# CONFIG_INPUT_ADI is not set
6647 +# CONFIG_INPUT_COBRA is not set
6648 +# CONFIG_INPUT_GF2K is not set
6649 +# CONFIG_INPUT_GRIP is not set
6650 +# CONFIG_INPUT_INTERACT is not set
6651 +# CONFIG_INPUT_TMDC is not set
6652 +# CONFIG_INPUT_SIDEWINDER is not set
6653 +# CONFIG_INPUT_IFORCE_USB is not set
6654 +# CONFIG_INPUT_IFORCE_232 is not set
6655 +# CONFIG_INPUT_WARRIOR is not set
6656 +# CONFIG_INPUT_MAGELLAN is not set
6657 +# CONFIG_INPUT_SPACEORB is not set
6658 +# CONFIG_INPUT_SPACEBALL is not set
6659 +# CONFIG_INPUT_STINGER is not set
6660 +# CONFIG_INPUT_DB9 is not set
6661 +# CONFIG_INPUT_GAMECON is not set
6662 +# CONFIG_INPUT_TURBOGRAFX is not set
6663 +# CONFIG_QIC02_TAPE is not set
6664 +# CONFIG_IPMI_HANDLER is not set
6665 +# CONFIG_IPMI_PANIC_EVENT is not set
6666 +# CONFIG_IPMI_DEVICE_INTERFACE is not set
6667 +# CONFIG_IPMI_KCS is not set
6668 +# CONFIG_IPMI_WATCHDOG is not set
6673 +# CONFIG_WATCHDOG is not set
6674 +# CONFIG_SCx200 is not set
6675 +# CONFIG_SCx200_GPIO is not set
6676 +# CONFIG_AMD_PM768 is not set
6677 +# CONFIG_NVRAM is not set
6678 +# CONFIG_RTC is not set
6679 +# CONFIG_DTLK is not set
6680 +# CONFIG_R3964 is not set
6681 +# CONFIG_APPLICOM is not set
6684 +# Ftape, the floppy tape device driver
6686 +# CONFIG_FTAPE is not set
6687 +# CONFIG_AGP is not set
6690 +# Direct Rendering Manager (XFree86 DRI support)
6692 +# CONFIG_DRM is not set
6697 +# CONFIG_QUOTA is not set
6698 +# CONFIG_QFMT_V2 is not set
6700 +# CONFIG_AUTOFS4_FS is not set
6701 +# CONFIG_REISERFS_FS is not set
6702 +# CONFIG_REISERFS_CHECK is not set
6703 +# CONFIG_REISERFS_PROC_INFO is not set
6704 +# CONFIG_ADFS_FS is not set
6705 +# CONFIG_ADFS_FS_RW is not set
6706 +# CONFIG_AFFS_FS is not set
6707 +# CONFIG_HFS_FS is not set
6708 +# CONFIG_HFSPLUS_FS is not set
6709 +# CONFIG_BEFS_FS is not set
6710 +# CONFIG_BEFS_DEBUG is not set
6711 +# CONFIG_BFS_FS is not set
6714 +# CONFIG_JBD_DEBUG is not set
6717 +# CONFIG_UMSDOS_FS is not set
6719 +# CONFIG_EFS_FS is not set
6720 +# CONFIG_JFFS_FS is not set
6721 +# CONFIG_JFFS2_FS is not set
6722 +# CONFIG_CRAMFS is not set
6723 +# CONFIG_TMPFS is not set
6725 +# CONFIG_ISO9660_FS is not set
6726 +# CONFIG_JOLIET is not set
6727 +# CONFIG_ZISOFS is not set
6728 +# CONFIG_JFS_FS is not set
6729 +# CONFIG_JFS_DEBUG is not set
6730 +# CONFIG_JFS_STATISTICS is not set
6731 +# CONFIG_MINIX_FS is not set
6732 +# CONFIG_VXFS_FS is not set
6733 +# CONFIG_NTFS_FS is not set
6734 +# CONFIG_NTFS_RW is not set
6735 +# CONFIG_HPFS_FS is not set
6737 +# CONFIG_DEVFS_FS is not set
6738 +# CONFIG_DEVFS_MOUNT is not set
6739 +# CONFIG_DEVFS_DEBUG is not set
6741 +# CONFIG_QNX4FS_FS is not set
6742 +# CONFIG_QNX4FS_RW is not set
6743 +# CONFIG_ROMFS_FS is not set
6745 +# CONFIG_SYSV_FS is not set
6746 +# CONFIG_UDF_FS is not set
6747 +# CONFIG_UDF_RW is not set
6748 +# CONFIG_UFS_FS is not set
6749 +# CONFIG_UFS_FS_WRITE is not set
6750 +# CONFIG_XFS_FS is not set
6751 +# CONFIG_XFS_QUOTA is not set
6752 +# CONFIG_XFS_RT is not set
6753 +# CONFIG_XFS_TRACE is not set
6754 +# CONFIG_XFS_DEBUG is not set
6757 +# Network File Systems
6759 +# CONFIG_CODA_FS is not set
6760 +# CONFIG_INTERMEZZO_FS is not set
6761 +# CONFIG_NFS_FS is not set
6762 +# CONFIG_NFS_V3 is not set
6763 +# CONFIG_NFS_DIRECTIO is not set
6764 +# CONFIG_ROOT_NFS is not set
6765 +# CONFIG_NFSD is not set
6766 +# CONFIG_NFSD_V3 is not set
6767 +# CONFIG_NFSD_TCP is not set
6768 +# CONFIG_SUNRPC is not set
6769 +# CONFIG_LOCKD is not set
6770 +# CONFIG_SMB_FS is not set
6771 +# CONFIG_NCP_FS is not set
6772 +# CONFIG_NCPFS_PACKET_SIGNING is not set
6773 +# CONFIG_NCPFS_IOCTL_LOCKING is not set
6774 +# CONFIG_NCPFS_STRONG is not set
6775 +# CONFIG_NCPFS_NFS_NS is not set
6776 +# CONFIG_NCPFS_OS2_NS is not set
6777 +# CONFIG_NCPFS_SMALLDOS is not set
6778 +# CONFIG_NCPFS_NLS is not set
6779 +# CONFIG_NCPFS_EXTRAS is not set
6780 +# CONFIG_ZISOFS_FS is not set
6785 +# CONFIG_PARTITION_ADVANCED is not set
6786 +CONFIG_MSDOS_PARTITION=y
6787 +# CONFIG_SMB_NLS is not set
6791 +# Native Language Support
6793 +CONFIG_NLS_DEFAULT="iso8859-1"
6794 +# CONFIG_NLS_CODEPAGE_437 is not set
6795 +# CONFIG_NLS_CODEPAGE_737 is not set
6796 +# CONFIG_NLS_CODEPAGE_775 is not set
6797 +# CONFIG_NLS_CODEPAGE_850 is not set
6798 +# CONFIG_NLS_CODEPAGE_852 is not set
6799 +# CONFIG_NLS_CODEPAGE_855 is not set
6800 +# CONFIG_NLS_CODEPAGE_857 is not set
6801 +# CONFIG_NLS_CODEPAGE_860 is not set
6802 +# CONFIG_NLS_CODEPAGE_861 is not set
6803 +# CONFIG_NLS_CODEPAGE_862 is not set
6804 +# CONFIG_NLS_CODEPAGE_863 is not set
6805 +# CONFIG_NLS_CODEPAGE_864 is not set
6806 +# CONFIG_NLS_CODEPAGE_865 is not set
6807 +# CONFIG_NLS_CODEPAGE_866 is not set
6808 +# CONFIG_NLS_CODEPAGE_869 is not set
6809 +# CONFIG_NLS_CODEPAGE_936 is not set
6810 +# CONFIG_NLS_CODEPAGE_950 is not set
6811 +# CONFIG_NLS_CODEPAGE_932 is not set
6812 +# CONFIG_NLS_CODEPAGE_949 is not set
6813 +# CONFIG_NLS_CODEPAGE_874 is not set
6814 +# CONFIG_NLS_ISO8859_8 is not set
6815 +# CONFIG_NLS_CODEPAGE_1250 is not set
6816 +# CONFIG_NLS_CODEPAGE_1251 is not set
6817 +# CONFIG_NLS_ISO8859_1 is not set
6818 +# CONFIG_NLS_ISO8859_2 is not set
6819 +# CONFIG_NLS_ISO8859_3 is not set
6820 +# CONFIG_NLS_ISO8859_4 is not set
6821 +# CONFIG_NLS_ISO8859_5 is not set
6822 +# CONFIG_NLS_ISO8859_6 is not set
6823 +# CONFIG_NLS_ISO8859_7 is not set
6824 +# CONFIG_NLS_ISO8859_9 is not set
6825 +# CONFIG_NLS_ISO8859_13 is not set
6826 +# CONFIG_NLS_ISO8859_14 is not set
6827 +# CONFIG_NLS_ISO8859_15 is not set
6828 +# CONFIG_NLS_KOI8_R is not set
6829 +# CONFIG_NLS_KOI8_U is not set
6830 +# CONFIG_NLS_UTF8 is not set
6833 +# Multimedia devices
6835 +# CONFIG_VIDEO_DEV is not set
6840 +# CONFIG_VGA_CONSOLE is not set
6841 +# CONFIG_MDA_CONSOLE is not set
6844 +# Frame-buffer support
6847 +CONFIG_DUMMY_CONSOLE=y
6848 +# CONFIG_FB_CYBER2000 is not set
6849 +# CONFIG_FB_VIRTUAL is not set
6850 +CONFIG_FBCON_ADVANCED=y
6851 +# CONFIG_FBCON_MFB is not set
6852 +# CONFIG_FBCON_CFB2 is not set
6853 +# CONFIG_FBCON_CFB4 is not set
6854 +# CONFIG_FBCON_CFB8 is not set
6855 +CONFIG_FBCON_CFB16=y
6856 +# CONFIG_FBCON_CFB24 is not set
6857 +# CONFIG_FBCON_CFB32 is not set
6858 +# CONFIG_FBCON_AFB is not set
6859 +# CONFIG_FBCON_ILBM is not set
6860 +# CONFIG_FBCON_IPLAN2P2 is not set
6861 +# CONFIG_FBCON_IPLAN2P4 is not set
6862 +# CONFIG_FBCON_IPLAN2P8 is not set
6863 +# CONFIG_FBCON_MAC is not set
6864 +# CONFIG_FBCON_VGA_PLANES is not set
6865 +# CONFIG_FBCON_VGA is not set
6866 +# CONFIG_FBCON_HGA is not set
6867 +# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
6868 +CONFIG_FBCON_FONTS=y
6871 +# CONFIG_FONT_SUN8x16 is not set
6872 +# CONFIG_FONT_SUN12x22 is not set
6873 +# CONFIG_FONT_6x11 is not set
6874 +# CONFIG_FONT_PEARL_8x8 is not set
6875 +# CONFIG_FONT_ACORN_8x8 is not set
6881 +# CONFIG_SOUND_ALI5455 is not set
6882 +# CONFIG_SOUND_BT878 is not set
6883 +# CONFIG_SOUND_CMPCI is not set
6884 +# CONFIG_SOUND_EMU10K1 is not set
6885 +# CONFIG_MIDI_EMU10K1 is not set
6886 +# CONFIG_SOUND_FUSION is not set
6887 +# CONFIG_SOUND_CS4281 is not set
6888 +# CONFIG_SOUND_ES1370 is not set
6889 +# CONFIG_SOUND_ES1371 is not set
6890 +# CONFIG_SOUND_ESSSOLO1 is not set
6891 +# CONFIG_SOUND_MAESTRO is not set
6892 +# CONFIG_SOUND_MAESTRO3 is not set
6893 +# CONFIG_SOUND_FORTE is not set
6894 +# CONFIG_SOUND_ICH is not set
6895 +# CONFIG_SOUND_RME96XX is not set
6896 +# CONFIG_SOUND_SONICVIBES is not set
6897 +# CONFIG_SOUND_TRIDENT is not set
6898 +# CONFIG_SOUND_MSNDCLAS is not set
6899 +# CONFIG_SOUND_MSNDPIN is not set
6900 +# CONFIG_SOUND_VIA82CXXX is not set
6901 +# CONFIG_MIDI_VIA82CXXX is not set
6902 +# CONFIG_SOUND_OSS is not set
6903 +# CONFIG_SOUND_TVMIXER is not set
6904 +# CONFIG_SOUND_AD1980 is not set
6905 +# CONFIG_SOUND_WM97XX is not set
6910 +# CONFIG_USB is not set
6913 +# Support for USB gadgets
6915 +# CONFIG_USB_GADGET is not set
6918 +# Bluetooth support
6920 +# CONFIG_BLUEZ is not set
6925 +CONFIG_CROSSCOMPILE=y
6926 +# CONFIG_RUNTIME_DEBUG is not set
6927 +# CONFIG_KGDB is not set
6928 +# CONFIG_GDB_CONSOLE is not set
6929 +# CONFIG_DEBUG_INFO is not set
6930 +# CONFIG_MAGIC_SYSRQ is not set
6931 +# CONFIG_MIPS_UNCACHED is not set
6932 +CONFIG_LOG_BUF_SHIFT=0
6935 +# Cryptographic options
6937 +# CONFIG_CRYPTO is not set
6942 +# CONFIG_CRC32 is not set
6943 +CONFIG_ZLIB_INFLATE=m
6944 +CONFIG_ZLIB_DEFLATE=m
6945 --- a/arch/mips/defconfig-hp-lj
6946 +++ b/arch/mips/defconfig-hp-lj
6947 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
6948 # CONFIG_MIPS_PB1000 is not set
6949 # CONFIG_MIPS_PB1100 is not set
6950 # CONFIG_MIPS_PB1500 is not set
6951 -# CONFIG_MIPS_HYDROGEN3 is not set
6952 # CONFIG_MIPS_PB1550 is not set
6953 +# CONFIG_MIPS_HYDROGEN3 is not set
6954 # CONFIG_MIPS_XXS1500 is not set
6955 # CONFIG_MIPS_MTX1 is not set
6956 # CONFIG_COGENT_CSB250 is not set
6957 @@ -184,8 +184,8 @@ CONFIG_MTD_CFI_AMDSTD=y
6958 # Mapping drivers for chip access
6960 CONFIG_MTD_PHYSMAP=y
6961 -CONFIG_MTD_PHYSMAP_START=10040000
6962 -CONFIG_MTD_PHYSMAP_LEN=00fc0000
6963 +CONFIG_MTD_PHYSMAP_START=0x10040000
6964 +CONFIG_MTD_PHYSMAP_LEN=0x00fc0000
6965 CONFIG_MTD_PHYSMAP_BUSWIDTH=4
6966 # CONFIG_MTD_PB1000 is not set
6967 # CONFIG_MTD_PB1500 is not set
6968 @@ -193,9 +193,7 @@ CONFIG_MTD_PHYSMAP_BUSWIDTH=4
6969 # CONFIG_MTD_BOSPORUS is not set
6970 # CONFIG_MTD_XXS1500 is not set
6971 # CONFIG_MTD_MTX1 is not set
6972 -# CONFIG_MTD_DB1X00 is not set
6973 # CONFIG_MTD_PB1550 is not set
6974 -# CONFIG_MTD_HYDROGEN3 is not set
6975 # CONFIG_MTD_MIRAGE is not set
6976 # CONFIG_MTD_CSTM_MIPS_IXX is not set
6977 # CONFIG_MTD_OCELOT is not set
6978 @@ -214,7 +212,6 @@ CONFIG_MTD_PHYSMAP_BUSWIDTH=4
6980 # Disk-On-Chip Device Drivers
6982 -# CONFIG_MTD_DOC1000 is not set
6983 # CONFIG_MTD_DOC2000 is not set
6984 # CONFIG_MTD_DOC2001 is not set
6985 # CONFIG_MTD_DOCPROBE is not set
6986 @@ -304,11 +301,6 @@ CONFIG_IP_PNP_DHCP=y
6988 # CONFIG_IPX is not set
6989 # CONFIG_ATALK is not set
6992 -# Appletalk devices
6994 -# CONFIG_DEV_APPLETALK is not set
6995 # CONFIG_DECNET is not set
6996 # CONFIG_BRIDGE is not set
6997 # CONFIG_X25 is not set
6998 @@ -604,7 +596,6 @@ CONFIG_SERIAL=y
6999 CONFIG_SERIAL_CONSOLE=y
7000 # CONFIG_SERIAL_EXTENDED is not set
7001 # CONFIG_SERIAL_NONSTANDARD is not set
7002 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7003 # CONFIG_UNIX98_PTYS is not set
7006 --- a/arch/mips/defconfig-hydrogen3
7007 +++ b/arch/mips/defconfig-hydrogen3
7008 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
7009 # CONFIG_MIPS_PB1000 is not set
7010 # CONFIG_MIPS_PB1100 is not set
7011 # CONFIG_MIPS_PB1500 is not set
7012 -CONFIG_MIPS_HYDROGEN3=y
7013 # CONFIG_MIPS_PB1550 is not set
7014 +CONFIG_MIPS_HYDROGEN3=y
7015 # CONFIG_MIPS_XXS1500 is not set
7016 # CONFIG_MIPS_MTX1 is not set
7017 # CONFIG_COGENT_CSB250 is not set
7018 @@ -214,9 +214,7 @@ CONFIG_MTD_CFI_AMDSTD=y
7019 # CONFIG_MTD_BOSPORUS is not set
7020 # CONFIG_MTD_XXS1500 is not set
7021 # CONFIG_MTD_MTX1 is not set
7022 -# CONFIG_MTD_DB1X00 is not set
7023 # CONFIG_MTD_PB1550 is not set
7024 -CONFIG_MTD_HYDROGEN3=y
7025 # CONFIG_MTD_MIRAGE is not set
7026 # CONFIG_MTD_CSTM_MIPS_IXX is not set
7027 # CONFIG_MTD_OCELOT is not set
7028 @@ -235,7 +233,6 @@ CONFIG_MTD_HYDROGEN3=y
7030 # Disk-On-Chip Device Drivers
7032 -# CONFIG_MTD_DOC1000 is not set
7033 # CONFIG_MTD_DOC2000 is not set
7034 # CONFIG_MTD_DOC2001 is not set
7035 # CONFIG_MTD_DOCPROBE is not set
7036 @@ -340,11 +337,6 @@ CONFIG_IP_PNP_BOOTP=y
7038 # CONFIG_IPX is not set
7039 # CONFIG_ATALK is not set
7042 -# Appletalk devices
7044 -# CONFIG_DEV_APPLETALK is not set
7045 # CONFIG_DECNET is not set
7046 # CONFIG_BRIDGE is not set
7047 # CONFIG_X25 is not set
7048 @@ -590,7 +582,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
7049 # CONFIG_AU1X00_USB_TTY is not set
7050 # CONFIG_AU1X00_USB_RAW is not set
7051 # CONFIG_TXX927_SERIAL is not set
7052 -CONFIG_MIPS_HYDROGEN3_BUTTONS=y
7053 CONFIG_UNIX98_PTYS=y
7054 CONFIG_UNIX98_PTY_COUNT=256
7056 @@ -838,6 +829,7 @@ CONFIG_DUMMY_CONSOLE=y
7057 # CONFIG_FB_PM2 is not set
7058 # CONFIG_FB_PM3 is not set
7059 # CONFIG_FB_CYBER2000 is not set
7061 # CONFIG_FB_MATROX is not set
7062 # CONFIG_FB_ATY is not set
7063 # CONFIG_FB_RADEON is not set
7064 @@ -849,7 +841,6 @@ CONFIG_DUMMY_CONSOLE=y
7065 # CONFIG_FB_VOODOO1 is not set
7066 # CONFIG_FB_TRIDENT is not set
7067 # CONFIG_FB_E1356 is not set
7069 # CONFIG_FB_IT8181 is not set
7070 # CONFIG_FB_VIRTUAL is not set
7071 CONFIG_FBCON_ADVANCED=y
7072 --- a/arch/mips/defconfig-ip22
7073 +++ b/arch/mips/defconfig-ip22
7074 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
7075 # CONFIG_MIPS_PB1000 is not set
7076 # CONFIG_MIPS_PB1100 is not set
7077 # CONFIG_MIPS_PB1500 is not set
7078 -# CONFIG_MIPS_HYDROGEN3 is not set
7079 # CONFIG_MIPS_PB1550 is not set
7080 +# CONFIG_MIPS_HYDROGEN3 is not set
7081 # CONFIG_MIPS_XXS1500 is not set
7082 # CONFIG_MIPS_MTX1 is not set
7083 # CONFIG_COGENT_CSB250 is not set
7084 @@ -235,11 +235,6 @@ CONFIG_IP_PNP_BOOTP=y
7086 # CONFIG_IPX is not set
7087 # CONFIG_ATALK is not set
7090 -# Appletalk devices
7092 -# CONFIG_DEV_APPLETALK is not set
7093 # CONFIG_DECNET is not set
7094 # CONFIG_BRIDGE is not set
7095 # CONFIG_X25 is not set
7096 @@ -319,9 +314,11 @@ CONFIG_SGIWD93_SCSI=y
7097 # CONFIG_SCSI_MEGARAID is not set
7098 # CONFIG_SCSI_MEGARAID2 is not set
7099 # CONFIG_SCSI_SATA is not set
7100 +# CONFIG_SCSI_SATA_AHCI is not set
7101 # CONFIG_SCSI_SATA_SVW is not set
7102 # CONFIG_SCSI_ATA_PIIX is not set
7103 # CONFIG_SCSI_SATA_NV is not set
7104 +# CONFIG_SCSI_SATA_QSTOR is not set
7105 # CONFIG_SCSI_SATA_PROMISE is not set
7106 # CONFIG_SCSI_SATA_SX4 is not set
7107 # CONFIG_SCSI_SATA_SIL is not set
7108 @@ -465,7 +462,6 @@ CONFIG_VT_CONSOLE=y
7109 # CONFIG_SERIAL is not set
7110 # CONFIG_SERIAL_EXTENDED is not set
7111 # CONFIG_SERIAL_NONSTANDARD is not set
7112 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7113 CONFIG_UNIX98_PTYS=y
7114 CONFIG_UNIX98_PTY_COUNT=256
7116 --- a/arch/mips/defconfig-it8172
7117 +++ b/arch/mips/defconfig-it8172
7118 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
7119 # CONFIG_MIPS_PB1000 is not set
7120 # CONFIG_MIPS_PB1100 is not set
7121 # CONFIG_MIPS_PB1500 is not set
7122 -# CONFIG_MIPS_HYDROGEN3 is not set
7123 # CONFIG_MIPS_PB1550 is not set
7124 +# CONFIG_MIPS_HYDROGEN3 is not set
7125 # CONFIG_MIPS_XXS1500 is not set
7126 # CONFIG_MIPS_MTX1 is not set
7127 # CONFIG_COGENT_CSB250 is not set
7128 @@ -186,8 +186,8 @@ CONFIG_MTD_CFI_INTELEXT=y
7129 # Mapping drivers for chip access
7131 CONFIG_MTD_PHYSMAP=y
7132 -CONFIG_MTD_PHYSMAP_START=8000000
7133 -CONFIG_MTD_PHYSMAP_LEN=2000000
7134 +CONFIG_MTD_PHYSMAP_START=0x8000000
7135 +CONFIG_MTD_PHYSMAP_LEN=0x2000000
7136 CONFIG_MTD_PHYSMAP_BUSWIDTH=4
7137 # CONFIG_MTD_PB1000 is not set
7138 # CONFIG_MTD_PB1500 is not set
7139 @@ -195,9 +195,7 @@ CONFIG_MTD_PHYSMAP_BUSWIDTH=4
7140 # CONFIG_MTD_BOSPORUS is not set
7141 # CONFIG_MTD_XXS1500 is not set
7142 # CONFIG_MTD_MTX1 is not set
7143 -# CONFIG_MTD_DB1X00 is not set
7144 # CONFIG_MTD_PB1550 is not set
7145 -# CONFIG_MTD_HYDROGEN3 is not set
7146 # CONFIG_MTD_MIRAGE is not set
7147 # CONFIG_MTD_CSTM_MIPS_IXX is not set
7148 # CONFIG_MTD_OCELOT is not set
7149 @@ -216,7 +214,6 @@ CONFIG_MTD_PHYSMAP_BUSWIDTH=4
7151 # Disk-On-Chip Device Drivers
7153 -# CONFIG_MTD_DOC1000 is not set
7154 # CONFIG_MTD_DOC2000 is not set
7155 # CONFIG_MTD_DOC2001 is not set
7156 # CONFIG_MTD_DOCPROBE is not set
7157 @@ -304,11 +301,6 @@ CONFIG_IP_PNP_BOOTP=y
7159 # CONFIG_IPX is not set
7160 # CONFIG_ATALK is not set
7163 -# Appletalk devices
7165 -# CONFIG_DEV_APPLETALK is not set
7166 # CONFIG_DECNET is not set
7167 # CONFIG_BRIDGE is not set
7168 # CONFIG_X25 is not set
7169 @@ -592,7 +584,6 @@ CONFIG_SERIAL_CONSOLE=y
7171 # CONFIG_IT8172_SCR0 is not set
7172 # CONFIG_IT8172_SCR1 is not set
7173 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7174 CONFIG_UNIX98_PTYS=y
7175 CONFIG_UNIX98_PTY_COUNT=256
7177 --- a/arch/mips/defconfig-ivr
7178 +++ b/arch/mips/defconfig-ivr
7179 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
7180 # CONFIG_MIPS_PB1000 is not set
7181 # CONFIG_MIPS_PB1100 is not set
7182 # CONFIG_MIPS_PB1500 is not set
7183 -# CONFIG_MIPS_HYDROGEN3 is not set
7184 # CONFIG_MIPS_PB1550 is not set
7185 +# CONFIG_MIPS_HYDROGEN3 is not set
7186 # CONFIG_MIPS_XXS1500 is not set
7187 # CONFIG_MIPS_MTX1 is not set
7188 # CONFIG_COGENT_CSB250 is not set
7189 @@ -226,11 +226,6 @@ CONFIG_IP_PNP_BOOTP=y
7191 # CONFIG_IPX is not set
7192 # CONFIG_ATALK is not set
7195 -# Appletalk devices
7197 -# CONFIG_DEV_APPLETALK is not set
7198 # CONFIG_DECNET is not set
7199 # CONFIG_BRIDGE is not set
7200 # CONFIG_X25 is not set
7201 @@ -516,7 +511,6 @@ CONFIG_SERIAL_CONSOLE=y
7202 CONFIG_QTRONIX_KEYBOARD=y
7204 # CONFIG_IT8172_SCR0 is not set
7205 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7206 CONFIG_UNIX98_PTYS=y
7207 CONFIG_UNIX98_PTY_COUNT=256
7209 --- a/arch/mips/defconfig-jmr3927
7210 +++ b/arch/mips/defconfig-jmr3927
7211 @@ -28,8 +28,8 @@ CONFIG_EXPERIMENTAL=y
7212 # CONFIG_MIPS_PB1000 is not set
7213 # CONFIG_MIPS_PB1100 is not set
7214 # CONFIG_MIPS_PB1500 is not set
7215 -# CONFIG_MIPS_HYDROGEN3 is not set
7216 # CONFIG_MIPS_PB1550 is not set
7217 +# CONFIG_MIPS_HYDROGEN3 is not set
7218 # CONFIG_MIPS_XXS1500 is not set
7219 # CONFIG_MIPS_MTX1 is not set
7220 # CONFIG_COGENT_CSB250 is not set
7221 @@ -225,11 +225,6 @@ CONFIG_IP_PNP_BOOTP=y
7223 # CONFIG_IPX is not set
7224 # CONFIG_ATALK is not set
7227 -# Appletalk devices
7229 -# CONFIG_DEV_APPLETALK is not set
7230 # CONFIG_DECNET is not set
7231 # CONFIG_BRIDGE is not set
7232 # CONFIG_X25 is not set
7233 @@ -454,7 +449,6 @@ CONFIG_SERIAL_NONSTANDARD=y
7234 # CONFIG_SERIAL_TXX9_CONSOLE is not set
7235 CONFIG_TXX927_SERIAL=y
7236 CONFIG_TXX927_SERIAL_CONSOLE=y
7237 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7238 # CONFIG_UNIX98_PTYS is not set
7241 --- a/arch/mips/defconfig-lasat
7242 +++ b/arch/mips/defconfig-lasat
7243 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
7244 # CONFIG_MIPS_PB1000 is not set
7245 # CONFIG_MIPS_PB1100 is not set
7246 # CONFIG_MIPS_PB1500 is not set
7247 -# CONFIG_MIPS_HYDROGEN3 is not set
7248 # CONFIG_MIPS_PB1550 is not set
7249 +# CONFIG_MIPS_HYDROGEN3 is not set
7250 # CONFIG_MIPS_XXS1500 is not set
7251 # CONFIG_MIPS_MTX1 is not set
7252 # CONFIG_COGENT_CSB250 is not set
7253 @@ -198,9 +198,7 @@ CONFIG_MTD_CFI_AMDSTD=y
7254 # CONFIG_MTD_BOSPORUS is not set
7255 # CONFIG_MTD_XXS1500 is not set
7256 # CONFIG_MTD_MTX1 is not set
7257 -# CONFIG_MTD_DB1X00 is not set
7258 # CONFIG_MTD_PB1550 is not set
7259 -# CONFIG_MTD_HYDROGEN3 is not set
7260 # CONFIG_MTD_MIRAGE is not set
7261 # CONFIG_MTD_CSTM_MIPS_IXX is not set
7262 # CONFIG_MTD_OCELOT is not set
7263 @@ -219,7 +217,6 @@ CONFIG_MTD_LASAT=y
7265 # Disk-On-Chip Device Drivers
7267 -# CONFIG_MTD_DOC1000 is not set
7268 # CONFIG_MTD_DOC2000 is not set
7269 # CONFIG_MTD_DOC2001 is not set
7270 # CONFIG_MTD_DOCPROBE is not set
7271 @@ -303,11 +300,6 @@ CONFIG_INET=y
7273 # CONFIG_IPX is not set
7274 # CONFIG_ATALK is not set
7277 -# Appletalk devices
7279 -# CONFIG_DEV_APPLETALK is not set
7280 # CONFIG_DECNET is not set
7281 # CONFIG_BRIDGE is not set
7282 # CONFIG_X25 is not set
7283 @@ -584,7 +576,6 @@ CONFIG_SERIAL=y
7284 CONFIG_SERIAL_CONSOLE=y
7285 # CONFIG_SERIAL_EXTENDED is not set
7286 # CONFIG_SERIAL_NONSTANDARD is not set
7287 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7288 CONFIG_UNIX98_PTYS=y
7289 CONFIG_UNIX98_PTY_COUNT=256
7291 --- a/arch/mips/defconfig-malta
7292 +++ b/arch/mips/defconfig-malta
7293 @@ -22,16 +22,19 @@ CONFIG_KMOD=y
7295 # CONFIG_ACER_PICA_61 is not set
7296 # CONFIG_MIPS_BOSPORUS is not set
7297 +# CONFIG_MIPS_FICMMP is not set
7298 # CONFIG_MIPS_MIRAGE is not set
7299 # CONFIG_MIPS_DB1000 is not set
7300 # CONFIG_MIPS_DB1100 is not set
7301 # CONFIG_MIPS_DB1500 is not set
7302 # CONFIG_MIPS_DB1550 is not set
7303 +# CONFIG_MIPS_DB1200 is not set
7304 # CONFIG_MIPS_PB1000 is not set
7305 # CONFIG_MIPS_PB1100 is not set
7306 # CONFIG_MIPS_PB1500 is not set
7307 -# CONFIG_MIPS_HYDROGEN3 is not set
7308 # CONFIG_MIPS_PB1550 is not set
7309 +# CONFIG_MIPS_PB1200 is not set
7310 +# CONFIG_MIPS_HYDROGEN3 is not set
7311 # CONFIG_MIPS_XXS1500 is not set
7312 # CONFIG_MIPS_MTX1 is not set
7313 # CONFIG_COGENT_CSB250 is not set
7314 @@ -237,11 +240,6 @@ CONFIG_IP_PNP_BOOTP=y
7316 # CONFIG_IPX is not set
7317 # CONFIG_ATALK is not set
7320 -# Appletalk devices
7322 -# CONFIG_DEV_APPLETALK is not set
7323 # CONFIG_DECNET is not set
7324 # CONFIG_BRIDGE is not set
7325 # CONFIG_X25 is not set
7326 @@ -273,8 +271,83 @@ CONFIG_IP_PNP_BOOTP=y
7328 # ATA/IDE/MFM/RLL support
7330 -# CONFIG_IDE is not set
7334 +# IDE, ATA and ATAPI Block devices
7336 +CONFIG_BLK_DEV_IDE=y
7339 +# Please see Documentation/ide.txt for help/info on IDE drives
7341 +# CONFIG_BLK_DEV_HD_IDE is not set
7342 # CONFIG_BLK_DEV_HD is not set
7343 +# CONFIG_BLK_DEV_IDE_SATA is not set
7344 +CONFIG_BLK_DEV_IDEDISK=y
7345 +# CONFIG_IDEDISK_MULTI_MODE is not set
7346 +# CONFIG_IDEDISK_STROKE is not set
7347 +# CONFIG_BLK_DEV_IDECS is not set
7348 +# CONFIG_BLK_DEV_DELKIN is not set
7349 +CONFIG_BLK_DEV_IDECD=y
7350 +CONFIG_BLK_DEV_IDETAPE=y
7351 +CONFIG_BLK_DEV_IDEFLOPPY=y
7352 +CONFIG_BLK_DEV_IDESCSI=y
7353 +# CONFIG_IDE_TASK_IOCTL is not set
7356 +# IDE chipset support/bugfixes
7358 +# CONFIG_BLK_DEV_CMD640 is not set
7359 +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
7360 +# CONFIG_BLK_DEV_ISAPNP is not set
7361 +CONFIG_BLK_DEV_IDEPCI=y
7362 +CONFIG_BLK_DEV_GENERIC=y
7363 +CONFIG_IDEPCI_SHARE_IRQ=y
7364 +CONFIG_BLK_DEV_IDEDMA_PCI=y
7365 +# CONFIG_BLK_DEV_OFFBOARD is not set
7366 +CONFIG_BLK_DEV_IDEDMA_FORCED=y
7367 +CONFIG_IDEDMA_PCI_AUTO=y
7368 +# CONFIG_IDEDMA_ONLYDISK is not set
7369 +CONFIG_BLK_DEV_IDEDMA=y
7370 +# CONFIG_IDEDMA_PCI_WIP is not set
7371 +# CONFIG_BLK_DEV_ADMA100 is not set
7372 +# CONFIG_BLK_DEV_AEC62XX is not set
7373 +# CONFIG_BLK_DEV_ALI15X3 is not set
7374 +# CONFIG_WDC_ALI15X3 is not set
7375 +# CONFIG_BLK_DEV_AMD74XX is not set
7376 +# CONFIG_AMD74XX_OVERRIDE is not set
7377 +# CONFIG_BLK_DEV_ATIIXP is not set
7378 +# CONFIG_BLK_DEV_CMD64X is not set
7379 +# CONFIG_BLK_DEV_TRIFLEX is not set
7380 +# CONFIG_BLK_DEV_CY82C693 is not set
7381 +# CONFIG_BLK_DEV_CS5530 is not set
7382 +# CONFIG_BLK_DEV_HPT34X is not set
7383 +# CONFIG_HPT34X_AUTODMA is not set
7384 +# CONFIG_BLK_DEV_HPT366 is not set
7385 +CONFIG_BLK_DEV_PIIX=y
7386 +# CONFIG_BLK_DEV_NS87415 is not set
7387 +# CONFIG_BLK_DEV_OPTI621 is not set
7388 +# CONFIG_BLK_DEV_PDC202XX_OLD is not set
7389 +# CONFIG_PDC202XX_BURST is not set
7390 +# CONFIG_BLK_DEV_PDC202XX_NEW is not set
7391 +# CONFIG_BLK_DEV_RZ1000 is not set
7392 +# CONFIG_BLK_DEV_SC1200 is not set
7393 +# CONFIG_BLK_DEV_SVWKS is not set
7394 +# CONFIG_BLK_DEV_SIIMAGE is not set
7395 +# CONFIG_BLK_DEV_SIS5513 is not set
7396 +# CONFIG_BLK_DEV_SLC90E66 is not set
7397 +# CONFIG_BLK_DEV_TRM290 is not set
7398 +# CONFIG_BLK_DEV_VIA82CXXX is not set
7399 +# CONFIG_IDE_CHIPSETS is not set
7400 +CONFIG_IDEDMA_AUTO=y
7401 +# CONFIG_IDEDMA_IVB is not set
7402 +# CONFIG_DMA_NONPCI is not set
7403 +# CONFIG_BLK_DEV_ATARAID is not set
7404 +# CONFIG_BLK_DEV_ATARAID_PDC is not set
7405 +# CONFIG_BLK_DEV_ATARAID_HPT is not set
7406 +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
7407 +# CONFIG_BLK_DEV_ATARAID_SII is not set
7411 @@ -319,9 +392,11 @@ CONFIG_SD_EXTRA_DEVS=40
7412 # CONFIG_SCSI_MEGARAID is not set
7413 # CONFIG_SCSI_MEGARAID2 is not set
7414 # CONFIG_SCSI_SATA is not set
7415 +# CONFIG_SCSI_SATA_AHCI is not set
7416 # CONFIG_SCSI_SATA_SVW is not set
7417 # CONFIG_SCSI_ATA_PIIX is not set
7418 # CONFIG_SCSI_SATA_NV is not set
7419 +# CONFIG_SCSI_SATA_QSTOR is not set
7420 # CONFIG_SCSI_SATA_PROMISE is not set
7421 # CONFIG_SCSI_SATA_SX4 is not set
7422 # CONFIG_SCSI_SATA_SIL is not set
7423 @@ -524,7 +599,6 @@ CONFIG_SERIAL=y
7424 CONFIG_SERIAL_CONSOLE=y
7425 # CONFIG_SERIAL_EXTENDED is not set
7426 # CONFIG_SERIAL_NONSTANDARD is not set
7427 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7428 CONFIG_UNIX98_PTYS=y
7429 CONFIG_UNIX98_PTY_COUNT=256
7431 --- a/arch/mips/defconfig-mirage
7432 +++ b/arch/mips/defconfig-mirage
7433 @@ -30,8 +30,8 @@ CONFIG_MIPS_MIRAGE=y
7434 # CONFIG_MIPS_PB1000 is not set
7435 # CONFIG_MIPS_PB1100 is not set
7436 # CONFIG_MIPS_PB1500 is not set
7437 -# CONFIG_MIPS_HYDROGEN3 is not set
7438 # CONFIG_MIPS_PB1550 is not set
7439 +# CONFIG_MIPS_HYDROGEN3 is not set
7440 # CONFIG_MIPS_XXS1500 is not set
7441 # CONFIG_MIPS_MTX1 is not set
7442 # CONFIG_COGENT_CSB250 is not set
7443 @@ -209,9 +209,7 @@ CONFIG_MTD_CFI_AMDSTD=y
7444 # CONFIG_MTD_BOSPORUS is not set
7445 # CONFIG_MTD_XXS1500 is not set
7446 # CONFIG_MTD_MTX1 is not set
7447 -# CONFIG_MTD_DB1X00 is not set
7448 # CONFIG_MTD_PB1550 is not set
7449 -# CONFIG_MTD_HYDROGEN3 is not set
7451 # CONFIG_MTD_CSTM_MIPS_IXX is not set
7452 # CONFIG_MTD_OCELOT is not set
7453 @@ -230,7 +228,6 @@ CONFIG_MTD_MIRAGE=y
7455 # Disk-On-Chip Device Drivers
7457 -# CONFIG_MTD_DOC1000 is not set
7458 # CONFIG_MTD_DOC2000 is not set
7459 # CONFIG_MTD_DOC2001 is not set
7460 # CONFIG_MTD_DOCPROBE is not set
7461 @@ -335,11 +332,6 @@ CONFIG_IP_PNP_BOOTP=y
7463 # CONFIG_IPX is not set
7464 # CONFIG_ATALK is not set
7467 -# Appletalk devices
7469 -# CONFIG_DEV_APPLETALK is not set
7470 # CONFIG_DECNET is not set
7471 # CONFIG_BRIDGE is not set
7472 # CONFIG_X25 is not set
7473 @@ -560,7 +552,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
7474 # CONFIG_AU1X00_USB_TTY is not set
7475 # CONFIG_AU1X00_USB_RAW is not set
7476 # CONFIG_TXX927_SERIAL is not set
7477 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7478 CONFIG_UNIX98_PTYS=y
7479 CONFIG_UNIX98_PTY_COUNT=256
7481 --- a/arch/mips/defconfig-mpc30x
7482 +++ b/arch/mips/defconfig-mpc30x
7483 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
7484 # CONFIG_MIPS_PB1000 is not set
7485 # CONFIG_MIPS_PB1100 is not set
7486 # CONFIG_MIPS_PB1500 is not set
7487 -# CONFIG_MIPS_HYDROGEN3 is not set
7488 # CONFIG_MIPS_PB1550 is not set
7489 +# CONFIG_MIPS_HYDROGEN3 is not set
7490 # CONFIG_MIPS_XXS1500 is not set
7491 # CONFIG_MIPS_MTX1 is not set
7492 # CONFIG_COGENT_CSB250 is not set
7493 @@ -228,11 +228,6 @@ CONFIG_IP_PNP_BOOTP=y
7495 # CONFIG_IPX is not set
7496 # CONFIG_ATALK is not set
7499 -# Appletalk devices
7501 -# CONFIG_DEV_APPLETALK is not set
7502 # CONFIG_DECNET is not set
7503 # CONFIG_BRIDGE is not set
7504 # CONFIG_X25 is not set
7505 @@ -400,7 +395,6 @@ CONFIG_SERIAL=y
7506 CONFIG_SERIAL_CONSOLE=y
7507 # CONFIG_SERIAL_EXTENDED is not set
7508 # CONFIG_SERIAL_NONSTANDARD is not set
7509 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7510 # CONFIG_VR41XX_KIU is not set
7511 CONFIG_UNIX98_PTYS=y
7512 CONFIG_UNIX98_PTY_COUNT=256
7513 --- a/arch/mips/defconfig-mtx-1
7514 +++ b/arch/mips/defconfig-mtx-1
7515 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
7516 # CONFIG_MIPS_PB1000 is not set
7517 # CONFIG_MIPS_PB1100 is not set
7518 # CONFIG_MIPS_PB1500 is not set
7519 -# CONFIG_MIPS_HYDROGEN3 is not set
7520 # CONFIG_MIPS_PB1550 is not set
7521 +# CONFIG_MIPS_HYDROGEN3 is not set
7522 # CONFIG_MIPS_XXS1500 is not set
7524 # CONFIG_COGENT_CSB250 is not set
7525 @@ -193,9 +193,7 @@ CONFIG_MTD_CFI_AMDSTD=y
7526 # CONFIG_MTD_BOSPORUS is not set
7527 # CONFIG_MTD_XXS1500 is not set
7529 -# CONFIG_MTD_DB1X00 is not set
7530 # CONFIG_MTD_PB1550 is not set
7531 -# CONFIG_MTD_HYDROGEN3 is not set
7532 # CONFIG_MTD_MIRAGE is not set
7533 # CONFIG_MTD_CSTM_MIPS_IXX is not set
7534 # CONFIG_MTD_OCELOT is not set
7535 @@ -214,7 +212,6 @@ CONFIG_MTD_MTX1=y
7537 # Disk-On-Chip Device Drivers
7539 -# CONFIG_MTD_DOC1000 is not set
7540 # CONFIG_MTD_DOC2000 is not set
7541 # CONFIG_MTD_DOC2001 is not set
7542 # CONFIG_MTD_DOCPROBE is not set
7543 @@ -371,11 +368,6 @@ CONFIG_VLAN_8021Q=m
7545 # CONFIG_IPX is not set
7546 # CONFIG_ATALK is not set
7549 -# Appletalk devices
7551 -# CONFIG_DEV_APPLETALK is not set
7552 # CONFIG_DECNET is not set
7554 # CONFIG_X25 is not set
7555 @@ -479,9 +471,11 @@ CONFIG_SR_EXTRA_DEVS=2
7556 # CONFIG_SCSI_MEGARAID is not set
7557 # CONFIG_SCSI_MEGARAID2 is not set
7558 # CONFIG_SCSI_SATA is not set
7559 +# CONFIG_SCSI_SATA_AHCI is not set
7560 # CONFIG_SCSI_SATA_SVW is not set
7561 # CONFIG_SCSI_ATA_PIIX is not set
7562 # CONFIG_SCSI_SATA_NV is not set
7563 +# CONFIG_SCSI_SATA_QSTOR is not set
7564 # CONFIG_SCSI_SATA_PROMISE is not set
7565 # CONFIG_SCSI_SATA_SX4 is not set
7566 # CONFIG_SCSI_SATA_SIL is not set
7567 @@ -700,7 +694,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
7568 # CONFIG_AU1X00_USB_TTY is not set
7569 # CONFIG_AU1X00_USB_RAW is not set
7570 # CONFIG_TXX927_SERIAL is not set
7571 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7572 CONFIG_UNIX98_PTYS=y
7573 CONFIG_UNIX98_PTY_COUNT=256
7575 --- a/arch/mips/defconfig-nino
7576 +++ b/arch/mips/defconfig-nino
7577 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
7578 # CONFIG_MIPS_PB1000 is not set
7579 # CONFIG_MIPS_PB1100 is not set
7580 # CONFIG_MIPS_PB1500 is not set
7581 -# CONFIG_MIPS_HYDROGEN3 is not set
7582 # CONFIG_MIPS_PB1550 is not set
7583 +# CONFIG_MIPS_HYDROGEN3 is not set
7584 # CONFIG_MIPS_XXS1500 is not set
7585 # CONFIG_MIPS_MTX1 is not set
7586 # CONFIG_COGENT_CSB250 is not set
7587 @@ -226,11 +226,6 @@ CONFIG_INET=y
7589 # CONFIG_IPX is not set
7590 # CONFIG_ATALK is not set
7593 -# Appletalk devices
7595 -# CONFIG_DEV_APPLETALK is not set
7596 # CONFIG_DECNET is not set
7597 # CONFIG_BRIDGE is not set
7598 # CONFIG_X25 is not set
7599 @@ -339,7 +334,6 @@ CONFIG_SERIAL_TX3912_CONSOLE=y
7600 # CONFIG_SERIAL_TXX9 is not set
7601 # CONFIG_SERIAL_TXX9_CONSOLE is not set
7602 # CONFIG_TXX927_SERIAL is not set
7603 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7604 # CONFIG_UNIX98_PTYS is not set
7607 --- a/arch/mips/defconfig-ocelot
7608 +++ b/arch/mips/defconfig-ocelot
7609 @@ -28,8 +28,8 @@ CONFIG_EXPERIMENTAL=y
7610 # CONFIG_MIPS_PB1000 is not set
7611 # CONFIG_MIPS_PB1100 is not set
7612 # CONFIG_MIPS_PB1500 is not set
7613 -# CONFIG_MIPS_HYDROGEN3 is not set
7614 # CONFIG_MIPS_PB1550 is not set
7615 +# CONFIG_MIPS_HYDROGEN3 is not set
7616 # CONFIG_MIPS_XXS1500 is not set
7617 # CONFIG_MIPS_MTX1 is not set
7618 # CONFIG_COGENT_CSB250 is not set
7619 @@ -194,9 +194,7 @@ CONFIG_MTD_JEDEC=y
7620 # CONFIG_MTD_BOSPORUS is not set
7621 # CONFIG_MTD_XXS1500 is not set
7622 # CONFIG_MTD_MTX1 is not set
7623 -# CONFIG_MTD_DB1X00 is not set
7624 # CONFIG_MTD_PB1550 is not set
7625 -# CONFIG_MTD_HYDROGEN3 is not set
7626 # CONFIG_MTD_MIRAGE is not set
7627 # CONFIG_MTD_CSTM_MIPS_IXX is not set
7629 @@ -215,7 +213,6 @@ CONFIG_MTD_OCELOT=y
7631 # Disk-On-Chip Device Drivers
7633 -# CONFIG_MTD_DOC1000 is not set
7634 CONFIG_MTD_DOC2000=y
7635 # CONFIG_MTD_DOC2001 is not set
7636 CONFIG_MTD_DOCPROBE=y
7637 @@ -307,11 +304,6 @@ CONFIG_IP_PNP_BOOTP=y
7639 # CONFIG_IPX is not set
7640 # CONFIG_ATALK is not set
7643 -# Appletalk devices
7645 -# CONFIG_DEV_APPLETALK is not set
7646 # CONFIG_DECNET is not set
7647 # CONFIG_BRIDGE is not set
7648 # CONFIG_X25 is not set
7649 @@ -513,7 +505,6 @@ CONFIG_SERIAL=y
7650 CONFIG_SERIAL_CONSOLE=y
7651 # CONFIG_SERIAL_EXTENDED is not set
7652 # CONFIG_SERIAL_NONSTANDARD is not set
7653 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7654 CONFIG_UNIX98_PTYS=y
7655 CONFIG_UNIX98_PTY_COUNT=256
7657 --- a/arch/mips/defconfig-osprey
7658 +++ b/arch/mips/defconfig-osprey
7659 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
7660 # CONFIG_MIPS_PB1000 is not set
7661 # CONFIG_MIPS_PB1100 is not set
7662 # CONFIG_MIPS_PB1500 is not set
7663 -# CONFIG_MIPS_HYDROGEN3 is not set
7664 # CONFIG_MIPS_PB1550 is not set
7665 +# CONFIG_MIPS_HYDROGEN3 is not set
7666 # CONFIG_MIPS_XXS1500 is not set
7667 # CONFIG_MIPS_MTX1 is not set
7668 # CONFIG_COGENT_CSB250 is not set
7669 @@ -227,11 +227,6 @@ CONFIG_IP_PNP_BOOTP=y
7671 # CONFIG_IPX is not set
7672 # CONFIG_ATALK is not set
7675 -# Appletalk devices
7677 -# CONFIG_DEV_APPLETALK is not set
7678 # CONFIG_DECNET is not set
7679 # CONFIG_BRIDGE is not set
7680 # CONFIG_X25 is not set
7681 @@ -388,7 +383,6 @@ CONFIG_SERIAL_MANY_PORTS=y
7682 # CONFIG_SERIAL_MULTIPORT is not set
7683 # CONFIG_HUB6 is not set
7684 # CONFIG_SERIAL_NONSTANDARD is not set
7685 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7686 # CONFIG_VR41XX_KIU is not set
7687 CONFIG_UNIX98_PTYS=y
7688 CONFIG_UNIX98_PTY_COUNT=256
7689 --- a/arch/mips/defconfig-pb1000
7690 +++ b/arch/mips/defconfig-pb1000
7691 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
7692 CONFIG_MIPS_PB1000=y
7693 # CONFIG_MIPS_PB1100 is not set
7694 # CONFIG_MIPS_PB1500 is not set
7695 -# CONFIG_MIPS_HYDROGEN3 is not set
7696 # CONFIG_MIPS_PB1550 is not set
7697 +# CONFIG_MIPS_HYDROGEN3 is not set
7698 # CONFIG_MIPS_XXS1500 is not set
7699 # CONFIG_MIPS_MTX1 is not set
7700 # CONFIG_COGENT_CSB250 is not set
7701 @@ -215,9 +215,7 @@ CONFIG_MTD_PB1000=y
7702 # CONFIG_MTD_BOSPORUS is not set
7703 # CONFIG_MTD_XXS1500 is not set
7704 # CONFIG_MTD_MTX1 is not set
7705 -# CONFIG_MTD_DB1X00 is not set
7706 # CONFIG_MTD_PB1550 is not set
7707 -# CONFIG_MTD_HYDROGEN3 is not set
7708 # CONFIG_MTD_MIRAGE is not set
7709 # CONFIG_MTD_CSTM_MIPS_IXX is not set
7710 # CONFIG_MTD_OCELOT is not set
7711 @@ -236,7 +234,6 @@ CONFIG_MTD_PB1000=y
7713 # Disk-On-Chip Device Drivers
7715 -# CONFIG_MTD_DOC1000 is not set
7716 # CONFIG_MTD_DOC2000 is not set
7717 # CONFIG_MTD_DOC2001 is not set
7718 # CONFIG_MTD_DOCPROBE is not set
7719 @@ -324,11 +321,6 @@ CONFIG_IP_PNP_BOOTP=y
7721 # CONFIG_IPX is not set
7722 # CONFIG_ATALK is not set
7725 -# Appletalk devices
7727 -# CONFIG_DEV_APPLETALK is not set
7728 # CONFIG_DECNET is not set
7729 # CONFIG_BRIDGE is not set
7730 # CONFIG_X25 is not set
7731 @@ -622,7 +614,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
7732 # CONFIG_AU1X00_USB_TTY is not set
7733 # CONFIG_AU1X00_USB_RAW is not set
7734 # CONFIG_TXX927_SERIAL is not set
7735 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7736 CONFIG_UNIX98_PTYS=y
7737 CONFIG_UNIX98_PTY_COUNT=256
7739 @@ -707,7 +698,7 @@ CONFIG_UNIX98_PTY_COUNT=256
7741 # CONFIG_PCMCIA_SERIAL_CS is not set
7742 # CONFIG_SYNCLINK_CS is not set
7743 -CONFIG_AU1X00_GPIO=m
7744 +CONFIG_AU1X00_GPIO=y
7745 # CONFIG_TS_AU1X00_ADS7846 is not set
7748 --- a/arch/mips/defconfig-pb1100
7749 +++ b/arch/mips/defconfig-pb1100
7750 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
7751 # CONFIG_MIPS_PB1000 is not set
7752 CONFIG_MIPS_PB1100=y
7753 # CONFIG_MIPS_PB1500 is not set
7754 -# CONFIG_MIPS_HYDROGEN3 is not set
7755 # CONFIG_MIPS_PB1550 is not set
7756 +# CONFIG_MIPS_HYDROGEN3 is not set
7757 # CONFIG_MIPS_XXS1500 is not set
7758 # CONFIG_MIPS_MTX1 is not set
7759 # CONFIG_COGENT_CSB250 is not set
7760 @@ -198,9 +198,7 @@ CONFIG_MTD_PB1100=y
7761 # CONFIG_MTD_MTX1 is not set
7762 CONFIG_MTD_PB1500_BOOT=y
7763 CONFIG_MTD_PB1500_USER=y
7764 -# CONFIG_MTD_DB1X00 is not set
7765 # CONFIG_MTD_PB1550 is not set
7766 -# CONFIG_MTD_HYDROGEN3 is not set
7767 # CONFIG_MTD_MIRAGE is not set
7768 # CONFIG_MTD_CSTM_MIPS_IXX is not set
7769 # CONFIG_MTD_OCELOT is not set
7770 @@ -219,7 +217,6 @@ CONFIG_MTD_PB1500_USER=y
7772 # Disk-On-Chip Device Drivers
7774 -# CONFIG_MTD_DOC1000 is not set
7775 # CONFIG_MTD_DOC2000 is not set
7776 # CONFIG_MTD_DOC2001 is not set
7777 # CONFIG_MTD_DOCPROBE is not set
7778 @@ -324,11 +321,6 @@ CONFIG_IP_PNP_BOOTP=y
7780 # CONFIG_IPX is not set
7781 # CONFIG_ATALK is not set
7784 -# Appletalk devices
7786 -# CONFIG_DEV_APPLETALK is not set
7787 # CONFIG_DECNET is not set
7788 # CONFIG_BRIDGE is not set
7789 # CONFIG_X25 is not set
7790 @@ -613,7 +605,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
7791 # CONFIG_AU1X00_USB_TTY is not set
7792 # CONFIG_AU1X00_USB_RAW is not set
7793 # CONFIG_TXX927_SERIAL is not set
7794 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
7795 CONFIG_UNIX98_PTYS=y
7796 CONFIG_UNIX98_PTY_COUNT=256
7798 @@ -859,6 +850,7 @@ CONFIG_DUMMY_CONSOLE=y
7799 # CONFIG_FB_PM2 is not set
7800 # CONFIG_FB_PM3 is not set
7801 # CONFIG_FB_CYBER2000 is not set
7803 # CONFIG_FB_MATROX is not set
7804 # CONFIG_FB_ATY is not set
7805 # CONFIG_FB_RADEON is not set
7806 @@ -870,7 +862,6 @@ CONFIG_DUMMY_CONSOLE=y
7807 # CONFIG_FB_VOODOO1 is not set
7808 # CONFIG_FB_TRIDENT is not set
7809 # CONFIG_FB_E1356 is not set
7811 # CONFIG_FB_IT8181 is not set
7812 # CONFIG_FB_VIRTUAL is not set
7813 CONFIG_FBCON_ADVANCED=y
7815 +++ b/arch/mips/defconfig-pb1200
7818 +# Automatically generated make config: don't edit
7822 +# CONFIG_MIPS64 is not set
7825 +# Code maturity level options
7827 +CONFIG_EXPERIMENTAL=y
7830 +# Loadable module support
7833 +# CONFIG_MODVERSIONS is not set
7837 +# Machine selection
7839 +# CONFIG_ACER_PICA_61 is not set
7840 +# CONFIG_MIPS_BOSPORUS is not set
7841 +# CONFIG_MIPS_MIRAGE is not set
7842 +# CONFIG_MIPS_DB1000 is not set
7843 +# CONFIG_MIPS_DB1100 is not set
7844 +# CONFIG_MIPS_DB1500 is not set
7845 +# CONFIG_MIPS_DB1550 is not set
7846 +# CONFIG_MIPS_PB1000 is not set
7847 +# CONFIG_MIPS_PB1100 is not set
7848 +# CONFIG_MIPS_PB1500 is not set
7849 +# CONFIG_MIPS_PB1550 is not set
7850 +# CONFIG_MIPS_HYDROGEN3 is not set
7851 +# CONFIG_MIPS_XXS1500 is not set
7852 +# CONFIG_MIPS_MTX1 is not set
7853 +# CONFIG_COGENT_CSB250 is not set
7854 +# CONFIG_BAGET_MIPS is not set
7855 +# CONFIG_CASIO_E55 is not set
7856 +# CONFIG_MIPS_COBALT is not set
7857 +# CONFIG_DECSTATION is not set
7858 +# CONFIG_MIPS_EV64120 is not set
7859 +# CONFIG_MIPS_EV96100 is not set
7860 +# CONFIG_MIPS_IVR is not set
7861 +# CONFIG_HP_LASERJET is not set
7862 +# CONFIG_IBM_WORKPAD is not set
7863 +# CONFIG_LASAT is not set
7864 +# CONFIG_MIPS_ITE8172 is not set
7865 +# CONFIG_MIPS_ATLAS is not set
7866 +# CONFIG_MIPS_MAGNUM_4000 is not set
7867 +# CONFIG_MIPS_MALTA is not set
7868 +# CONFIG_MIPS_SEAD is not set
7869 +# CONFIG_MOMENCO_OCELOT is not set
7870 +# CONFIG_MOMENCO_OCELOT_G is not set
7871 +# CONFIG_MOMENCO_OCELOT_C is not set
7872 +# CONFIG_MOMENCO_JAGUAR_ATX is not set
7873 +# CONFIG_PMC_BIG_SUR is not set
7874 +# CONFIG_PMC_STRETCH is not set
7875 +# CONFIG_PMC_YOSEMITE is not set
7876 +# CONFIG_DDB5074 is not set
7877 +# CONFIG_DDB5476 is not set
7878 +# CONFIG_DDB5477 is not set
7879 +# CONFIG_NEC_OSPREY is not set
7880 +# CONFIG_NEC_EAGLE is not set
7881 +# CONFIG_OLIVETTI_M700 is not set
7882 +# CONFIG_NINO is not set
7883 +# CONFIG_SGI_IP22 is not set
7884 +# CONFIG_SGI_IP27 is not set
7885 +# CONFIG_SIBYTE_SB1xxx_SOC is not set
7886 +# CONFIG_SNI_RM200_PCI is not set
7887 +# CONFIG_TANBAC_TB0226 is not set
7888 +# CONFIG_TANBAC_TB0229 is not set
7889 +# CONFIG_TOSHIBA_JMR3927 is not set
7890 +# CONFIG_TOSHIBA_RBTX4927 is not set
7891 +# CONFIG_VICTOR_MPC30X is not set
7892 +# CONFIG_ZAO_CAPCELLA is not set
7893 +# CONFIG_HIGHMEM is not set
7894 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
7895 +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
7896 +CONFIG_SOC_AU1X00=y
7897 +CONFIG_SOC_AU1200=y
7898 +CONFIG_NONCOHERENT_IO=y
7900 +# CONFIG_MIPS_AU1000 is not set
7905 +CONFIG_CPU_MIPS32=y
7906 +# CONFIG_CPU_MIPS64 is not set
7907 +# CONFIG_CPU_R3000 is not set
7908 +# CONFIG_CPU_TX39XX is not set
7909 +# CONFIG_CPU_VR41XX is not set
7910 +# CONFIG_CPU_R4300 is not set
7911 +# CONFIG_CPU_R4X00 is not set
7912 +# CONFIG_CPU_TX49XX is not set
7913 +# CONFIG_CPU_R5000 is not set
7914 +# CONFIG_CPU_R5432 is not set
7915 +# CONFIG_CPU_R6000 is not set
7916 +# CONFIG_CPU_NEVADA is not set
7917 +# CONFIG_CPU_R8000 is not set
7918 +# CONFIG_CPU_R10000 is not set
7919 +# CONFIG_CPU_RM7000 is not set
7920 +# CONFIG_CPU_RM9000 is not set
7921 +# CONFIG_CPU_SB1 is not set
7922 +CONFIG_PAGE_SIZE_4KB=y
7923 +# CONFIG_PAGE_SIZE_16KB is not set
7924 +# CONFIG_PAGE_SIZE_64KB is not set
7925 +CONFIG_CPU_HAS_PREFETCH=y
7926 +# CONFIG_VTAG_ICACHE is not set
7927 +CONFIG_64BIT_PHYS_ADDR=y
7928 +# CONFIG_CPU_ADVANCED is not set
7929 +CONFIG_CPU_HAS_LLSC=y
7930 +# CONFIG_CPU_HAS_LLDSCD is not set
7931 +# CONFIG_CPU_HAS_WB is not set
7932 +CONFIG_CPU_HAS_SYNC=y
7937 +CONFIG_CPU_LITTLE_ENDIAN=y
7938 +# CONFIG_BUILD_ELF64 is not set
7943 +# CONFIG_PCI_NAMES is not set
7944 +# CONFIG_ISA is not set
7945 +# CONFIG_TC is not set
7946 +# CONFIG_MCA is not set
7947 +# CONFIG_SBUS is not set
7951 +# PCMCIA/CardBus support
7954 +# CONFIG_CARDBUS is not set
7955 +# CONFIG_TCIC is not set
7956 +# CONFIG_I82092 is not set
7957 +# CONFIG_I82365 is not set
7958 +CONFIG_PCMCIA_AU1X00=m
7961 +# PCI Hotplug Support
7963 +# CONFIG_HOTPLUG_PCI is not set
7964 +# CONFIG_HOTPLUG_PCI_COMPAQ is not set
7965 +# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
7966 +# CONFIG_HOTPLUG_PCI_SHPC is not set
7967 +# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
7968 +# CONFIG_HOTPLUG_PCI_PCIE is not set
7969 +# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
7971 +# CONFIG_BSD_PROCESS_ACCT is not set
7974 +# CONFIG_KCORE_AOUT is not set
7975 +# CONFIG_BINFMT_AOUT is not set
7976 +CONFIG_BINFMT_ELF=y
7977 +# CONFIG_MIPS32_COMPAT is not set
7978 +# CONFIG_MIPS32_O32 is not set
7979 +# CONFIG_MIPS32_N32 is not set
7980 +# CONFIG_BINFMT_ELF32 is not set
7981 +# CONFIG_BINFMT_MISC is not set
7982 +# CONFIG_OOM_KILLER is not set
7983 +CONFIG_CMDLINE_BOOL=y
7984 +CONFIG_CMDLINE="mem=96M"
7985 +# CONFIG_PM is not set
7988 +# Memory Technology Devices (MTD)
7990 +# CONFIG_MTD is not set
7993 +# Parallel port support
7995 +# CONFIG_PARPORT is not set
7998 +# Plug and Play configuration
8000 +# CONFIG_PNP is not set
8001 +# CONFIG_ISAPNP is not set
8006 +# CONFIG_BLK_DEV_FD is not set
8007 +# CONFIG_BLK_DEV_XD is not set
8008 +# CONFIG_PARIDE is not set
8009 +# CONFIG_BLK_CPQ_DA is not set
8010 +# CONFIG_BLK_CPQ_CISS_DA is not set
8011 +# CONFIG_CISS_SCSI_TAPE is not set
8012 +# CONFIG_CISS_MONITOR_THREAD is not set
8013 +# CONFIG_BLK_DEV_DAC960 is not set
8014 +# CONFIG_BLK_DEV_UMEM is not set
8015 +# CONFIG_BLK_DEV_SX8 is not set
8016 +CONFIG_BLK_DEV_LOOP=y
8017 +# CONFIG_BLK_DEV_NBD is not set
8018 +# CONFIG_BLK_DEV_RAM is not set
8019 +# CONFIG_BLK_DEV_INITRD is not set
8020 +# CONFIG_BLK_STATS is not set
8023 +# Multi-device support (RAID and LVM)
8025 +# CONFIG_MD is not set
8026 +# CONFIG_BLK_DEV_MD is not set
8027 +# CONFIG_MD_LINEAR is not set
8028 +# CONFIG_MD_RAID0 is not set
8029 +# CONFIG_MD_RAID1 is not set
8030 +# CONFIG_MD_RAID5 is not set
8031 +# CONFIG_MD_MULTIPATH is not set
8032 +# CONFIG_BLK_DEV_LVM is not set
8035 +# Networking options
8038 +# CONFIG_PACKET_MMAP is not set
8039 +# CONFIG_NETLINK_DEV is not set
8041 +# CONFIG_NETFILTER_DEBUG is not set
8045 +CONFIG_IP_MULTICAST=y
8046 +# CONFIG_IP_ADVANCED_ROUTER is not set
8048 +# CONFIG_IP_PNP_DHCP is not set
8049 +CONFIG_IP_PNP_BOOTP=y
8050 +# CONFIG_IP_PNP_RARP is not set
8051 +# CONFIG_NET_IPIP is not set
8052 +# CONFIG_NET_IPGRE is not set
8053 +# CONFIG_IP_MROUTE is not set
8054 +# CONFIG_ARPD is not set
8055 +# CONFIG_INET_ECN is not set
8056 +# CONFIG_SYN_COOKIES is not set
8059 +# IP: Netfilter Configuration
8061 +# CONFIG_IP_NF_CONNTRACK is not set
8062 +# CONFIG_IP_NF_QUEUE is not set
8063 +# CONFIG_IP_NF_IPTABLES is not set
8064 +# CONFIG_IP_NF_ARPTABLES is not set
8065 +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
8066 +# CONFIG_IP_NF_COMPAT_IPFWADM is not set
8069 +# IP: Virtual Server Configuration
8071 +# CONFIG_IP_VS is not set
8072 +# CONFIG_IPV6 is not set
8073 +# CONFIG_KHTTPD is not set
8076 +# SCTP Configuration (EXPERIMENTAL)
8078 +# CONFIG_IP_SCTP is not set
8079 +# CONFIG_ATM is not set
8080 +# CONFIG_VLAN_8021Q is not set
8085 +# CONFIG_IPX is not set
8086 +# CONFIG_ATALK is not set
8087 +# CONFIG_DECNET is not set
8088 +# CONFIG_BRIDGE is not set
8089 +# CONFIG_X25 is not set
8090 +# CONFIG_LAPB is not set
8091 +# CONFIG_LLC is not set
8092 +# CONFIG_NET_DIVERT is not set
8093 +# CONFIG_ECONET is not set
8094 +# CONFIG_WAN_ROUTER is not set
8095 +# CONFIG_NET_FASTROUTE is not set
8096 +# CONFIG_NET_HW_FLOWCONTROL is not set
8099 +# QoS and/or fair queueing
8101 +# CONFIG_NET_SCHED is not set
8106 +# CONFIG_NET_PKTGEN is not set
8109 +# Telephony Support
8111 +# CONFIG_PHONE is not set
8112 +# CONFIG_PHONE_IXJ is not set
8113 +# CONFIG_PHONE_IXJ_PCMCIA is not set
8116 +# ATA/IDE/MFM/RLL support
8121 +# IDE, ATA and ATAPI Block devices
8123 +CONFIG_BLK_DEV_IDE=y
8126 +# Please see Documentation/ide.txt for help/info on IDE drives
8128 +# CONFIG_BLK_DEV_HD_IDE is not set
8129 +# CONFIG_BLK_DEV_HD is not set
8130 +# CONFIG_BLK_DEV_IDE_SATA is not set
8131 +CONFIG_BLK_DEV_IDEDISK=y
8132 +CONFIG_IDEDISK_MULTI_MODE=y
8133 +CONFIG_IDEDISK_STROKE=y
8134 +CONFIG_BLK_DEV_IDECS=m
8135 +# CONFIG_BLK_DEV_DELKIN is not set
8136 +# CONFIG_BLK_DEV_IDECD is not set
8137 +# CONFIG_BLK_DEV_IDETAPE is not set
8138 +# CONFIG_BLK_DEV_IDEFLOPPY is not set
8139 +# CONFIG_BLK_DEV_IDESCSI is not set
8140 +# CONFIG_IDE_TASK_IOCTL is not set
8143 +# IDE chipset support/bugfixes
8145 +# CONFIG_BLK_DEV_CMD640 is not set
8146 +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
8147 +# CONFIG_BLK_DEV_ISAPNP is not set
8148 +# CONFIG_BLK_DEV_IDEPCI is not set
8149 +# CONFIG_IDE_CHIPSETS is not set
8150 +# CONFIG_IDEDMA_AUTO is not set
8151 +# CONFIG_DMA_NONPCI is not set
8152 +# CONFIG_BLK_DEV_ATARAID is not set
8153 +# CONFIG_BLK_DEV_ATARAID_PDC is not set
8154 +# CONFIG_BLK_DEV_ATARAID_HPT is not set
8155 +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
8156 +# CONFIG_BLK_DEV_ATARAID_SII is not set
8164 +# SCSI support type (disk, tape, CD-ROM)
8166 +CONFIG_BLK_DEV_SD=y
8167 +CONFIG_SD_EXTRA_DEVS=40
8168 +CONFIG_CHR_DEV_ST=y
8169 +# CONFIG_CHR_DEV_OSST is not set
8170 +CONFIG_BLK_DEV_SR=y
8171 +# CONFIG_BLK_DEV_SR_VENDOR is not set
8172 +CONFIG_SR_EXTRA_DEVS=2
8173 +# CONFIG_CHR_DEV_SG is not set
8176 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
8178 +# CONFIG_SCSI_DEBUG_QUEUES is not set
8179 +# CONFIG_SCSI_MULTI_LUN is not set
8180 +CONFIG_SCSI_CONSTANTS=y
8181 +# CONFIG_SCSI_LOGGING is not set
8184 +# SCSI low-level drivers
8186 +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
8187 +# CONFIG_SCSI_7000FASST is not set
8188 +# CONFIG_SCSI_ACARD is not set
8189 +# CONFIG_SCSI_AHA152X is not set
8190 +# CONFIG_SCSI_AHA1542 is not set
8191 +# CONFIG_SCSI_AHA1740 is not set
8192 +# CONFIG_SCSI_AACRAID is not set
8193 +# CONFIG_SCSI_AIC7XXX is not set
8194 +# CONFIG_SCSI_AIC79XX is not set
8195 +# CONFIG_SCSI_AIC7XXX_OLD is not set
8196 +# CONFIG_SCSI_DPT_I2O is not set
8197 +# CONFIG_SCSI_ADVANSYS is not set
8198 +# CONFIG_SCSI_IN2000 is not set
8199 +# CONFIG_SCSI_AM53C974 is not set
8200 +# CONFIG_SCSI_MEGARAID is not set
8201 +# CONFIG_SCSI_MEGARAID2 is not set
8202 +# CONFIG_SCSI_SATA is not set
8203 +# CONFIG_SCSI_SATA_AHCI is not set
8204 +# CONFIG_SCSI_SATA_SVW is not set
8205 +# CONFIG_SCSI_ATA_PIIX is not set
8206 +# CONFIG_SCSI_SATA_NV is not set
8207 +# CONFIG_SCSI_SATA_QSTOR is not set
8208 +# CONFIG_SCSI_SATA_PROMISE is not set
8209 +# CONFIG_SCSI_SATA_SX4 is not set
8210 +# CONFIG_SCSI_SATA_SIL is not set
8211 +# CONFIG_SCSI_SATA_SIS is not set
8212 +# CONFIG_SCSI_SATA_ULI is not set
8213 +# CONFIG_SCSI_SATA_VIA is not set
8214 +# CONFIG_SCSI_SATA_VITESSE is not set
8215 +# CONFIG_SCSI_BUSLOGIC is not set
8216 +# CONFIG_SCSI_CPQFCTS is not set
8217 +# CONFIG_SCSI_DMX3191D is not set
8218 +# CONFIG_SCSI_DTC3280 is not set
8219 +# CONFIG_SCSI_EATA is not set
8220 +# CONFIG_SCSI_EATA_DMA is not set
8221 +# CONFIG_SCSI_EATA_PIO is not set
8222 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
8223 +# CONFIG_SCSI_GDTH is not set
8224 +# CONFIG_SCSI_GENERIC_NCR5380 is not set
8225 +# CONFIG_SCSI_INITIO is not set
8226 +# CONFIG_SCSI_INIA100 is not set
8227 +# CONFIG_SCSI_NCR53C406A is not set
8228 +# CONFIG_SCSI_NCR53C7xx is not set
8229 +# CONFIG_SCSI_SYM53C8XX_2 is not set
8230 +# CONFIG_SCSI_NCR53C8XX is not set
8231 +# CONFIG_SCSI_SYM53C8XX is not set
8232 +# CONFIG_SCSI_PAS16 is not set
8233 +# CONFIG_SCSI_PCI2000 is not set
8234 +# CONFIG_SCSI_PCI2220I is not set
8235 +# CONFIG_SCSI_PSI240I is not set
8236 +# CONFIG_SCSI_QLOGIC_FAS is not set
8237 +# CONFIG_SCSI_QLOGIC_ISP is not set
8238 +# CONFIG_SCSI_QLOGIC_FC is not set
8239 +# CONFIG_SCSI_QLOGIC_1280 is not set
8240 +# CONFIG_SCSI_SIM710 is not set
8241 +# CONFIG_SCSI_SYM53C416 is not set
8242 +# CONFIG_SCSI_DC390T is not set
8243 +# CONFIG_SCSI_T128 is not set
8244 +# CONFIG_SCSI_U14_34F is not set
8245 +# CONFIG_SCSI_NSP32 is not set
8246 +# CONFIG_SCSI_DEBUG is not set
8249 +# PCMCIA SCSI adapter support
8251 +# CONFIG_SCSI_PCMCIA is not set
8254 +# Fusion MPT device support
8256 +# CONFIG_FUSION is not set
8257 +# CONFIG_FUSION_BOOT is not set
8258 +# CONFIG_FUSION_ISENSE is not set
8259 +# CONFIG_FUSION_CTL is not set
8260 +# CONFIG_FUSION_LAN is not set
8263 +# IEEE 1394 (FireWire) support (EXPERIMENTAL)
8265 +# CONFIG_IEEE1394 is not set
8268 +# I2O device support
8270 +# CONFIG_I2O is not set
8271 +# CONFIG_I2O_PCI is not set
8272 +# CONFIG_I2O_BLOCK is not set
8273 +# CONFIG_I2O_LAN is not set
8274 +# CONFIG_I2O_SCSI is not set
8275 +# CONFIG_I2O_PROC is not set
8278 +# Network device support
8280 +CONFIG_NETDEVICES=y
8285 +# CONFIG_ARCNET is not set
8286 +# CONFIG_DUMMY is not set
8287 +# CONFIG_BONDING is not set
8288 +# CONFIG_EQUALIZER is not set
8289 +# CONFIG_TUN is not set
8290 +# CONFIG_ETHERTAP is not set
8293 +# Ethernet (10 or 100Mbit)
8295 +CONFIG_NET_ETHERNET=y
8296 +# CONFIG_MIPS_AU1X00_ENET is not set
8297 +# CONFIG_SUNLANCE is not set
8298 +# CONFIG_HAPPYMEAL is not set
8299 +# CONFIG_SUNBMAC is not set
8300 +# CONFIG_SUNQE is not set
8301 +# CONFIG_SUNGEM is not set
8302 +# CONFIG_NET_VENDOR_3COM is not set
8303 +# CONFIG_LANCE is not set
8304 +# CONFIG_NET_VENDOR_SMC is not set
8305 +# CONFIG_NET_VENDOR_RACAL is not set
8306 +# CONFIG_HP100 is not set
8307 +# CONFIG_NET_ISA is not set
8308 +# CONFIG_NET_PCI is not set
8309 +# CONFIG_NET_POCKET is not set
8312 +# Ethernet (1000 Mbit)
8314 +# CONFIG_ACENIC is not set
8315 +# CONFIG_DL2K is not set
8316 +# CONFIG_E1000 is not set
8317 +# CONFIG_MYRI_SBUS is not set
8318 +# CONFIG_NS83820 is not set
8319 +# CONFIG_HAMACHI is not set
8320 +# CONFIG_YELLOWFIN is not set
8321 +# CONFIG_R8169 is not set
8322 +# CONFIG_SK98LIN is not set
8323 +# CONFIG_TIGON3 is not set
8324 +# CONFIG_FDDI is not set
8325 +# CONFIG_HIPPI is not set
8326 +# CONFIG_PLIP is not set
8328 +CONFIG_PPP_MULTILINK=y
8329 +# CONFIG_PPP_FILTER is not set
8331 +# CONFIG_PPP_SYNC_TTY is not set
8332 +CONFIG_PPP_DEFLATE=m
8333 +# CONFIG_PPP_BSDCOMP is not set
8335 +# CONFIG_SLIP is not set
8338 +# Wireless LAN (non-hamradio)
8340 +# CONFIG_NET_RADIO is not set
8343 +# Token Ring devices
8345 +# CONFIG_TR is not set
8346 +# CONFIG_NET_FC is not set
8347 +# CONFIG_RCPCI is not set
8348 +# CONFIG_SHAPER is not set
8353 +# CONFIG_WAN is not set
8356 +# PCMCIA network device support
8358 +# CONFIG_NET_PCMCIA is not set
8361 +# Amateur Radio support
8363 +# CONFIG_HAMRADIO is not set
8366 +# IrDA (infrared) support
8368 +# CONFIG_IRDA is not set
8373 +# CONFIG_ISDN is not set
8376 +# Input core support
8379 +CONFIG_INPUT_KEYBDEV=y
8380 +CONFIG_INPUT_MOUSEDEV=y
8381 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
8382 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
8383 +# CONFIG_INPUT_JOYDEV is not set
8384 +CONFIG_INPUT_EVDEV=y
8385 +# CONFIG_INPUT_UINPUT is not set
8388 +# Character devices
8391 +# CONFIG_VT_CONSOLE is not set
8392 +# CONFIG_SERIAL is not set
8393 +# CONFIG_SERIAL_EXTENDED is not set
8394 +CONFIG_SERIAL_NONSTANDARD=y
8395 +# CONFIG_COMPUTONE is not set
8396 +# CONFIG_ROCKETPORT is not set
8397 +# CONFIG_CYCLADES is not set
8398 +# CONFIG_DIGIEPCA is not set
8399 +# CONFIG_DIGI is not set
8400 +# CONFIG_ESPSERIAL is not set
8401 +# CONFIG_MOXA_INTELLIO is not set
8402 +# CONFIG_MOXA_SMARTIO is not set
8403 +# CONFIG_ISI is not set
8404 +# CONFIG_SYNCLINK is not set
8405 +# CONFIG_SYNCLINKMP is not set
8406 +# CONFIG_N_HDLC is not set
8407 +# CONFIG_RISCOM8 is not set
8408 +# CONFIG_SPECIALIX is not set
8409 +# CONFIG_SX is not set
8410 +# CONFIG_RIO is not set
8411 +# CONFIG_STALDRV is not set
8412 +# CONFIG_SERIAL_TX3912 is not set
8413 +# CONFIG_SERIAL_TX3912_CONSOLE is not set
8414 +# CONFIG_SERIAL_TXX9 is not set
8415 +# CONFIG_SERIAL_TXX9_CONSOLE is not set
8416 +CONFIG_AU1X00_UART=y
8417 +CONFIG_AU1X00_SERIAL_CONSOLE=y
8418 +# CONFIG_AU1X00_USB_TTY is not set
8419 +# CONFIG_AU1X00_USB_RAW is not set
8420 +# CONFIG_TXX927_SERIAL is not set
8421 +CONFIG_UNIX98_PTYS=y
8422 +CONFIG_UNIX98_PTY_COUNT=256
8428 +# CONFIG_I2C_ALGOBIT is not set
8429 +# CONFIG_SCx200_ACB is not set
8430 +# CONFIG_I2C_ALGOPCF is not set
8431 +# CONFIG_I2C_CHARDEV is not set
8437 +# CONFIG_BUSMOUSE is not set
8438 +# CONFIG_MOUSE is not set
8443 +# CONFIG_INPUT_GAMEPORT is not set
8444 +# CONFIG_INPUT_NS558 is not set
8445 +# CONFIG_INPUT_LIGHTNING is not set
8446 +# CONFIG_INPUT_PCIGAME is not set
8447 +# CONFIG_INPUT_CS461X is not set
8448 +# CONFIG_INPUT_EMU10K1 is not set
8449 +# CONFIG_INPUT_SERIO is not set
8450 +# CONFIG_INPUT_SERPORT is not set
8455 +# CONFIG_INPUT_ANALOG is not set
8456 +# CONFIG_INPUT_A3D is not set
8457 +# CONFIG_INPUT_ADI is not set
8458 +# CONFIG_INPUT_COBRA is not set
8459 +# CONFIG_INPUT_GF2K is not set
8460 +# CONFIG_INPUT_GRIP is not set
8461 +# CONFIG_INPUT_INTERACT is not set
8462 +# CONFIG_INPUT_TMDC is not set
8463 +# CONFIG_INPUT_SIDEWINDER is not set
8464 +# CONFIG_INPUT_IFORCE_USB is not set
8465 +# CONFIG_INPUT_IFORCE_232 is not set
8466 +# CONFIG_INPUT_WARRIOR is not set
8467 +# CONFIG_INPUT_MAGELLAN is not set
8468 +# CONFIG_INPUT_SPACEORB is not set
8469 +# CONFIG_INPUT_SPACEBALL is not set
8470 +# CONFIG_INPUT_STINGER is not set
8471 +# CONFIG_INPUT_DB9 is not set
8472 +# CONFIG_INPUT_GAMECON is not set
8473 +# CONFIG_INPUT_TURBOGRAFX is not set
8474 +# CONFIG_QIC02_TAPE is not set
8475 +# CONFIG_IPMI_HANDLER is not set
8476 +# CONFIG_IPMI_PANIC_EVENT is not set
8477 +# CONFIG_IPMI_DEVICE_INTERFACE is not set
8478 +# CONFIG_IPMI_KCS is not set
8479 +# CONFIG_IPMI_WATCHDOG is not set
8484 +# CONFIG_WATCHDOG is not set
8485 +# CONFIG_SCx200 is not set
8486 +# CONFIG_SCx200_GPIO is not set
8487 +# CONFIG_AMD_PM768 is not set
8488 +# CONFIG_NVRAM is not set
8489 +# CONFIG_RTC is not set
8490 +# CONFIG_DTLK is not set
8491 +# CONFIG_R3964 is not set
8492 +# CONFIG_APPLICOM is not set
8495 +# Ftape, the floppy tape device driver
8497 +# CONFIG_FTAPE is not set
8498 +# CONFIG_AGP is not set
8501 +# Direct Rendering Manager (XFree86 DRI support)
8503 +# CONFIG_DRM is not set
8506 +# PCMCIA character devices
8508 +# CONFIG_PCMCIA_SERIAL_CS is not set
8509 +# CONFIG_SYNCLINK_CS is not set
8510 +# CONFIG_AU1X00_GPIO is not set
8511 +# CONFIG_TS_AU1X00_ADS7846 is not set
8516 +# CONFIG_QUOTA is not set
8517 +# CONFIG_QFMT_V2 is not set
8519 +# CONFIG_AUTOFS4_FS is not set
8520 +# CONFIG_REISERFS_FS is not set
8521 +# CONFIG_REISERFS_CHECK is not set
8522 +# CONFIG_REISERFS_PROC_INFO is not set
8523 +# CONFIG_ADFS_FS is not set
8524 +# CONFIG_ADFS_FS_RW is not set
8525 +# CONFIG_AFFS_FS is not set
8526 +# CONFIG_HFS_FS is not set
8527 +# CONFIG_HFSPLUS_FS is not set
8528 +# CONFIG_BEFS_FS is not set
8529 +# CONFIG_BEFS_DEBUG is not set
8530 +# CONFIG_BFS_FS is not set
8533 +# CONFIG_JBD_DEBUG is not set
8536 +# CONFIG_UMSDOS_FS is not set
8538 +# CONFIG_EFS_FS is not set
8539 +# CONFIG_JFFS_FS is not set
8540 +# CONFIG_JFFS2_FS is not set
8541 +# CONFIG_CRAMFS is not set
8544 +# CONFIG_ISO9660_FS is not set
8545 +# CONFIG_JOLIET is not set
8546 +# CONFIG_ZISOFS is not set
8547 +# CONFIG_JFS_FS is not set
8548 +# CONFIG_JFS_DEBUG is not set
8549 +# CONFIG_JFS_STATISTICS is not set
8550 +# CONFIG_MINIX_FS is not set
8551 +# CONFIG_VXFS_FS is not set
8552 +# CONFIG_NTFS_FS is not set
8553 +# CONFIG_NTFS_RW is not set
8554 +# CONFIG_HPFS_FS is not set
8556 +# CONFIG_DEVFS_FS is not set
8557 +# CONFIG_DEVFS_MOUNT is not set
8558 +# CONFIG_DEVFS_DEBUG is not set
8560 +# CONFIG_QNX4FS_FS is not set
8561 +# CONFIG_QNX4FS_RW is not set
8562 +# CONFIG_ROMFS_FS is not set
8564 +# CONFIG_SYSV_FS is not set
8565 +# CONFIG_UDF_FS is not set
8566 +# CONFIG_UDF_RW is not set
8567 +# CONFIG_UFS_FS is not set
8568 +# CONFIG_UFS_FS_WRITE is not set
8569 +# CONFIG_XFS_FS is not set
8570 +# CONFIG_XFS_QUOTA is not set
8571 +# CONFIG_XFS_RT is not set
8572 +# CONFIG_XFS_TRACE is not set
8573 +# CONFIG_XFS_DEBUG is not set
8576 +# Network File Systems
8578 +# CONFIG_CODA_FS is not set
8579 +# CONFIG_INTERMEZZO_FS is not set
8582 +# CONFIG_NFS_DIRECTIO is not set
8584 +# CONFIG_NFSD is not set
8585 +# CONFIG_NFSD_V3 is not set
8586 +# CONFIG_NFSD_TCP is not set
8590 +# CONFIG_SMB_FS is not set
8591 +# CONFIG_NCP_FS is not set
8592 +# CONFIG_NCPFS_PACKET_SIGNING is not set
8593 +# CONFIG_NCPFS_IOCTL_LOCKING is not set
8594 +# CONFIG_NCPFS_STRONG is not set
8595 +# CONFIG_NCPFS_NFS_NS is not set
8596 +# CONFIG_NCPFS_OS2_NS is not set
8597 +# CONFIG_NCPFS_SMALLDOS is not set
8598 +# CONFIG_NCPFS_NLS is not set
8599 +# CONFIG_NCPFS_EXTRAS is not set
8600 +# CONFIG_ZISOFS_FS is not set
8605 +# CONFIG_PARTITION_ADVANCED is not set
8606 +CONFIG_MSDOS_PARTITION=y
8607 +# CONFIG_SMB_NLS is not set
8611 +# Native Language Support
8613 +CONFIG_NLS_DEFAULT="iso8859-1"
8614 +# CONFIG_NLS_CODEPAGE_437 is not set
8615 +# CONFIG_NLS_CODEPAGE_737 is not set
8616 +# CONFIG_NLS_CODEPAGE_775 is not set
8617 +# CONFIG_NLS_CODEPAGE_850 is not set
8618 +# CONFIG_NLS_CODEPAGE_852 is not set
8619 +# CONFIG_NLS_CODEPAGE_855 is not set
8620 +# CONFIG_NLS_CODEPAGE_857 is not set
8621 +# CONFIG_NLS_CODEPAGE_860 is not set
8622 +# CONFIG_NLS_CODEPAGE_861 is not set
8623 +# CONFIG_NLS_CODEPAGE_862 is not set
8624 +# CONFIG_NLS_CODEPAGE_863 is not set
8625 +# CONFIG_NLS_CODEPAGE_864 is not set
8626 +# CONFIG_NLS_CODEPAGE_865 is not set
8627 +# CONFIG_NLS_CODEPAGE_866 is not set
8628 +# CONFIG_NLS_CODEPAGE_869 is not set
8629 +# CONFIG_NLS_CODEPAGE_936 is not set
8630 +# CONFIG_NLS_CODEPAGE_950 is not set
8631 +# CONFIG_NLS_CODEPAGE_932 is not set
8632 +# CONFIG_NLS_CODEPAGE_949 is not set
8633 +# CONFIG_NLS_CODEPAGE_874 is not set
8634 +# CONFIG_NLS_ISO8859_8 is not set
8635 +# CONFIG_NLS_CODEPAGE_1250 is not set
8636 +# CONFIG_NLS_CODEPAGE_1251 is not set
8637 +# CONFIG_NLS_ISO8859_1 is not set
8638 +# CONFIG_NLS_ISO8859_2 is not set
8639 +# CONFIG_NLS_ISO8859_3 is not set
8640 +# CONFIG_NLS_ISO8859_4 is not set
8641 +# CONFIG_NLS_ISO8859_5 is not set
8642 +# CONFIG_NLS_ISO8859_6 is not set
8643 +# CONFIG_NLS_ISO8859_7 is not set
8644 +# CONFIG_NLS_ISO8859_9 is not set
8645 +# CONFIG_NLS_ISO8859_13 is not set
8646 +# CONFIG_NLS_ISO8859_14 is not set
8647 +# CONFIG_NLS_ISO8859_15 is not set
8648 +# CONFIG_NLS_KOI8_R is not set
8649 +# CONFIG_NLS_KOI8_U is not set
8650 +# CONFIG_NLS_UTF8 is not set
8653 +# Multimedia devices
8655 +# CONFIG_VIDEO_DEV is not set
8660 +# CONFIG_VGA_CONSOLE is not set
8661 +# CONFIG_MDA_CONSOLE is not set
8664 +# Frame-buffer support
8667 +CONFIG_DUMMY_CONSOLE=y
8668 +# CONFIG_FB_RIVA is not set
8669 +# CONFIG_FB_CLGEN is not set
8670 +# CONFIG_FB_PM2 is not set
8671 +# CONFIG_FB_PM3 is not set
8672 +# CONFIG_FB_CYBER2000 is not set
8673 +# CONFIG_FB_MATROX is not set
8674 +# CONFIG_FB_ATY is not set
8675 +# CONFIG_FB_RADEON is not set
8676 +# CONFIG_FB_ATY128 is not set
8677 +# CONFIG_FB_INTEL is not set
8678 +# CONFIG_FB_SIS is not set
8679 +# CONFIG_FB_NEOMAGIC is not set
8680 +# CONFIG_FB_3DFX is not set
8681 +# CONFIG_FB_VOODOO1 is not set
8682 +# CONFIG_FB_TRIDENT is not set
8683 +# CONFIG_FB_E1356 is not set
8684 +# CONFIG_FB_IT8181 is not set
8685 +# CONFIG_FB_VIRTUAL is not set
8686 +CONFIG_FBCON_ADVANCED=y
8687 +# CONFIG_FBCON_MFB is not set
8688 +# CONFIG_FBCON_CFB2 is not set
8689 +# CONFIG_FBCON_CFB4 is not set
8690 +# CONFIG_FBCON_CFB8 is not set
8691 +CONFIG_FBCON_CFB16=y
8692 +# CONFIG_FBCON_CFB24 is not set
8693 +CONFIG_FBCON_CFB32=y
8694 +# CONFIG_FBCON_AFB is not set
8695 +# CONFIG_FBCON_ILBM is not set
8696 +# CONFIG_FBCON_IPLAN2P2 is not set
8697 +# CONFIG_FBCON_IPLAN2P4 is not set
8698 +# CONFIG_FBCON_IPLAN2P8 is not set
8699 +# CONFIG_FBCON_MAC is not set
8700 +# CONFIG_FBCON_VGA_PLANES is not set
8701 +# CONFIG_FBCON_VGA is not set
8702 +# CONFIG_FBCON_HGA is not set
8703 +# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
8704 +CONFIG_FBCON_FONTS=y
8707 +# CONFIG_FONT_SUN8x16 is not set
8708 +# CONFIG_FONT_SUN12x22 is not set
8709 +# CONFIG_FONT_6x11 is not set
8710 +# CONFIG_FONT_PEARL_8x8 is not set
8711 +# CONFIG_FONT_ACORN_8x8 is not set
8717 +# CONFIG_SOUND_ALI5455 is not set
8718 +# CONFIG_SOUND_BT878 is not set
8719 +# CONFIG_SOUND_CMPCI is not set
8720 +# CONFIG_SOUND_EMU10K1 is not set
8721 +# CONFIG_MIDI_EMU10K1 is not set
8722 +# CONFIG_SOUND_FUSION is not set
8723 +# CONFIG_SOUND_CS4281 is not set
8724 +# CONFIG_SOUND_ES1370 is not set
8725 +# CONFIG_SOUND_ES1371 is not set
8726 +# CONFIG_SOUND_ESSSOLO1 is not set
8727 +# CONFIG_SOUND_MAESTRO is not set
8728 +# CONFIG_SOUND_MAESTRO3 is not set
8729 +# CONFIG_SOUND_FORTE is not set
8730 +# CONFIG_SOUND_ICH is not set
8731 +# CONFIG_SOUND_RME96XX is not set
8732 +# CONFIG_SOUND_SONICVIBES is not set
8733 +# CONFIG_SOUND_AU1X00 is not set
8734 +CONFIG_SOUND_AU1550_PSC=y
8735 +# CONFIG_SOUND_AU1550_I2S is not set
8736 +# CONFIG_SOUND_TRIDENT is not set
8737 +# CONFIG_SOUND_MSNDCLAS is not set
8738 +# CONFIG_SOUND_MSNDPIN is not set
8739 +# CONFIG_SOUND_VIA82CXXX is not set
8740 +# CONFIG_MIDI_VIA82CXXX is not set
8741 +# CONFIG_SOUND_OSS is not set
8742 +# CONFIG_SOUND_TVMIXER is not set
8743 +# CONFIG_SOUND_AD1980 is not set
8744 +# CONFIG_SOUND_WM97XX is not set
8750 +# CONFIG_USB_DEBUG is not set
8753 +# Miscellaneous USB options
8755 +CONFIG_USB_DEVICEFS=y
8756 +# CONFIG_USB_BANDWIDTH is not set
8759 +# USB Host Controller Drivers
8761 +# CONFIG_USB_EHCI_HCD is not set
8762 +# CONFIG_USB_UHCI is not set
8763 +# CONFIG_USB_UHCI_ALT is not set
8767 +# USB Device Class drivers
8769 +# CONFIG_USB_AUDIO is not set
8770 +# CONFIG_USB_EMI26 is not set
8771 +# CONFIG_USB_BLUETOOTH is not set
8772 +# CONFIG_USB_MIDI is not set
8773 +CONFIG_USB_STORAGE=y
8774 +# CONFIG_USB_STORAGE_DEBUG is not set
8775 +# CONFIG_USB_STORAGE_DATAFAB is not set
8776 +# CONFIG_USB_STORAGE_FREECOM is not set
8777 +# CONFIG_USB_STORAGE_ISD200 is not set
8778 +# CONFIG_USB_STORAGE_DPCM is not set
8779 +# CONFIG_USB_STORAGE_HP8200e is not set
8780 +# CONFIG_USB_STORAGE_SDDR09 is not set
8781 +# CONFIG_USB_STORAGE_SDDR55 is not set
8782 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
8783 +# CONFIG_USB_ACM is not set
8784 +# CONFIG_USB_PRINTER is not set
8787 +# USB Human Interface Devices (HID)
8790 +CONFIG_USB_HIDINPUT=y
8791 +CONFIG_USB_HIDDEV=y
8792 +# CONFIG_USB_AIPTEK is not set
8793 +# CONFIG_USB_WACOM is not set
8794 +# CONFIG_USB_KBTAB is not set
8795 +# CONFIG_USB_POWERMATE is not set
8798 +# USB Imaging devices
8800 +# CONFIG_USB_DC2XX is not set
8801 +# CONFIG_USB_MDC800 is not set
8802 +# CONFIG_USB_SCANNER is not set
8803 +# CONFIG_USB_MICROTEK is not set
8804 +# CONFIG_USB_HPUSBSCSI is not set
8807 +# USB Multimedia devices
8811 +# Video4Linux support is needed for USB Multimedia device support
8815 +# USB Network adaptors
8817 +# CONFIG_USB_PEGASUS is not set
8818 +# CONFIG_USB_RTL8150 is not set
8819 +# CONFIG_USB_KAWETH is not set
8820 +# CONFIG_USB_CATC is not set
8821 +# CONFIG_USB_CDCETHER is not set
8822 +# CONFIG_USB_USBNET is not set
8827 +# CONFIG_USB_USS720 is not set
8830 +# USB Serial Converter support
8832 +# CONFIG_USB_SERIAL is not set
8835 +# USB Miscellaneous drivers
8837 +# CONFIG_USB_RIO500 is not set
8838 +# CONFIG_USB_AUERSWALD is not set
8839 +# CONFIG_USB_TIGL is not set
8840 +# CONFIG_USB_BRLVGER is not set
8841 +# CONFIG_USB_LCD is not set
8844 +# Support for USB gadgets
8846 +# CONFIG_USB_GADGET is not set
8849 +# Bluetooth support
8851 +# CONFIG_BLUEZ is not set
8856 +CONFIG_CROSSCOMPILE=y
8857 +# CONFIG_RUNTIME_DEBUG is not set
8858 +# CONFIG_KGDB is not set
8859 +# CONFIG_GDB_CONSOLE is not set
8860 +# CONFIG_DEBUG_INFO is not set
8861 +# CONFIG_MAGIC_SYSRQ is not set
8862 +# CONFIG_MIPS_UNCACHED is not set
8863 +CONFIG_LOG_BUF_SHIFT=0
8866 +# Cryptographic options
8868 +# CONFIG_CRYPTO is not set
8873 +# CONFIG_CRC32 is not set
8874 +CONFIG_ZLIB_INFLATE=m
8875 +CONFIG_ZLIB_DEFLATE=m
8876 +# CONFIG_FW_LOADER is not set
8877 --- a/arch/mips/defconfig-pb1500
8878 +++ b/arch/mips/defconfig-pb1500
8879 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
8880 # CONFIG_MIPS_PB1000 is not set
8881 # CONFIG_MIPS_PB1100 is not set
8882 CONFIG_MIPS_PB1500=y
8883 -# CONFIG_MIPS_HYDROGEN3 is not set
8884 # CONFIG_MIPS_PB1550 is not set
8885 +# CONFIG_MIPS_HYDROGEN3 is not set
8886 # CONFIG_MIPS_XXS1500 is not set
8887 # CONFIG_MIPS_MTX1 is not set
8888 # CONFIG_COGENT_CSB250 is not set
8889 @@ -215,9 +215,7 @@ CONFIG_MTD_PB1500=y
8890 # CONFIG_MTD_MTX1 is not set
8891 CONFIG_MTD_PB1500_BOOT=y
8892 # CONFIG_MTD_PB1500_USER is not set
8893 -# CONFIG_MTD_DB1X00 is not set
8894 # CONFIG_MTD_PB1550 is not set
8895 -# CONFIG_MTD_HYDROGEN3 is not set
8896 # CONFIG_MTD_MIRAGE is not set
8897 # CONFIG_MTD_CSTM_MIPS_IXX is not set
8898 # CONFIG_MTD_OCELOT is not set
8899 @@ -236,7 +234,6 @@ CONFIG_MTD_PB1500_BOOT=y
8901 # Disk-On-Chip Device Drivers
8903 -# CONFIG_MTD_DOC1000 is not set
8904 # CONFIG_MTD_DOC2000 is not set
8905 # CONFIG_MTD_DOC2001 is not set
8906 # CONFIG_MTD_DOCPROBE is not set
8907 @@ -341,11 +338,6 @@ CONFIG_IP_PNP_BOOTP=y
8909 # CONFIG_IPX is not set
8910 # CONFIG_ATALK is not set
8913 -# Appletalk devices
8915 -# CONFIG_DEV_APPLETALK is not set
8916 # CONFIG_DECNET is not set
8917 # CONFIG_BRIDGE is not set
8918 # CONFIG_X25 is not set
8919 @@ -675,7 +667,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
8920 # CONFIG_AU1X00_USB_TTY is not set
8921 # CONFIG_AU1X00_USB_RAW is not set
8922 # CONFIG_TXX927_SERIAL is not set
8923 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
8924 CONFIG_UNIX98_PTYS=y
8925 CONFIG_UNIX98_PTY_COUNT=256
8927 --- a/arch/mips/defconfig-pb1550
8928 +++ b/arch/mips/defconfig-pb1550
8929 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
8930 # CONFIG_MIPS_PB1000 is not set
8931 # CONFIG_MIPS_PB1100 is not set
8932 # CONFIG_MIPS_PB1500 is not set
8933 -# CONFIG_MIPS_HYDROGEN3 is not set
8934 CONFIG_MIPS_PB1550=y
8935 +# CONFIG_MIPS_HYDROGEN3 is not set
8936 # CONFIG_MIPS_XXS1500 is not set
8937 # CONFIG_MIPS_MTX1 is not set
8938 # CONFIG_COGENT_CSB250 is not set
8939 @@ -213,11 +213,9 @@ CONFIG_MTD_CFI_AMDSTD=y
8940 # CONFIG_MTD_BOSPORUS is not set
8941 # CONFIG_MTD_XXS1500 is not set
8942 # CONFIG_MTD_MTX1 is not set
8943 -# CONFIG_MTD_DB1X00 is not set
8945 CONFIG_MTD_PB1550_BOOT=y
8946 CONFIG_MTD_PB1550_USER=y
8947 -# CONFIG_MTD_HYDROGEN3 is not set
8948 # CONFIG_MTD_MIRAGE is not set
8949 # CONFIG_MTD_CSTM_MIPS_IXX is not set
8950 # CONFIG_MTD_OCELOT is not set
8951 @@ -236,7 +234,6 @@ CONFIG_MTD_PB1550_USER=y
8953 # Disk-On-Chip Device Drivers
8955 -# CONFIG_MTD_DOC1000 is not set
8956 # CONFIG_MTD_DOC2000 is not set
8957 # CONFIG_MTD_DOC2001 is not set
8958 # CONFIG_MTD_DOCPROBE is not set
8959 @@ -343,11 +340,6 @@ CONFIG_IP_PNP_BOOTP=y
8961 # CONFIG_IPX is not set
8962 # CONFIG_ATALK is not set
8965 -# Appletalk devices
8967 -# CONFIG_DEV_APPLETALK is not set
8968 # CONFIG_DECNET is not set
8969 # CONFIG_BRIDGE is not set
8970 # CONFIG_X25 is not set
8971 @@ -633,7 +625,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
8972 # CONFIG_AU1X00_USB_TTY is not set
8973 # CONFIG_AU1X00_USB_RAW is not set
8974 # CONFIG_TXX927_SERIAL is not set
8975 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
8976 CONFIG_UNIX98_PTYS=y
8977 CONFIG_UNIX98_PTY_COUNT=256
8979 --- a/arch/mips/defconfig-rbtx4927
8980 +++ b/arch/mips/defconfig-rbtx4927
8981 @@ -28,8 +28,8 @@ CONFIG_EXPERIMENTAL=y
8982 # CONFIG_MIPS_PB1000 is not set
8983 # CONFIG_MIPS_PB1100 is not set
8984 # CONFIG_MIPS_PB1500 is not set
8985 -# CONFIG_MIPS_HYDROGEN3 is not set
8986 # CONFIG_MIPS_PB1550 is not set
8987 +# CONFIG_MIPS_HYDROGEN3 is not set
8988 # CONFIG_MIPS_XXS1500 is not set
8989 # CONFIG_MIPS_MTX1 is not set
8990 # CONFIG_COGENT_CSB250 is not set
8991 @@ -223,11 +223,6 @@ CONFIG_IP_PNP_DHCP=y
8993 # CONFIG_IPX is not set
8994 # CONFIG_ATALK is not set
8997 -# Appletalk devices
8999 -# CONFIG_DEV_APPLETALK is not set
9000 # CONFIG_DECNET is not set
9001 # CONFIG_BRIDGE is not set
9002 # CONFIG_X25 is not set
9003 @@ -466,7 +461,6 @@ CONFIG_SERIAL_NONSTANDARD=y
9004 CONFIG_SERIAL_TXX9=y
9005 CONFIG_SERIAL_TXX9_CONSOLE=y
9006 # CONFIG_TXX927_SERIAL is not set
9007 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
9008 # CONFIG_UNIX98_PTYS is not set
9011 --- a/arch/mips/defconfig-rm200
9012 +++ b/arch/mips/defconfig-rm200
9013 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
9014 # CONFIG_MIPS_PB1000 is not set
9015 # CONFIG_MIPS_PB1100 is not set
9016 # CONFIG_MIPS_PB1500 is not set
9017 -# CONFIG_MIPS_HYDROGEN3 is not set
9018 # CONFIG_MIPS_PB1550 is not set
9019 +# CONFIG_MIPS_HYDROGEN3 is not set
9020 # CONFIG_MIPS_XXS1500 is not set
9021 # CONFIG_MIPS_MTX1 is not set
9022 # CONFIG_COGENT_CSB250 is not set
9023 @@ -229,11 +229,6 @@ CONFIG_INET=y
9025 # CONFIG_IPX is not set
9026 # CONFIG_ATALK is not set
9029 -# Appletalk devices
9031 -# CONFIG_DEV_APPLETALK is not set
9032 # CONFIG_DECNET is not set
9033 # CONFIG_BRIDGE is not set
9034 # CONFIG_X25 is not set
9035 @@ -340,7 +335,6 @@ CONFIG_VT_CONSOLE=y
9036 # CONFIG_SERIAL is not set
9037 # CONFIG_SERIAL_EXTENDED is not set
9038 # CONFIG_SERIAL_NONSTANDARD is not set
9039 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
9040 CONFIG_UNIX98_PTYS=y
9041 CONFIG_UNIX98_PTY_COUNT=256
9043 --- a/arch/mips/defconfig-sb1250-swarm
9044 +++ b/arch/mips/defconfig-sb1250-swarm
9045 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
9046 # CONFIG_MIPS_PB1000 is not set
9047 # CONFIG_MIPS_PB1100 is not set
9048 # CONFIG_MIPS_PB1500 is not set
9049 -# CONFIG_MIPS_HYDROGEN3 is not set
9050 # CONFIG_MIPS_PB1550 is not set
9051 +# CONFIG_MIPS_HYDROGEN3 is not set
9052 # CONFIG_MIPS_XXS1500 is not set
9053 # CONFIG_MIPS_MTX1 is not set
9054 # CONFIG_COGENT_CSB250 is not set
9055 @@ -90,6 +90,7 @@ CONFIG_SIBYTE_CFE=y
9056 # CONFIG_SIBYTE_TBPROF is not set
9057 CONFIG_SIBYTE_GENBUS_IDE=y
9058 CONFIG_SMP_CAPABLE=y
9060 # CONFIG_SNI_RM200_PCI is not set
9061 # CONFIG_TANBAC_TB0226 is not set
9062 # CONFIG_TANBAC_TB0229 is not set
9063 @@ -253,11 +254,6 @@ CONFIG_INET=y
9065 # CONFIG_IPX is not set
9066 # CONFIG_ATALK is not set
9069 -# Appletalk devices
9071 -# CONFIG_DEV_APPLETALK is not set
9072 # CONFIG_DECNET is not set
9073 # CONFIG_BRIDGE is not set
9074 # CONFIG_X25 is not set
9075 @@ -469,7 +465,6 @@ CONFIG_SERIAL_NONSTANDARD=y
9076 CONFIG_SIBYTE_SB1250_DUART=y
9077 CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y
9078 CONFIG_SERIAL_CONSOLE=y
9079 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
9080 CONFIG_UNIX98_PTYS=y
9081 CONFIG_UNIX98_PTY_COUNT=256
9083 --- a/arch/mips/defconfig-sead
9084 +++ b/arch/mips/defconfig-sead
9085 @@ -28,8 +28,8 @@ CONFIG_EXPERIMENTAL=y
9086 # CONFIG_MIPS_PB1000 is not set
9087 # CONFIG_MIPS_PB1100 is not set
9088 # CONFIG_MIPS_PB1500 is not set
9089 -# CONFIG_MIPS_HYDROGEN3 is not set
9090 # CONFIG_MIPS_PB1550 is not set
9091 +# CONFIG_MIPS_HYDROGEN3 is not set
9092 # CONFIG_MIPS_XXS1500 is not set
9093 # CONFIG_MIPS_MTX1 is not set
9094 # CONFIG_COGENT_CSB250 is not set
9095 @@ -244,7 +244,6 @@ CONFIG_SERIAL=y
9096 CONFIG_SERIAL_CONSOLE=y
9097 # CONFIG_SERIAL_EXTENDED is not set
9098 # CONFIG_SERIAL_NONSTANDARD is not set
9099 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
9100 # CONFIG_UNIX98_PTYS is not set
9103 --- a/arch/mips/defconfig-stretch
9104 +++ b/arch/mips/defconfig-stretch
9105 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
9106 # CONFIG_MIPS_PB1000 is not set
9107 # CONFIG_MIPS_PB1100 is not set
9108 # CONFIG_MIPS_PB1500 is not set
9109 -# CONFIG_MIPS_HYDROGEN3 is not set
9110 # CONFIG_MIPS_PB1550 is not set
9111 +# CONFIG_MIPS_HYDROGEN3 is not set
9112 # CONFIG_MIPS_XXS1500 is not set
9113 # CONFIG_MIPS_MTX1 is not set
9114 # CONFIG_COGENT_CSB250 is not set
9115 @@ -240,11 +240,6 @@ CONFIG_IP_PNP_DHCP=y
9117 # CONFIG_IPX is not set
9118 # CONFIG_ATALK is not set
9121 -# Appletalk devices
9123 -# CONFIG_DEV_APPLETALK is not set
9124 # CONFIG_DECNET is not set
9125 # CONFIG_BRIDGE is not set
9126 # CONFIG_X25 is not set
9127 @@ -324,9 +319,11 @@ CONFIG_CHR_DEV_SG=y
9128 # CONFIG_SCSI_MEGARAID is not set
9129 # CONFIG_SCSI_MEGARAID2 is not set
9130 # CONFIG_SCSI_SATA is not set
9131 +# CONFIG_SCSI_SATA_AHCI is not set
9132 # CONFIG_SCSI_SATA_SVW is not set
9133 # CONFIG_SCSI_ATA_PIIX is not set
9134 # CONFIG_SCSI_SATA_NV is not set
9135 +# CONFIG_SCSI_SATA_QSTOR is not set
9136 # CONFIG_SCSI_SATA_PROMISE is not set
9137 # CONFIG_SCSI_SATA_SX4 is not set
9138 # CONFIG_SCSI_SATA_SIL is not set
9139 @@ -516,7 +513,6 @@ CONFIG_SERIAL_NONSTANDARD=y
9140 # CONFIG_SERIAL_TXX9 is not set
9141 # CONFIG_SERIAL_TXX9_CONSOLE is not set
9142 # CONFIG_TXX927_SERIAL is not set
9143 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
9144 CONFIG_UNIX98_PTYS=y
9145 CONFIG_UNIX98_PTY_COUNT=256
9147 --- a/arch/mips/defconfig-tb0226
9148 +++ b/arch/mips/defconfig-tb0226
9149 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
9150 # CONFIG_MIPS_PB1000 is not set
9151 # CONFIG_MIPS_PB1100 is not set
9152 # CONFIG_MIPS_PB1500 is not set
9153 -# CONFIG_MIPS_HYDROGEN3 is not set
9154 # CONFIG_MIPS_PB1550 is not set
9155 +# CONFIG_MIPS_HYDROGEN3 is not set
9156 # CONFIG_MIPS_XXS1500 is not set
9157 # CONFIG_MIPS_MTX1 is not set
9158 # CONFIG_COGENT_CSB250 is not set
9159 @@ -228,11 +228,6 @@ CONFIG_IP_PNP_BOOTP=y
9161 # CONFIG_IPX is not set
9162 # CONFIG_ATALK is not set
9165 -# Appletalk devices
9167 -# CONFIG_DEV_APPLETALK is not set
9168 # CONFIG_DECNET is not set
9169 # CONFIG_BRIDGE is not set
9170 # CONFIG_X25 is not set
9171 @@ -312,9 +307,11 @@ CONFIG_SCSI_CONSTANTS=y
9172 # CONFIG_SCSI_MEGARAID is not set
9173 # CONFIG_SCSI_MEGARAID2 is not set
9174 # CONFIG_SCSI_SATA is not set
9175 +# CONFIG_SCSI_SATA_AHCI is not set
9176 # CONFIG_SCSI_SATA_SVW is not set
9177 # CONFIG_SCSI_ATA_PIIX is not set
9178 # CONFIG_SCSI_SATA_NV is not set
9179 +# CONFIG_SCSI_SATA_QSTOR is not set
9180 # CONFIG_SCSI_SATA_PROMISE is not set
9181 # CONFIG_SCSI_SATA_SX4 is not set
9182 # CONFIG_SCSI_SATA_SIL is not set
9183 @@ -518,7 +515,6 @@ CONFIG_SERIAL=y
9184 CONFIG_SERIAL_CONSOLE=y
9185 # CONFIG_SERIAL_EXTENDED is not set
9186 # CONFIG_SERIAL_NONSTANDARD is not set
9187 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
9188 # CONFIG_VR41XX_KIU is not set
9189 CONFIG_UNIX98_PTYS=y
9190 CONFIG_UNIX98_PTY_COUNT=256
9191 --- a/arch/mips/defconfig-tb0229
9192 +++ b/arch/mips/defconfig-tb0229
9193 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
9194 # CONFIG_MIPS_PB1000 is not set
9195 # CONFIG_MIPS_PB1100 is not set
9196 # CONFIG_MIPS_PB1500 is not set
9197 -# CONFIG_MIPS_HYDROGEN3 is not set
9198 # CONFIG_MIPS_PB1550 is not set
9199 +# CONFIG_MIPS_HYDROGEN3 is not set
9200 # CONFIG_MIPS_XXS1500 is not set
9201 # CONFIG_MIPS_MTX1 is not set
9202 # CONFIG_COGENT_CSB250 is not set
9203 @@ -230,11 +230,6 @@ CONFIG_IP_PNP_BOOTP=y
9205 # CONFIG_IPX is not set
9206 # CONFIG_ATALK is not set
9209 -# Appletalk devices
9211 -# CONFIG_DEV_APPLETALK is not set
9212 # CONFIG_DECNET is not set
9213 # CONFIG_BRIDGE is not set
9214 # CONFIG_X25 is not set
9215 @@ -445,7 +440,6 @@ CONFIG_SERIAL=y
9216 CONFIG_SERIAL_CONSOLE=y
9217 # CONFIG_SERIAL_EXTENDED is not set
9218 # CONFIG_SERIAL_NONSTANDARD is not set
9219 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
9220 # CONFIG_VR41XX_KIU is not set
9221 CONFIG_UNIX98_PTYS=y
9222 CONFIG_UNIX98_PTY_COUNT=256
9223 --- a/arch/mips/defconfig-ti1500
9224 +++ b/arch/mips/defconfig-ti1500
9225 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
9226 # CONFIG_MIPS_PB1000 is not set
9227 # CONFIG_MIPS_PB1100 is not set
9228 # CONFIG_MIPS_PB1500 is not set
9229 -# CONFIG_MIPS_HYDROGEN3 is not set
9230 # CONFIG_MIPS_PB1550 is not set
9231 +# CONFIG_MIPS_HYDROGEN3 is not set
9232 CONFIG_MIPS_XXS1500=y
9233 # CONFIG_MIPS_MTX1 is not set
9234 # CONFIG_COGENT_CSB250 is not set
9235 @@ -213,9 +213,7 @@ CONFIG_MTD_CFI_AMDSTD=y
9236 # CONFIG_MTD_BOSPORUS is not set
9237 CONFIG_MTD_XXS1500=y
9238 # CONFIG_MTD_MTX1 is not set
9239 -# CONFIG_MTD_DB1X00 is not set
9240 # CONFIG_MTD_PB1550 is not set
9241 -# CONFIG_MTD_HYDROGEN3 is not set
9242 # CONFIG_MTD_MIRAGE is not set
9243 # CONFIG_MTD_CSTM_MIPS_IXX is not set
9244 # CONFIG_MTD_OCELOT is not set
9245 @@ -234,7 +232,6 @@ CONFIG_MTD_XXS1500=y
9247 # Disk-On-Chip Device Drivers
9249 -# CONFIG_MTD_DOC1000 is not set
9250 # CONFIG_MTD_DOC2000 is not set
9251 # CONFIG_MTD_DOC2001 is not set
9252 # CONFIG_MTD_DOCPROBE is not set
9253 @@ -339,11 +336,6 @@ CONFIG_IP_PNP_BOOTP=y
9255 # CONFIG_IPX is not set
9256 # CONFIG_ATALK is not set
9259 -# Appletalk devices
9261 -# CONFIG_DEV_APPLETALK is not set
9262 # CONFIG_DECNET is not set
9263 # CONFIG_BRIDGE is not set
9264 # CONFIG_X25 is not set
9265 @@ -600,7 +592,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
9266 # CONFIG_AU1X00_USB_TTY is not set
9267 # CONFIG_AU1X00_USB_RAW is not set
9268 # CONFIG_TXX927_SERIAL is not set
9269 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
9270 CONFIG_UNIX98_PTYS=y
9271 CONFIG_UNIX98_PTY_COUNT=256
9273 --- a/arch/mips/defconfig-workpad
9274 +++ b/arch/mips/defconfig-workpad
9275 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
9276 # CONFIG_MIPS_PB1000 is not set
9277 # CONFIG_MIPS_PB1100 is not set
9278 # CONFIG_MIPS_PB1500 is not set
9279 -# CONFIG_MIPS_HYDROGEN3 is not set
9280 # CONFIG_MIPS_PB1550 is not set
9281 +# CONFIG_MIPS_HYDROGEN3 is not set
9282 # CONFIG_MIPS_XXS1500 is not set
9283 # CONFIG_MIPS_MTX1 is not set
9284 # CONFIG_COGENT_CSB250 is not set
9285 @@ -222,11 +222,6 @@ CONFIG_IP_MULTICAST=y
9287 # CONFIG_IPX is not set
9288 # CONFIG_ATALK is not set
9291 -# Appletalk devices
9293 -# CONFIG_DEV_APPLETALK is not set
9294 # CONFIG_DECNET is not set
9295 # CONFIG_BRIDGE is not set
9296 # CONFIG_X25 is not set
9297 @@ -426,7 +421,6 @@ CONFIG_SERIAL_MANY_PORTS=y
9298 # CONFIG_SERIAL_MULTIPORT is not set
9299 # CONFIG_HUB6 is not set
9300 # CONFIG_SERIAL_NONSTANDARD is not set
9301 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
9302 # CONFIG_VR41XX_KIU is not set
9303 CONFIG_UNIX98_PTYS=y
9304 CONFIG_UNIX98_PTY_COUNT=256
9305 --- a/arch/mips/defconfig-xxs1500
9306 +++ b/arch/mips/defconfig-xxs1500
9307 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
9308 # CONFIG_MIPS_PB1000 is not set
9309 # CONFIG_MIPS_PB1100 is not set
9310 # CONFIG_MIPS_PB1500 is not set
9311 -# CONFIG_MIPS_HYDROGEN3 is not set
9312 # CONFIG_MIPS_PB1550 is not set
9313 +# CONFIG_MIPS_HYDROGEN3 is not set
9314 CONFIG_MIPS_XXS1500=y
9315 # CONFIG_MIPS_MTX1 is not set
9316 # CONFIG_COGENT_CSB250 is not set
9317 @@ -213,9 +213,7 @@ CONFIG_MTD_CFI_AMDSTD=y
9318 # CONFIG_MTD_BOSPORUS is not set
9319 CONFIG_MTD_XXS1500=y
9320 # CONFIG_MTD_MTX1 is not set
9321 -# CONFIG_MTD_DB1X00 is not set
9322 # CONFIG_MTD_PB1550 is not set
9323 -# CONFIG_MTD_HYDROGEN3 is not set
9324 # CONFIG_MTD_MIRAGE is not set
9325 # CONFIG_MTD_CSTM_MIPS_IXX is not set
9326 # CONFIG_MTD_OCELOT is not set
9327 @@ -234,7 +232,6 @@ CONFIG_MTD_XXS1500=y
9329 # Disk-On-Chip Device Drivers
9331 -# CONFIG_MTD_DOC1000 is not set
9332 # CONFIG_MTD_DOC2000 is not set
9333 # CONFIG_MTD_DOC2001 is not set
9334 # CONFIG_MTD_DOCPROBE is not set
9335 @@ -339,11 +336,6 @@ CONFIG_IP_PNP_BOOTP=y
9337 # CONFIG_IPX is not set
9338 # CONFIG_ATALK is not set
9341 -# Appletalk devices
9343 -# CONFIG_DEV_APPLETALK is not set
9344 # CONFIG_DECNET is not set
9345 # CONFIG_BRIDGE is not set
9346 # CONFIG_X25 is not set
9347 @@ -671,7 +663,6 @@ CONFIG_AU1X00_SERIAL_CONSOLE=y
9348 # CONFIG_AU1X00_USB_TTY is not set
9349 # CONFIG_AU1X00_USB_RAW is not set
9350 # CONFIG_TXX927_SERIAL is not set
9351 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
9352 CONFIG_UNIX98_PTYS=y
9353 CONFIG_UNIX98_PTY_COUNT=256
9355 --- a/arch/mips/defconfig-yosemite
9356 +++ b/arch/mips/defconfig-yosemite
9357 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
9358 # CONFIG_MIPS_PB1000 is not set
9359 # CONFIG_MIPS_PB1100 is not set
9360 # CONFIG_MIPS_PB1500 is not set
9361 -# CONFIG_MIPS_HYDROGEN3 is not set
9362 # CONFIG_MIPS_PB1550 is not set
9363 +# CONFIG_MIPS_HYDROGEN3 is not set
9364 # CONFIG_MIPS_XXS1500 is not set
9365 # CONFIG_MIPS_MTX1 is not set
9366 # CONFIG_COGENT_CSB250 is not set
9367 @@ -227,11 +227,6 @@ CONFIG_IP_PNP_DHCP=y
9369 # CONFIG_IPX is not set
9370 # CONFIG_ATALK is not set
9373 -# Appletalk devices
9375 -# CONFIG_DEV_APPLETALK is not set
9376 # CONFIG_DECNET is not set
9377 # CONFIG_BRIDGE is not set
9378 # CONFIG_X25 is not set
9379 @@ -310,9 +305,11 @@ CONFIG_CHR_DEV_SG=y
9380 # CONFIG_SCSI_MEGARAID is not set
9381 # CONFIG_SCSI_MEGARAID2 is not set
9382 # CONFIG_SCSI_SATA is not set
9383 +# CONFIG_SCSI_SATA_AHCI is not set
9384 # CONFIG_SCSI_SATA_SVW is not set
9385 # CONFIG_SCSI_ATA_PIIX is not set
9386 # CONFIG_SCSI_SATA_NV is not set
9387 +# CONFIG_SCSI_SATA_QSTOR is not set
9388 # CONFIG_SCSI_SATA_PROMISE is not set
9389 # CONFIG_SCSI_SATA_SX4 is not set
9390 # CONFIG_SCSI_SATA_SIL is not set
9391 @@ -477,7 +474,6 @@ CONFIG_SERIAL_NONSTANDARD=y
9392 # CONFIG_SERIAL_TXX9 is not set
9393 # CONFIG_SERIAL_TXX9_CONSOLE is not set
9394 # CONFIG_TXX927_SERIAL is not set
9395 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
9396 CONFIG_UNIX98_PTYS=y
9397 CONFIG_UNIX98_PTY_COUNT=256
9399 --- a/arch/mips/kernel/cpu-probe.c
9400 +++ b/arch/mips/kernel/cpu-probe.c
9401 @@ -34,21 +34,16 @@ static void r4k_wait(void)
9405 -/* The Au1xxx wait is available only if we run CONFIG_PM and
9406 - * the timer setup found we had a 32KHz counter available.
9407 - * There are still problems with functions that may call au1k_wait
9408 - * directly, but that will be discovered pretty quickly.
9410 -extern void (*au1k_wait_ptr)(void);
9411 -void au1k_wait(void)
9412 +/* The Au1xxx wait is available only if using 32khz counter or
9413 + * external timer source, but specifically not CP0 Counter. */
9414 +int allow_au1k_wait;
9416 +static void au1k_wait(void)
9419 - unsigned long addr;
9420 /* using the wait instruction makes CP0 counter unusable */
9421 - __asm__("la %0,au1k_wait\n\t"
9423 - "cache 0x14,0(%0)\n\t"
9424 - "cache 0x14,32(%0)\n\t"
9425 + __asm__(".set mips3\n\t"
9426 + "cache 0x14, 0(%0)\n\t"
9427 + "cache 0x14, 32(%0)\n\t"
9431 @@ -57,11 +52,7 @@ void au1k_wait(void)
9440 + : : "r" (au1k_wait));
9443 static inline void check_wait(void)
9444 @@ -100,20 +91,17 @@ static inline void check_wait(void)
9445 cpu_wait = r4k_wait;
9446 printk(" available.\n");
9453 - if (au1k_wait_ptr != NULL) {
9454 - cpu_wait = au1k_wait_ptr;
9456 + if (allow_au1k_wait) {
9457 + cpu_wait = au1k_wait;
9458 printk(" available.\n");
9462 printk(" unavailable.\n");
9467 printk(" unavailable.\n");
9469 --- a/arch/mips/kernel/head.S
9470 +++ b/arch/mips/kernel/head.S
9474 LEAF(except_vec2_generic)
9480 * This is a very bad place to be. Our cache error
9481 * detection has triggered. If we have write-back data
9484 j cache_parity_error
9487 END(except_vec2_generic)
9492 * Special interrupt vector for embedded MIPS. This is a
9493 * dedicated interrupt vector which reduces interrupt processing
9497 NESTED(except_vec4, 0, sp)
9500 1: j 1b /* Dummy, will be replaced */
9507 * unconditional jump to this vector.
9509 NESTED(except_vec_ejtag_debug, 0, sp)
9512 j ejtag_debug_handler
9515 END(except_vec_ejtag_debug)
9519 * EJTAG debug exception handler.
9521 NESTED(ejtag_debug_handler, PT_SIZE, sp)
9526 @@ -120,7 +126,7 @@ ejtag_return:
9532 END(ejtag_debug_handler)
9535 @@ -132,13 +138,17 @@ ejtag_return:
9536 * unconditional jump to this vector.
9538 NESTED(except_vec_nmi, 0, sp)
9548 NESTED(nmi_handler, PT_SIZE, sp)
9553 @@ -147,8 +157,7 @@ ejtag_return:
9563 @@ -157,7 +166,20 @@ ejtag_return:
9564 * Kernel entry point
9566 NESTED(kernel_entry, 16, sp)
9569 + * For the moment disable interrupts and mark the kernel mode.
9570 + * A full initialization of the CPU's status register is done
9571 + * later in per_cpu_trap_init().
9573 + mfc0 t0, CP0_STATUS
9574 + or t0, ST0_CU0|0x1f
9576 + mtc0 t0, CP0_STATUS
9583 * The firmware/bootloader passes argc/argp/envp
9584 @@ -170,8 +192,8 @@ ejtag_return:
9593 * Stack for kernel and init, current variable
9594 @@ -182,7 +204,7 @@ ejtag_return:
9603 @@ -193,17 +215,26 @@ ejtag_return:
9604 * function after setting up the stack and gp registers.
9609 - mtc0 zero, CP0_WIRED
9613 + * For the moment disable interrupts and bootstrap exception
9614 + * vectors and mark the kernel mode. A full initialization of
9615 + * the CPU's status register is done later in
9616 + * per_cpu_trap_init().
9619 - li t1, ~(ST0_CU1|ST0_CU2|ST0_CU3|ST0_KX|ST0_SX|ST0_UX)
9622 + or t0, ST0_CU0|ST0_BEV|0x1f
9623 + xor t0, ST0_BEV|0x1f
9624 + mtc0 t0, CP0_STATUS
9630 + mtc0 zero, CP0_WIRED
9633 - mtc0 t0, CP0_STATUS
9639 --- a/arch/mips/kernel/process.c
9640 +++ b/arch/mips/kernel/process.c
9641 @@ -128,6 +128,26 @@ int dump_fpu(struct pt_regs *regs, elf_f
9645 +void dump_regs(elf_greg_t *gp, struct pt_regs *regs)
9649 + for (i = 0; i < EF_REG0; i++)
9652 + for (i = 1; i <= 31; i++)
9653 + gp[EF_REG0 + i] = regs->regs[i];
9656 + gp[EF_LO] = regs->lo;
9657 + gp[EF_HI] = regs->hi;
9658 + gp[EF_CP0_EPC] = regs->cp0_epc;
9659 + gp[EF_CP0_BADVADDR] = regs->cp0_badvaddr;
9660 + gp[EF_CP0_STATUS] = regs->cp0_status;
9661 + gp[EF_CP0_CAUSE] = regs->cp0_cause;
9662 + gp[EF_UNUSED0] = 0;
9666 * Create a kernel thread
9668 --- a/arch/mips/kernel/scall_o32.S
9669 +++ b/arch/mips/kernel/scall_o32.S
9670 @@ -121,15 +121,14 @@ reschedule:
9679 lw a0, PT_R4(sp) # Restore argument registers
9686 li t0, -EMAXERRNO - 1 # error?
9688 --- a/arch/mips/kernel/setup.c
9689 +++ b/arch/mips/kernel/setup.c
9692 * Copyright (C) 1995 Linus Torvalds
9693 * Copyright (C) 1995 Waldorf Electronics
9694 - * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 Ralf Baechle
9695 + * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 01, 05 Ralf Baechle
9696 * Copyright (C) 1996 Stoned Elipot
9697 * Copyright (C) 2000, 2001, 2002 Maciej W. Rozycki
9699 @@ -71,6 +71,8 @@ extern void * __rd_start, * __rd_end;
9700 extern struct rtc_ops no_rtc_ops;
9701 struct rtc_ops *rtc_ops;
9703 +EXPORT_SYMBOL(rtc_ops);
9705 #ifdef CONFIG_PC_KEYB
9706 struct kbd_ops *kbd_ops;
9708 @@ -132,10 +134,6 @@ init_arch(int argc, char **argv, char **
9712 - /* Disable coprocessors and set FPU for 16/32 FPR register model */
9713 - clear_c0_status(ST0_CU1|ST0_CU2|ST0_CU3|ST0_KX|ST0_SX|ST0_FR);
9714 - set_c0_status(ST0_CU0);
9719 --- a/arch/mips/kernel/traps.c
9720 +++ b/arch/mips/kernel/traps.c
9721 @@ -452,9 +452,10 @@ static inline void simulate_ll(struct pt
9725 + compute_return_epc(regs);
9727 regs->regs[(opcode & RT) >> 16] = value;
9729 - compute_return_epc(regs);
9733 @@ -485,8 +486,8 @@ static inline void simulate_sc(struct pt
9736 if (ll_bit == 0 || ll_task != current) {
9737 - regs->regs[reg] = 0;
9738 compute_return_epc(regs);
9739 + regs->regs[reg] = 0;
9743 @@ -495,9 +496,9 @@ static inline void simulate_sc(struct pt
9747 + compute_return_epc(regs);
9748 regs->regs[reg] = 1;
9750 - compute_return_epc(regs);
9754 @@ -887,12 +888,18 @@ extern asmlinkage int fpu_emulator_resto
9755 void __init per_cpu_trap_init(void)
9757 unsigned int cpu = smp_processor_id();
9758 + unsigned int status_set = ST0_CU0;
9760 - /* Some firmware leaves the BEV flag set, clear it. */
9761 - clear_c0_status(ST0_CU3|ST0_CU2|ST0_CU1|ST0_BEV|ST0_KX|ST0_SX|ST0_UX);
9764 + * Disable coprocessors and 64-bit addressing and set FPU for
9765 + * the 16/32 FPR register model. Reset the BEV flag that some
9766 + * firmware may have left set and the TS bit (for IP27). Set
9767 + * XX for ISA IV code to work.
9769 if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV)
9770 - set_c0_status(ST0_XX);
9771 + status_set |= ST0_XX;
9772 + change_c0_status(ST0_CU|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
9776 * Some MIPS CPUs have a dedicated interrupt vector which reduces the
9777 @@ -902,7 +909,7 @@ void __init per_cpu_trap_init(void)
9778 set_c0_cause(CAUSEF_IV);
9780 cpu_data[cpu].asid_cache = ASID_FIRST_VERSION;
9781 - write_c0_context(cpu << 23);
9782 + TLBMISS_HANDLER_SETUP();
9784 atomic_inc(&init_mm.mm_count);
9785 current->active_mm = &init_mm;
9786 @@ -918,8 +925,6 @@ void __init trap_init(void)
9787 extern char except_vec4;
9790 - per_cpu_trap_init();
9792 /* Copy the generic exception handler code to it's final destination. */
9793 memcpy((void *)(KSEG0 + 0x80), &except_vec1_generic, 0x80);
9795 @@ -1020,10 +1025,5 @@ void __init trap_init(void)
9797 flush_icache_range(KSEG0, KSEG0 + 0x400);
9799 - atomic_inc(&init_mm.mm_count); /* XXX UP? */
9800 - current->active_mm = &init_mm;
9802 - /* XXX Must be done for all CPUs */
9803 - current_cpu_data.asid_cache = ASID_FIRST_VERSION;
9804 - TLBMISS_HANDLER_SETUP();
9805 + per_cpu_trap_init();
9807 --- a/arch/mips/lib/rtc-no.c
9808 +++ b/arch/mips/lib/rtc-no.c
9810 * Stub RTC routines to keep Linux from crashing on machine which don't
9813 - * Copyright (C) 1998, 2001 by Ralf Baechle
9814 + * Copyright (C) 1998, 2001, 2005 by Ralf Baechle
9816 #include <linux/kernel.h>
9817 -#include <linux/module.h>
9818 #include <linux/mc146818rtc.h>
9820 static unsigned int shouldnt_happen(void)
9821 @@ -29,5 +28,3 @@ struct rtc_ops no_rtc_ops = {
9822 .rtc_write_data = (void *) &shouldnt_happen,
9823 .rtc_bcd_mode = (void *) &shouldnt_happen
9826 -EXPORT_SYMBOL(rtc_ops);
9827 --- a/arch/mips/lib/rtc-std.c
9828 +++ b/arch/mips/lib/rtc-std.c
9831 * RTC routines for PC style attached Dallas chip.
9833 - * Copyright (C) 1998, 2001 by Ralf Baechle
9834 + * Copyright (C) 1998, 2001, 05 by Ralf Baechle
9836 -#include <linux/module.h>
9837 #include <linux/mc146818rtc.h>
9840 @@ -33,5 +32,3 @@ struct rtc_ops std_rtc_ops = {
9841 &std_rtc_write_data,
9845 -EXPORT_SYMBOL(rtc_ops);
9846 --- a/arch/mips/Makefile
9847 +++ b/arch/mips/Makefile
9848 @@ -209,7 +209,7 @@ LOADADDR := 0x80080000
9852 -# Au1000 (Alchemy Semi PB1000) eval board
9853 +# Au1x AMD Alchemy eval boards
9855 ifdef CONFIG_MIPS_PB1000
9856 LIBS += arch/mips/au1000/pb1000/pb1000.o \
9857 @@ -218,9 +218,6 @@ SUBDIRS += arch/mips/au1000/pb1000 arch
9858 LOADADDR := 0x80100000
9862 -# Au1100 (Alchemy Semi PB1100) eval board
9864 ifdef CONFIG_MIPS_PB1100
9865 LIBS += arch/mips/au1000/pb1100/pb1100.o \
9866 arch/mips/au1000/common/au1000.o
9867 @@ -228,9 +225,6 @@ SUBDIRS += arch/mips/au1000/pb1100
9868 LOADADDR += 0x80100000
9872 -# Au1500 (Alchemy Semi PB1500) eval board
9874 ifdef CONFIG_MIPS_PB1500
9875 LIBS += arch/mips/au1000/pb1500/pb1500.o \
9876 arch/mips/au1000/common/au1000.o
9877 @@ -238,9 +232,6 @@ SUBDIRS += arch/mips/au1000/pb1500 arch
9878 LOADADDR := 0x80100000
9882 -# Au1x00 (AMD/Alchemy) eval boards
9884 ifdef CONFIG_MIPS_DB1000
9885 LIBS += arch/mips/au1000/db1x00/db1x00.o \
9886 arch/mips/au1000/common/au1000.o
9887 @@ -311,6 +302,27 @@ SUBDIRS += arch/mips/au1000/pb1550
9888 LOADADDR += 0x80100000
9891 +ifdef CONFIG_MIPS_PB1200
9892 +LIBS += arch/mips/au1000/pb1200/pb1200.o \
9893 + arch/mips/au1000/common/au1000.o
9894 +SUBDIRS += arch/mips/au1000/pb1200 arch/mips/au1000/common
9895 +LOADADDR += 0x80100000
9898 +ifdef CONFIG_MIPS_DB1200
9899 +LIBS += arch/mips/au1000/pb1200/pb1200.o \
9900 + arch/mips/au1000/common/au1000.o
9901 +SUBDIRS += arch/mips/au1000/pb1200 arch/mips/au1000/common
9902 +LOADADDR += 0x80100000
9905 +ifdef CONFIG_MIPS_FICMMP
9906 +LIBS += arch/mips/au1000/ficmmp/ficmmp.o \
9907 + arch/mips/au1000/common/au1000.o
9908 +SUBDIRS += arch/mips/au1000/ficmmp arch/mips/au1000/common
9909 +LOADADDR += 0x80100000
9915 --- a/arch/mips/mm/cerr-sb1.c
9916 +++ b/arch/mips/mm/cerr-sb1.c
9917 @@ -252,14 +252,14 @@ static const uint8_t parity[256] = {
9919 /* Masks to select bits for Hamming parity, mask_72_64[i] for bit[i] */
9920 static const uint64_t mask_72_64[8] = {
9921 - 0x0738C808099264FFL,
9922 - 0x38C808099264FF07L,
9923 - 0xC808099264FF0738L,
9924 - 0x08099264FF0738C8L,
9925 - 0x099264FF0738C808L,
9926 - 0x9264FF0738C80809L,
9927 - 0x64FF0738C8080992L,
9928 - 0xFF0738C808099264L
9929 + 0x0738C808099264FFULL,
9930 + 0x38C808099264FF07ULL,
9931 + 0xC808099264FF0738ULL,
9932 + 0x08099264FF0738C8ULL,
9933 + 0x099264FF0738C808ULL,
9934 + 0x9264FF0738C80809ULL,
9935 + 0x64FF0738C8080992ULL,
9936 + 0xFF0738C808099264ULL
9939 /* Calculate the parity on a range of bits */
9940 @@ -331,9 +331,9 @@ static uint32_t extract_ic(unsigned shor
9942 ((lru >> 6) & 0x3));
9944 - va = (taglo & 0xC0000FFFFFFFE000) | addr;
9945 + va = (taglo & 0xC0000FFFFFFFE000ULL) | addr;
9946 if ((taglo & (1 << 31)) && (((taglo >> 62) & 0x3) == 3))
9947 - va |= 0x3FFFF00000000000;
9948 + va |= 0x3FFFF00000000000ULL;
9949 valid = ((taghi >> 29) & 1);
9951 tlo_tmp = taglo & 0xfff3ff;
9952 @@ -474,7 +474,7 @@ static uint32_t extract_dc(unsigned shor
9953 : "r" ((way << 13) | addr));
9955 taglo = ((unsigned long long)taglohi << 32) | taglolo;
9956 - pa = (taglo & 0xFFFFFFE000) | addr;
9957 + pa = (taglo & 0xFFFFFFE000ULL) | addr;
9959 lru = (taghi >> 14) & 0xff;
9960 prom_printf("[Bank %d Set 0x%02x] LRU > %d %d %d %d > MRU\n",
9961 --- a/arch/mips/mm/c-r4k.c
9962 +++ b/arch/mips/mm/c-r4k.c
9963 @@ -867,9 +867,16 @@ static void __init probe_pcache(void)
9964 * normally they'd suffer from aliases but magic in the hardware deals
9965 * with that for us so we don't need to take care ourselves.
9967 - if (c->cputype != CPU_R10000 && c->cputype != CPU_R12000)
9968 - if (c->dcache.waysize > PAGE_SIZE)
9969 - c->dcache.flags |= MIPS_CACHE_ALIASES;
9970 + switch (c->cputype) {
9975 + if (!(read_c0_config7() & (1 << 16)))
9977 + if (c->dcache.waysize > PAGE_SIZE)
9978 + c->dcache.flags |= MIPS_CACHE_ALIASES;
9981 switch (c->cputype) {
9983 @@ -1069,9 +1076,6 @@ void __init ld_mmu_r4xx0(void)
9987 - if (c->dcache.sets * c->dcache.ways > PAGE_SIZE)
9988 - c->dcache.flags |= MIPS_CACHE_ALIASES;
9990 r4k_blast_dcache_page_setup();
9991 r4k_blast_dcache_page_indexed_setup();
9992 r4k_blast_dcache_setup();
9993 --- a/arch/mips/mm/tlbex-mips32.S
9994 +++ b/arch/mips/mm/tlbex-mips32.S
9998 mfc0 a2, CP0_BADVADDR; \
10003 jal do_page_fault; \
10004 --- a/arch/mips/mm/tlbex-r4k.S
10005 +++ b/arch/mips/mm/tlbex-r4k.S
10006 @@ -184,13 +184,10 @@
10007 P_MTC0 k0, CP0_ENTRYLO0 # load it
10008 PTE_SRL k1, k1, 6 # convert to entrylo1
10009 P_MTC0 k1, CP0_ENTRYLO1 # load it
10011 - rm9000_tlb_hazard
10013 tlbwr # write random tlb entry
10016 - rm9000_tlb_hazard
10017 - eret # return from trap
10020 END(except_vec0_r4000)
10022 /* TLB refill, EXL == 0, R4600 version */
10023 @@ -468,13 +465,9 @@ invalid_tlbl:
10024 PTE_PRESENT(k0, k1, nopage_tlbl)
10025 PTE_MAKEVALID(k0, k1)
10027 - rm9000_tlb_hazard
10033 - rm9000_tlb_hazard
10040 @@ -496,13 +489,9 @@ nopage_tlbl:
10041 PTE_WRITABLE(k0, k1, nopage_tlbs)
10042 PTE_MAKEWRITE(k0, k1)
10044 - rm9000_tlb_hazard
10050 - rm9000_tlb_hazard
10057 @@ -529,13 +518,9 @@ nopage_tlbs:
10059 /* Now reload the entry into the tlb. */
10061 - rm9000_tlb_hazard
10066 - rm9000_tlb_hazard
10074 --- a/arch/mips/mm/tlb-r4k.c
10075 +++ b/arch/mips/mm/tlb-r4k.c
10077 * License. See the file "COPYING" in the main directory of this archive
10078 * for more details.
10080 - * r4xx0.c: R4000 processor variant specific MMU/Cache routines.
10082 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
10083 * Copyright (C) 1997, 1998, 1999, 2000 Ralf Baechle ralf@gnu.org
10087 - * - this code is a overbloated pig
10088 - * - many of the bug workarounds are not efficient at all, but at
10089 - * least they are functional ...
10090 + * Carsten Langgaard, carstenl@mips.com
10091 + * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved.
10093 +#include <linux/config.h>
10094 #include <linux/init.h>
10095 #include <linux/sched.h>
10096 #include <linux/mm.h>
10098 #include <asm/pgtable.h>
10099 #include <asm/system.h>
10102 -#undef DEBUG_TLBUPDATE
10104 extern char except_vec0_nevada, except_vec0_r4000, except_vec0_r4600;
10106 /* CP0 hazard avoidance. */
10107 @@ -41,33 +33,23 @@ void local_flush_tlb_all(void)
10108 unsigned long old_ctx;
10112 - printk("[tlball]");
10115 local_irq_save(flags);
10116 /* Save old context and create impossible VPN2 value */
10117 old_ctx = read_c0_entryhi();
10118 write_c0_entrylo0(0);
10119 write_c0_entrylo1(0);
10122 entry = read_c0_wired();
10124 /* Blast 'em all away. */
10125 while (entry < current_cpu_data.tlbsize) {
10127 - * Make sure all entries differ. If they're not different
10128 - * MIPS32 will take revenge ...
10130 write_c0_entryhi(KSEG0 + entry*0x2000);
10131 write_c0_index(entry);
10133 + mtc0_tlbw_hazard();
10134 tlb_write_indexed();
10139 + tlbw_use_hazard();
10140 write_c0_entryhi(old_ctx);
10141 local_irq_restore(flags);
10143 @@ -76,12 +58,8 @@ void local_flush_tlb_mm(struct mm_struct
10145 int cpu = smp_processor_id();
10147 - if (cpu_context(cpu, mm) != 0) {
10149 - printk("[tlbmm<%d>]", cpu_context(cpu, mm));
10151 + if (cpu_context(cpu, mm) != 0)
10152 drop_mmu_context(mm,cpu);
10156 void local_flush_tlb_range(struct mm_struct *mm, unsigned long start,
10157 @@ -93,10 +71,6 @@ void local_flush_tlb_range(struct mm_str
10158 unsigned long flags;
10162 - printk("[tlbrange<%02x,%08lx,%08lx>]",
10163 - cpu_asid(cpu, mm), start, end);
10165 local_irq_save(flags);
10166 size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
10167 size = (size + 1) >> 1;
10168 @@ -112,7 +86,7 @@ void local_flush_tlb_range(struct mm_str
10170 write_c0_entryhi(start | newpid);
10171 start += (PAGE_SIZE << 1);
10173 + mtc0_tlbw_hazard();
10176 idx = read_c0_index();
10177 @@ -122,10 +96,10 @@ void local_flush_tlb_range(struct mm_str
10179 /* Make sure all entries differ. */
10180 write_c0_entryhi(KSEG0 + idx*0x2000);
10182 + mtc0_tlbw_hazard();
10183 tlb_write_indexed();
10186 + tlbw_use_hazard();
10187 write_c0_entryhi(oldpid);
10189 drop_mmu_context(mm, cpu);
10190 @@ -138,34 +112,30 @@ void local_flush_tlb_page(struct vm_area
10192 int cpu = smp_processor_id();
10194 - if (!vma || cpu_context(cpu, vma->vm_mm) != 0) {
10195 + if (cpu_context(cpu, vma->vm_mm) != 0) {
10196 unsigned long flags;
10197 - int oldpid, newpid, idx;
10198 + unsigned long oldpid, newpid, idx;
10201 - printk("[tlbpage<%d,%08lx>]", cpu_context(cpu, vma->vm_mm),
10204 newpid = cpu_asid(cpu, vma->vm_mm);
10205 page &= (PAGE_MASK << 1);
10206 local_irq_save(flags);
10207 oldpid = read_c0_entryhi();
10208 write_c0_entryhi(page | newpid);
10210 + mtc0_tlbw_hazard();
10213 idx = read_c0_index();
10214 write_c0_entrylo0(0);
10215 write_c0_entrylo1(0);
10219 /* Make sure all entries differ. */
10220 write_c0_entryhi(KSEG0+idx*0x2000);
10222 + mtc0_tlbw_hazard();
10223 tlb_write_indexed();
10224 + tlbw_use_hazard();
10228 write_c0_entryhi(oldpid);
10229 local_irq_restore(flags);
10231 @@ -185,7 +155,7 @@ void local_flush_tlb_one(unsigned long p
10233 local_irq_save(flags);
10234 write_c0_entryhi(page);
10236 + mtc0_tlbw_hazard();
10239 idx = read_c0_index();
10240 @@ -194,18 +164,19 @@ void local_flush_tlb_one(unsigned long p
10242 /* Make sure all entries differ. */
10243 write_c0_entryhi(KSEG0+idx*0x2000);
10244 + mtc0_tlbw_hazard();
10245 tlb_write_indexed();
10246 + tlbw_use_hazard();
10249 write_c0_entryhi(oldpid);
10251 local_irq_restore(flags);
10254 EXPORT_SYMBOL(local_flush_tlb_one);
10256 -/* We will need multiple versions of update_mmu_cache(), one that just
10257 - * updates the TLB with the new pte(s), and another which also checks
10258 - * for the R4k "end of page" hardware bug and does the needy.
10260 + * Updates the TLB with the new pte(s).
10262 void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte)
10264 @@ -223,25 +194,16 @@ void __update_tlb(struct vm_area_struct
10266 pid = read_c0_entryhi() & ASID_MASK;
10269 - if ((pid != cpu_asid(cpu, vma->vm_mm)) ||
10270 - (cpu_context(vma->vm_mm) == 0)) {
10271 - printk("update_mmu_cache: Wheee, bogus tlbpid mmpid=%d "
10272 - "tlbpid=%d\n", (int) (cpu_asid(cpu, vma->vm_mm)), pid);
10276 local_irq_save(flags);
10277 address &= (PAGE_MASK << 1);
10278 write_c0_entryhi(address | pid);
10279 pgdp = pgd_offset(vma->vm_mm, address);
10281 + mtc0_tlbw_hazard();
10284 pmdp = pmd_offset(pgdp, address);
10285 idx = read_c0_index();
10286 ptep = pte_offset(pmdp, address);
10288 #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32)
10289 write_c0_entrylo0(ptep->pte_high);
10291 @@ -251,15 +213,13 @@ void __update_tlb(struct vm_area_struct
10292 write_c0_entrylo1(pte_val(*ptep) >> 6);
10294 write_c0_entryhi(address | pid);
10297 + mtc0_tlbw_hazard();
10299 tlb_write_random();
10302 tlb_write_indexed();
10305 + tlbw_use_hazard();
10306 write_c0_entryhi(pid);
10308 local_irq_restore(flags);
10311 @@ -279,24 +239,26 @@ static void r4k_update_mmu_cache_hwbug(s
10312 asid = read_c0_entryhi() & ASID_MASK;
10313 write_c0_entryhi(address | asid);
10314 pgdp = pgd_offset(vma->vm_mm, address);
10315 + mtc0_tlbw_hazard();
10318 pmdp = pmd_offset(pgdp, address);
10319 idx = read_c0_index();
10320 ptep = pte_offset(pmdp, address);
10321 write_c0_entrylo0(pte_val(*ptep++) >> 6);
10322 write_c0_entrylo1(pte_val(*ptep) >> 6);
10324 + mtc0_tlbw_hazard();
10326 tlb_write_random();
10328 tlb_write_indexed();
10330 + tlbw_use_hazard();
10331 local_irq_restore(flags);
10335 void __init add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
10336 - unsigned long entryhi, unsigned long pagemask)
10337 + unsigned long entryhi, unsigned long pagemask)
10339 unsigned long flags;
10340 unsigned long wired;
10341 @@ -315,9 +277,9 @@ void __init add_wired_entry(unsigned lon
10342 write_c0_entryhi(entryhi);
10343 write_c0_entrylo0(entrylo0);
10344 write_c0_entrylo1(entrylo1);
10346 + mtc0_tlbw_hazard();
10347 tlb_write_indexed();
10349 + tlbw_use_hazard();
10351 write_c0_entryhi(old_ctx);
10353 @@ -355,17 +317,15 @@ __init int add_temporary_entry(unsigned
10356 write_c0_index(temp_tlb_entry);
10358 write_c0_pagemask(pagemask);
10359 write_c0_entryhi(entryhi);
10360 write_c0_entrylo0(entrylo0);
10361 write_c0_entrylo1(entrylo1);
10363 + mtc0_tlbw_hazard();
10364 tlb_write_indexed();
10366 + tlbw_use_hazard();
10368 write_c0_entryhi(old_ctx);
10370 write_c0_pagemask(old_pagemask);
10372 local_irq_restore(flags);
10373 @@ -375,7 +335,7 @@ out:
10374 static void __init probe_tlb(unsigned long config)
10376 struct cpuinfo_mips *c = ¤t_cpu_data;
10377 - unsigned int reg;
10378 + unsigned int config1;
10381 * If this isn't a MIPS32 / MIPS64 compliant CPU. Config 1 register
10382 @@ -385,16 +345,16 @@ static void __init probe_tlb(unsigned lo
10383 if ((c->processor_id & 0xff0000) == PRID_COMP_LEGACY)
10386 - reg = read_c0_config1();
10387 + config1 = read_c0_config1();
10388 if (!((config >> 7) & 3))
10389 panic("No TLB present");
10391 - c->tlbsize = ((reg >> 25) & 0x3f) + 1;
10392 + c->tlbsize = ((config1 >> 25) & 0x3f) + 1;
10395 void __init r4k_tlb_init(void)
10397 - u32 config = read_c0_config();
10398 + unsigned int config = read_c0_config();
10401 * You should never change this register:
10402 --- a/arch/mips64/defconfig
10403 +++ b/arch/mips64/defconfig
10404 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
10405 # CONFIG_MIPS_PB1000 is not set
10406 # CONFIG_MIPS_PB1100 is not set
10407 # CONFIG_MIPS_PB1500 is not set
10408 -# CONFIG_MIPS_HYDROGEN3 is not set
10409 # CONFIG_MIPS_PB1550 is not set
10410 +# CONFIG_MIPS_HYDROGEN3 is not set
10411 # CONFIG_MIPS_XXS1500 is not set
10412 # CONFIG_MIPS_MTX1 is not set
10413 # CONFIG_COGENT_CSB250 is not set
10414 @@ -470,9 +470,11 @@ CONFIG_SCSI_LOGGING=y
10415 # CONFIG_SCSI_MEGARAID is not set
10416 # CONFIG_SCSI_MEGARAID2 is not set
10417 # CONFIG_SCSI_SATA is not set
10418 +# CONFIG_SCSI_SATA_AHCI is not set
10419 # CONFIG_SCSI_SATA_SVW is not set
10420 # CONFIG_SCSI_ATA_PIIX is not set
10421 # CONFIG_SCSI_SATA_NV is not set
10422 +# CONFIG_SCSI_SATA_QSTOR is not set
10423 # CONFIG_SCSI_SATA_PROMISE is not set
10424 # CONFIG_SCSI_SATA_SX4 is not set
10425 # CONFIG_SCSI_SATA_SIL is not set
10426 @@ -658,7 +660,6 @@ CONFIG_SERIAL=y
10427 CONFIG_SERIAL_CONSOLE=y
10428 # CONFIG_SERIAL_EXTENDED is not set
10429 # CONFIG_SERIAL_NONSTANDARD is not set
10430 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
10431 CONFIG_UNIX98_PTYS=y
10432 CONFIG_UNIX98_PTY_COUNT=256
10434 --- a/arch/mips64/defconfig-atlas
10435 +++ b/arch/mips64/defconfig-atlas
10436 @@ -28,8 +28,8 @@ CONFIG_EXPERIMENTAL=y
10437 # CONFIG_MIPS_PB1000 is not set
10438 # CONFIG_MIPS_PB1100 is not set
10439 # CONFIG_MIPS_PB1500 is not set
10440 -# CONFIG_MIPS_HYDROGEN3 is not set
10441 # CONFIG_MIPS_PB1550 is not set
10442 +# CONFIG_MIPS_HYDROGEN3 is not set
10443 # CONFIG_MIPS_XXS1500 is not set
10444 # CONFIG_MIPS_MTX1 is not set
10445 # CONFIG_COGENT_CSB250 is not set
10446 @@ -232,11 +232,6 @@ CONFIG_IP_PNP=y
10448 # CONFIG_IPX is not set
10449 # CONFIG_ATALK is not set
10452 -# Appletalk devices
10454 -# CONFIG_DEV_APPLETALK is not set
10455 # CONFIG_DECNET is not set
10456 # CONFIG_BRIDGE is not set
10457 # CONFIG_X25 is not set
10458 @@ -314,9 +309,11 @@ CONFIG_SD_EXTRA_DEVS=40
10459 # CONFIG_SCSI_MEGARAID is not set
10460 # CONFIG_SCSI_MEGARAID2 is not set
10461 # CONFIG_SCSI_SATA is not set
10462 +# CONFIG_SCSI_SATA_AHCI is not set
10463 # CONFIG_SCSI_SATA_SVW is not set
10464 # CONFIG_SCSI_ATA_PIIX is not set
10465 # CONFIG_SCSI_SATA_NV is not set
10466 +# CONFIG_SCSI_SATA_QSTOR is not set
10467 # CONFIG_SCSI_SATA_PROMISE is not set
10468 # CONFIG_SCSI_SATA_SX4 is not set
10469 # CONFIG_SCSI_SATA_SIL is not set
10470 @@ -474,7 +471,6 @@ CONFIG_SERIAL=y
10471 CONFIG_SERIAL_CONSOLE=y
10472 # CONFIG_SERIAL_EXTENDED is not set
10473 # CONFIG_SERIAL_NONSTANDARD is not set
10474 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
10475 CONFIG_UNIX98_PTYS=y
10476 CONFIG_UNIX98_PTY_COUNT=256
10478 --- a/arch/mips64/defconfig-decstation
10479 +++ b/arch/mips64/defconfig-decstation
10480 @@ -28,8 +28,8 @@ CONFIG_EXPERIMENTAL=y
10481 # CONFIG_MIPS_PB1000 is not set
10482 # CONFIG_MIPS_PB1100 is not set
10483 # CONFIG_MIPS_PB1500 is not set
10484 -# CONFIG_MIPS_HYDROGEN3 is not set
10485 # CONFIG_MIPS_PB1550 is not set
10486 +# CONFIG_MIPS_HYDROGEN3 is not set
10487 # CONFIG_MIPS_XXS1500 is not set
10488 # CONFIG_MIPS_MTX1 is not set
10489 # CONFIG_COGENT_CSB250 is not set
10490 @@ -224,11 +224,6 @@ CONFIG_IP_PNP_BOOTP=y
10492 # CONFIG_IPX is not set
10493 # CONFIG_ATALK is not set
10496 -# Appletalk devices
10498 -# CONFIG_DEV_APPLETALK is not set
10499 # CONFIG_DECNET is not set
10500 # CONFIG_BRIDGE is not set
10501 # CONFIG_X25 is not set
10502 @@ -307,9 +302,11 @@ CONFIG_SCSI_DECNCR=y
10503 # CONFIG_SCSI_MEGARAID is not set
10504 # CONFIG_SCSI_MEGARAID2 is not set
10505 # CONFIG_SCSI_SATA is not set
10506 +# CONFIG_SCSI_SATA_AHCI is not set
10507 # CONFIG_SCSI_SATA_SVW is not set
10508 # CONFIG_SCSI_ATA_PIIX is not set
10509 # CONFIG_SCSI_SATA_NV is not set
10510 +# CONFIG_SCSI_SATA_QSTOR is not set
10511 # CONFIG_SCSI_SATA_PROMISE is not set
10512 # CONFIG_SCSI_SATA_SX4 is not set
10513 # CONFIG_SCSI_SATA_SIL is not set
10514 @@ -477,7 +474,6 @@ CONFIG_SERIAL_DEC=y
10515 CONFIG_SERIAL_DEC_CONSOLE=y
10516 # CONFIG_DZ is not set
10518 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
10519 CONFIG_UNIX98_PTYS=y
10520 CONFIG_UNIX98_PTY_COUNT=256
10522 --- a/arch/mips64/defconfig-ip22
10523 +++ b/arch/mips64/defconfig-ip22
10524 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
10525 # CONFIG_MIPS_PB1000 is not set
10526 # CONFIG_MIPS_PB1100 is not set
10527 # CONFIG_MIPS_PB1500 is not set
10528 -# CONFIG_MIPS_HYDROGEN3 is not set
10529 # CONFIG_MIPS_PB1550 is not set
10530 +# CONFIG_MIPS_HYDROGEN3 is not set
10531 # CONFIG_MIPS_XXS1500 is not set
10532 # CONFIG_MIPS_MTX1 is not set
10533 # CONFIG_COGENT_CSB250 is not set
10534 @@ -235,11 +235,6 @@ CONFIG_IP_PNP_BOOTP=y
10536 # CONFIG_IPX is not set
10537 # CONFIG_ATALK is not set
10540 -# Appletalk devices
10542 -# CONFIG_DEV_APPLETALK is not set
10543 # CONFIG_DECNET is not set
10544 # CONFIG_BRIDGE is not set
10545 # CONFIG_X25 is not set
10546 @@ -319,9 +314,11 @@ CONFIG_SGIWD93_SCSI=y
10547 # CONFIG_SCSI_MEGARAID is not set
10548 # CONFIG_SCSI_MEGARAID2 is not set
10549 # CONFIG_SCSI_SATA is not set
10550 +# CONFIG_SCSI_SATA_AHCI is not set
10551 # CONFIG_SCSI_SATA_SVW is not set
10552 # CONFIG_SCSI_ATA_PIIX is not set
10553 # CONFIG_SCSI_SATA_NV is not set
10554 +# CONFIG_SCSI_SATA_QSTOR is not set
10555 # CONFIG_SCSI_SATA_PROMISE is not set
10556 # CONFIG_SCSI_SATA_SX4 is not set
10557 # CONFIG_SCSI_SATA_SIL is not set
10558 @@ -488,7 +485,6 @@ CONFIG_SERIAL_NONSTANDARD=y
10559 # CONFIG_SERIAL_TXX9_CONSOLE is not set
10560 # CONFIG_TXX927_SERIAL is not set
10561 CONFIG_IP22_SERIAL=y
10562 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
10563 CONFIG_UNIX98_PTYS=y
10564 CONFIG_UNIX98_PTY_COUNT=256
10566 --- a/arch/mips64/defconfig-ip27
10567 +++ b/arch/mips64/defconfig-ip27
10568 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
10569 # CONFIG_MIPS_PB1000 is not set
10570 # CONFIG_MIPS_PB1100 is not set
10571 # CONFIG_MIPS_PB1500 is not set
10572 -# CONFIG_MIPS_HYDROGEN3 is not set
10573 # CONFIG_MIPS_PB1550 is not set
10574 +# CONFIG_MIPS_HYDROGEN3 is not set
10575 # CONFIG_MIPS_XXS1500 is not set
10576 # CONFIG_MIPS_MTX1 is not set
10577 # CONFIG_COGENT_CSB250 is not set
10578 @@ -470,9 +470,11 @@ CONFIG_SCSI_LOGGING=y
10579 # CONFIG_SCSI_MEGARAID is not set
10580 # CONFIG_SCSI_MEGARAID2 is not set
10581 # CONFIG_SCSI_SATA is not set
10582 +# CONFIG_SCSI_SATA_AHCI is not set
10583 # CONFIG_SCSI_SATA_SVW is not set
10584 # CONFIG_SCSI_ATA_PIIX is not set
10585 # CONFIG_SCSI_SATA_NV is not set
10586 +# CONFIG_SCSI_SATA_QSTOR is not set
10587 # CONFIG_SCSI_SATA_PROMISE is not set
10588 # CONFIG_SCSI_SATA_SX4 is not set
10589 # CONFIG_SCSI_SATA_SIL is not set
10590 @@ -658,7 +660,6 @@ CONFIG_SERIAL=y
10591 CONFIG_SERIAL_CONSOLE=y
10592 # CONFIG_SERIAL_EXTENDED is not set
10593 # CONFIG_SERIAL_NONSTANDARD is not set
10594 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
10595 CONFIG_UNIX98_PTYS=y
10596 CONFIG_UNIX98_PTY_COUNT=256
10598 --- a/arch/mips64/defconfig-jaguar
10599 +++ b/arch/mips64/defconfig-jaguar
10600 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
10601 # CONFIG_MIPS_PB1000 is not set
10602 # CONFIG_MIPS_PB1100 is not set
10603 # CONFIG_MIPS_PB1500 is not set
10604 -# CONFIG_MIPS_HYDROGEN3 is not set
10605 # CONFIG_MIPS_PB1550 is not set
10606 +# CONFIG_MIPS_HYDROGEN3 is not set
10607 # CONFIG_MIPS_XXS1500 is not set
10608 # CONFIG_MIPS_MTX1 is not set
10609 # CONFIG_COGENT_CSB250 is not set
10610 @@ -227,11 +227,6 @@ CONFIG_IP_PNP_DHCP=y
10612 # CONFIG_IPX is not set
10613 # CONFIG_ATALK is not set
10616 -# Appletalk devices
10618 -# CONFIG_DEV_APPLETALK is not set
10619 # CONFIG_DECNET is not set
10620 # CONFIG_BRIDGE is not set
10621 # CONFIG_X25 is not set
10622 @@ -403,7 +398,6 @@ CONFIG_SERIAL_NONSTANDARD=y
10623 # CONFIG_SERIAL_TXX9 is not set
10624 # CONFIG_SERIAL_TXX9_CONSOLE is not set
10625 # CONFIG_TXX927_SERIAL is not set
10626 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
10627 CONFIG_UNIX98_PTYS=y
10628 CONFIG_UNIX98_PTY_COUNT=256
10630 --- a/arch/mips64/defconfig-malta
10631 +++ b/arch/mips64/defconfig-malta
10632 @@ -22,16 +22,19 @@ CONFIG_KMOD=y
10634 # CONFIG_ACER_PICA_61 is not set
10635 # CONFIG_MIPS_BOSPORUS is not set
10636 +# CONFIG_MIPS_FICMMP is not set
10637 # CONFIG_MIPS_MIRAGE is not set
10638 # CONFIG_MIPS_DB1000 is not set
10639 # CONFIG_MIPS_DB1100 is not set
10640 # CONFIG_MIPS_DB1500 is not set
10641 # CONFIG_MIPS_DB1550 is not set
10642 +# CONFIG_MIPS_DB1200 is not set
10643 # CONFIG_MIPS_PB1000 is not set
10644 # CONFIG_MIPS_PB1100 is not set
10645 # CONFIG_MIPS_PB1500 is not set
10646 -# CONFIG_MIPS_HYDROGEN3 is not set
10647 # CONFIG_MIPS_PB1550 is not set
10648 +# CONFIG_MIPS_PB1200 is not set
10649 +# CONFIG_MIPS_HYDROGEN3 is not set
10650 # CONFIG_MIPS_XXS1500 is not set
10651 # CONFIG_MIPS_MTX1 is not set
10652 # CONFIG_COGENT_CSB250 is not set
10653 @@ -146,9 +149,9 @@ CONFIG_KCORE_ELF=y
10654 CONFIG_BINFMT_ELF=y
10655 CONFIG_MIPS32_COMPAT=y
10656 CONFIG_MIPS32_O32=y
10657 -# CONFIG_MIPS32_N32 is not set
10658 +CONFIG_MIPS32_N32=y
10659 CONFIG_BINFMT_ELF32=y
10660 -# CONFIG_BINFMT_MISC is not set
10661 +CONFIG_BINFMT_MISC=y
10662 # CONFIG_OOM_KILLER is not set
10663 # CONFIG_CMDLINE_BOOL is not set
10665 @@ -235,11 +238,6 @@ CONFIG_IP_PNP_BOOTP=y
10667 # CONFIG_IPX is not set
10668 # CONFIG_ATALK is not set
10671 -# Appletalk devices
10673 -# CONFIG_DEV_APPLETALK is not set
10674 # CONFIG_DECNET is not set
10675 # CONFIG_BRIDGE is not set
10676 # CONFIG_X25 is not set
10677 @@ -271,8 +269,83 @@ CONFIG_IP_PNP_BOOTP=y
10679 # ATA/IDE/MFM/RLL support
10681 -# CONFIG_IDE is not set
10685 +# IDE, ATA and ATAPI Block devices
10687 +CONFIG_BLK_DEV_IDE=y
10690 +# Please see Documentation/ide.txt for help/info on IDE drives
10692 +# CONFIG_BLK_DEV_HD_IDE is not set
10693 # CONFIG_BLK_DEV_HD is not set
10694 +# CONFIG_BLK_DEV_IDE_SATA is not set
10695 +CONFIG_BLK_DEV_IDEDISK=y
10696 +# CONFIG_IDEDISK_MULTI_MODE is not set
10697 +# CONFIG_IDEDISK_STROKE is not set
10698 +# CONFIG_BLK_DEV_IDECS is not set
10699 +# CONFIG_BLK_DEV_DELKIN is not set
10700 +CONFIG_BLK_DEV_IDECD=y
10701 +CONFIG_BLK_DEV_IDETAPE=y
10702 +CONFIG_BLK_DEV_IDEFLOPPY=y
10703 +# CONFIG_BLK_DEV_IDESCSI is not set
10704 +# CONFIG_IDE_TASK_IOCTL is not set
10707 +# IDE chipset support/bugfixes
10709 +# CONFIG_BLK_DEV_CMD640 is not set
10710 +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
10711 +# CONFIG_BLK_DEV_ISAPNP is not set
10712 +CONFIG_BLK_DEV_IDEPCI=y
10713 +CONFIG_BLK_DEV_GENERIC=y
10714 +CONFIG_IDEPCI_SHARE_IRQ=y
10715 +CONFIG_BLK_DEV_IDEDMA_PCI=y
10716 +# CONFIG_BLK_DEV_OFFBOARD is not set
10717 +CONFIG_BLK_DEV_IDEDMA_FORCED=y
10718 +CONFIG_IDEDMA_PCI_AUTO=y
10719 +# CONFIG_IDEDMA_ONLYDISK is not set
10720 +CONFIG_BLK_DEV_IDEDMA=y
10721 +# CONFIG_IDEDMA_PCI_WIP is not set
10722 +# CONFIG_BLK_DEV_ADMA100 is not set
10723 +# CONFIG_BLK_DEV_AEC62XX is not set
10724 +# CONFIG_BLK_DEV_ALI15X3 is not set
10725 +# CONFIG_WDC_ALI15X3 is not set
10726 +# CONFIG_BLK_DEV_AMD74XX is not set
10727 +# CONFIG_AMD74XX_OVERRIDE is not set
10728 +# CONFIG_BLK_DEV_ATIIXP is not set
10729 +# CONFIG_BLK_DEV_CMD64X is not set
10730 +# CONFIG_BLK_DEV_TRIFLEX is not set
10731 +# CONFIG_BLK_DEV_CY82C693 is not set
10732 +# CONFIG_BLK_DEV_CS5530 is not set
10733 +# CONFIG_BLK_DEV_HPT34X is not set
10734 +# CONFIG_HPT34X_AUTODMA is not set
10735 +# CONFIG_BLK_DEV_HPT366 is not set
10736 +CONFIG_BLK_DEV_PIIX=y
10737 +# CONFIG_BLK_DEV_NS87415 is not set
10738 +# CONFIG_BLK_DEV_OPTI621 is not set
10739 +# CONFIG_BLK_DEV_PDC202XX_OLD is not set
10740 +# CONFIG_PDC202XX_BURST is not set
10741 +# CONFIG_BLK_DEV_PDC202XX_NEW is not set
10742 +# CONFIG_BLK_DEV_RZ1000 is not set
10743 +# CONFIG_BLK_DEV_SC1200 is not set
10744 +# CONFIG_BLK_DEV_SVWKS is not set
10745 +# CONFIG_BLK_DEV_SIIMAGE is not set
10746 +# CONFIG_BLK_DEV_SIS5513 is not set
10747 +# CONFIG_BLK_DEV_SLC90E66 is not set
10748 +# CONFIG_BLK_DEV_TRM290 is not set
10749 +# CONFIG_BLK_DEV_VIA82CXXX is not set
10750 +# CONFIG_IDE_CHIPSETS is not set
10751 +CONFIG_IDEDMA_AUTO=y
10752 +# CONFIG_IDEDMA_IVB is not set
10753 +# CONFIG_DMA_NONPCI is not set
10754 +# CONFIG_BLK_DEV_ATARAID is not set
10755 +# CONFIG_BLK_DEV_ATARAID_PDC is not set
10756 +# CONFIG_BLK_DEV_ATARAID_HPT is not set
10757 +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
10758 +# CONFIG_BLK_DEV_ATARAID_SII is not set
10762 @@ -317,9 +390,11 @@ CONFIG_SD_EXTRA_DEVS=40
10763 # CONFIG_SCSI_MEGARAID is not set
10764 # CONFIG_SCSI_MEGARAID2 is not set
10765 # CONFIG_SCSI_SATA is not set
10766 +# CONFIG_SCSI_SATA_AHCI is not set
10767 # CONFIG_SCSI_SATA_SVW is not set
10768 # CONFIG_SCSI_ATA_PIIX is not set
10769 # CONFIG_SCSI_SATA_NV is not set
10770 +# CONFIG_SCSI_SATA_QSTOR is not set
10771 # CONFIG_SCSI_SATA_PROMISE is not set
10772 # CONFIG_SCSI_SATA_SX4 is not set
10773 # CONFIG_SCSI_SATA_SIL is not set
10774 @@ -477,7 +552,6 @@ CONFIG_SERIAL=y
10775 CONFIG_SERIAL_CONSOLE=y
10776 # CONFIG_SERIAL_EXTENDED is not set
10777 # CONFIG_SERIAL_NONSTANDARD is not set
10778 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
10779 CONFIG_UNIX98_PTYS=y
10780 CONFIG_UNIX98_PTY_COUNT=256
10782 --- a/arch/mips64/defconfig-ocelotc
10783 +++ b/arch/mips64/defconfig-ocelotc
10784 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
10785 # CONFIG_MIPS_PB1000 is not set
10786 # CONFIG_MIPS_PB1100 is not set
10787 # CONFIG_MIPS_PB1500 is not set
10788 -# CONFIG_MIPS_HYDROGEN3 is not set
10789 # CONFIG_MIPS_PB1550 is not set
10790 +# CONFIG_MIPS_HYDROGEN3 is not set
10791 # CONFIG_MIPS_XXS1500 is not set
10792 # CONFIG_MIPS_MTX1 is not set
10793 # CONFIG_COGENT_CSB250 is not set
10794 @@ -231,11 +231,6 @@ CONFIG_IP_PNP_DHCP=y
10796 # CONFIG_IPX is not set
10797 # CONFIG_ATALK is not set
10800 -# Appletalk devices
10802 -# CONFIG_DEV_APPLETALK is not set
10803 # CONFIG_DECNET is not set
10804 # CONFIG_BRIDGE is not set
10805 # CONFIG_X25 is not set
10806 @@ -453,7 +448,6 @@ CONFIG_SERIAL_NONSTANDARD=y
10807 # CONFIG_SERIAL_TXX9 is not set
10808 # CONFIG_SERIAL_TXX9_CONSOLE is not set
10809 # CONFIG_TXX927_SERIAL is not set
10810 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
10811 CONFIG_UNIX98_PTYS=y
10812 CONFIG_UNIX98_PTY_COUNT=256
10814 --- a/arch/mips64/defconfig-sb1250-swarm
10815 +++ b/arch/mips64/defconfig-sb1250-swarm
10816 @@ -30,8 +30,8 @@ CONFIG_KMOD=y
10817 # CONFIG_MIPS_PB1000 is not set
10818 # CONFIG_MIPS_PB1100 is not set
10819 # CONFIG_MIPS_PB1500 is not set
10820 -# CONFIG_MIPS_HYDROGEN3 is not set
10821 # CONFIG_MIPS_PB1550 is not set
10822 +# CONFIG_MIPS_HYDROGEN3 is not set
10823 # CONFIG_MIPS_XXS1500 is not set
10824 # CONFIG_MIPS_MTX1 is not set
10825 # CONFIG_COGENT_CSB250 is not set
10826 @@ -90,6 +90,7 @@ CONFIG_SIBYTE_CFE=y
10827 # CONFIG_SIBYTE_TBPROF is not set
10828 CONFIG_SIBYTE_GENBUS_IDE=y
10829 CONFIG_SMP_CAPABLE=y
10831 # CONFIG_SNI_RM200_PCI is not set
10832 # CONFIG_TANBAC_TB0226 is not set
10833 # CONFIG_TANBAC_TB0229 is not set
10834 @@ -253,11 +254,6 @@ CONFIG_INET=y
10836 # CONFIG_IPX is not set
10837 # CONFIG_ATALK is not set
10840 -# Appletalk devices
10842 -# CONFIG_DEV_APPLETALK is not set
10843 # CONFIG_DECNET is not set
10844 # CONFIG_BRIDGE is not set
10845 # CONFIG_X25 is not set
10846 @@ -432,7 +428,6 @@ CONFIG_SERIAL_NONSTANDARD=y
10847 CONFIG_SIBYTE_SB1250_DUART=y
10848 CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y
10849 CONFIG_SERIAL_CONSOLE=y
10850 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
10851 CONFIG_UNIX98_PTYS=y
10852 CONFIG_UNIX98_PTY_COUNT=256
10854 --- a/arch/mips64/defconfig-sead
10855 +++ b/arch/mips64/defconfig-sead
10856 @@ -28,8 +28,8 @@ CONFIG_EXPERIMENTAL=y
10857 # CONFIG_MIPS_PB1000 is not set
10858 # CONFIG_MIPS_PB1100 is not set
10859 # CONFIG_MIPS_PB1500 is not set
10860 -# CONFIG_MIPS_HYDROGEN3 is not set
10861 # CONFIG_MIPS_PB1550 is not set
10862 +# CONFIG_MIPS_HYDROGEN3 is not set
10863 # CONFIG_MIPS_XXS1500 is not set
10864 # CONFIG_MIPS_MTX1 is not set
10865 # CONFIG_COGENT_CSB250 is not set
10866 @@ -242,7 +242,6 @@ CONFIG_SERIAL=y
10867 CONFIG_SERIAL_CONSOLE=y
10868 # CONFIG_SERIAL_EXTENDED is not set
10869 # CONFIG_SERIAL_NONSTANDARD is not set
10870 -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
10871 # CONFIG_UNIX98_PTYS is not set
10874 --- a/arch/mips64/kernel/binfmt_elfn32.c
10875 +++ b/arch/mips64/kernel/binfmt_elfn32.c
10876 @@ -116,4 +116,7 @@ MODULE_AUTHOR("Ralf Baechle (ralf@linux-
10877 #undef MODULE_DESCRIPTION
10878 #undef MODULE_AUTHOR
10881 +#define TASK_SIZE TASK_SIZE32
10883 #include "../../../fs/binfmt_elf.c"
10884 --- a/arch/mips64/kernel/binfmt_elfo32.c
10885 +++ b/arch/mips64/kernel/binfmt_elfo32.c
10886 @@ -137,4 +137,7 @@ MODULE_AUTHOR("Ralf Baechle (ralf@linux-
10887 #undef MODULE_DESCRIPTION
10888 #undef MODULE_AUTHOR
10891 +#define TASK_SIZE TASK_SIZE32
10893 #include "../../../fs/binfmt_elf.c"
10894 --- a/arch/mips64/kernel/head.S
10895 +++ b/arch/mips64/kernel/head.S
10896 @@ -91,6 +91,21 @@ EXPORT(_stext)
10899 NESTED(kernel_entry, 16, sp) # kernel entry point
10902 + * For the moment disable interrupts, mark the kernel mode and
10903 + * set ST0_KX so that the CPU does not spit fire when using
10904 + * 64-bit addresses. A full initialization of the CPU's status
10905 + * register is done later in per_cpu_trap_init().
10907 + mfc0 t0, CP0_STATUS
10908 + or t0, ST0_CU0|ST0_KX|0x1f
10910 + mtc0 t0, CP0_STATUS
10916 ori sp, 0xf # align stack on 16 byte.
10918 @@ -103,8 +118,6 @@ NESTED(kernel_entry, 16, sp) # kernel
10922 - CLI # disable interrupts
10925 * The firmware/bootloader passes argc/argp/envp
10926 * to us as arguments. But clear bss first because
10927 @@ -125,6 +138,7 @@ NESTED(kernel_entry, 16, sp) # kernel
10928 dsubu sp, 4*SZREG # init stack pointer
10935 @@ -133,6 +147,23 @@ NESTED(kernel_entry, 16, sp) # kernel
10936 * function after setting up the stack and gp registers.
10938 NESTED(smp_bootstrap, 16, sp)
10941 + * For the moment disable interrupts and bootstrap exception
10942 + * vectors, mark the kernel mode and set ST0_KX so that the CPU
10943 + * does not spit fire when using 64-bit addresses. A full
10944 + * initialization of the CPU's status register is done later in
10945 + * per_cpu_trap_init().
10947 + mfc0 t0, CP0_STATUS
10948 + or t0, ST0_CU0|ST0_BEV|ST0_KX|0x1f
10949 + xor t0, ST0_BEV|0x1f
10950 + mtc0 t0, CP0_STATUS
10956 #ifdef CONFIG_SGI_IP27
10958 dli t0, KLDIR_OFFSET + (KLI_KERN_VARS * KLDIR_ENT_SIZE) + \
10959 @@ -146,19 +177,8 @@ NESTED(smp_bootstrap, 16, sp)
10961 #endif /* CONFIG_SGI_IP27 */
10966 - * For the moment set ST0_KU so the CPU will not spit fire when
10967 - * executing 64-bit instructions. The full initialization of the
10968 - * CPU's status register is done later in per_cpu_trap_init().
10970 - mfc0 t0, CP0_STATUS
10972 - mtc0 t0, CP0_STATUS
10974 jal start_secondary # XXX: IP27: cboot
10978 #endif /* CONFIG_SMP */
10980 --- a/arch/mips64/kernel/ioctl32.c
10981 +++ b/arch/mips64/kernel/ioctl32.c
10982 @@ -2352,7 +2352,7 @@ static struct ioctl32_list ioctl32_handl
10983 IOCTL32_HANDLER(AUTOFS_IOC_SETTIMEOUT32, ioc_settimeout),
10984 IOCTL32_DEFAULT(AUTOFS_IOC_EXPIRE),
10985 IOCTL32_DEFAULT(AUTOFS_IOC_EXPIRE_MULTI),
10986 - IOCTL32_DEFAULT(AUTOFS_IOC_PROTSUBVER),
10987 + IOCTL32_DEFAULT(AUTOFS_IOC_PROTOSUBVER),
10988 IOCTL32_DEFAULT(AUTOFS_IOC_ASKREGHOST),
10989 IOCTL32_DEFAULT(AUTOFS_IOC_TOGGLEREGHOST),
10990 IOCTL32_DEFAULT(AUTOFS_IOC_ASKUMOUNT),
10991 --- a/arch/mips64/kernel/linux32.c
10992 +++ b/arch/mips64/kernel/linux32.c
10993 @@ -1101,6 +1101,7 @@ do_readv_writev32(int type, struct file
10994 * specially as they have atomicity guarantees and can handle
10997 + inode = file->f_dentry->d_inode;
10998 if (inode->i_sock) {
11000 err = sock_readv_writev(type, inode, file, iov, count, tot_len);
11001 @@ -1187,72 +1188,19 @@ bad_file:
11002 lseek back to original location. They fail just like lseek does on
11003 non-seekable files. */
11005 -asmlinkage ssize_t sys32_pread(unsigned int fd, char * buf,
11006 - size_t count, u32 unused, u64 a4, u64 a5)
11007 +asmlinkage ssize_t sys32_pread(unsigned int fd, char *buf,
11008 + size_t count, u32 unused, u64 a4, u64 a5)
11011 - struct file * file;
11012 - ssize_t (*read)(struct file *, char *, size_t, loff_t *);
11019 - if (!(file->f_mode & FMODE_READ))
11021 - pos = merge_64(a4, a5);
11022 - ret = locks_verify_area(FLOCK_VERIFY_READ, file->f_dentry->d_inode,
11023 - file, pos, count);
11027 - if (!file->f_op || !(read = file->f_op->read))
11031 - ret = read(file, buf, count, &pos);
11033 - dnotify_parent(file->f_dentry, DN_ACCESS);
11038 + return sys_pread(fd, buf, count, merge_64(a4, a5));
11041 asmlinkage ssize_t sys32_pwrite(unsigned int fd, const char * buf,
11042 size_t count, u32 unused, u64 a4, u64 a5)
11045 - struct file * file;
11046 - ssize_t (*write)(struct file *, const char *, size_t, loff_t *);
11048 + return sys_pwrite(fd, buf, count, merge_64(a4, a5));
11055 - if (!(file->f_mode & FMODE_WRITE))
11057 - pos = merge_64(a4, a5);
11058 - ret = locks_verify_area(FLOCK_VERIFY_WRITE, file->f_dentry->d_inode,
11059 - file, pos, count);
11063 - if (!file->f_op || !(write = file->f_op->write))
11068 - ret = write(file, buf, count, &pos);
11070 - dnotify_parent(file->f_dentry, DN_MODIFY);
11077 * Ooo, nasty. We need here to frob 32-bit unsigned longs to
11078 * 64-bit unsigned longs.
11079 --- a/arch/mips64/kernel/process.c
11080 +++ b/arch/mips64/kernel/process.c
11081 @@ -125,6 +125,25 @@ int dump_fpu(struct pt_regs *regs, elf_f
11085 +void dump_regs(elf_greg_t *gp, struct pt_regs *regs)
11089 + for (i = 0; i < EF_REG0; i++)
11092 + for (i = 1; i <= 31; i++)
11093 + gp[EF_REG0 + i] = regs->regs[i];
11094 + gp[EF_REG26] = 0;
11095 + gp[EF_REG27] = 0;
11096 + gp[EF_LO] = regs->lo;
11097 + gp[EF_HI] = regs->hi;
11098 + gp[EF_CP0_EPC] = regs->cp0_epc;
11099 + gp[EF_CP0_BADVADDR] = regs->cp0_badvaddr;
11100 + gp[EF_CP0_STATUS] = regs->cp0_status;
11101 + gp[EF_CP0_CAUSE] = regs->cp0_cause;
11105 * Create a kernel thread
11107 --- a/arch/mips64/kernel/scall_64.S
11108 +++ b/arch/mips64/kernel/scall_64.S
11109 @@ -102,15 +102,14 @@ _64_reschedule:
11118 ld a0, PT_R4(sp) # Restore argument registers
11125 li t0, -EMAXERRNO - 1 # error?
11127 --- a/arch/mips64/kernel/scall_n32.S
11128 +++ b/arch/mips64/kernel/scall_n32.S
11129 @@ -106,15 +106,14 @@ n32_reschedule:
11138 ld a0, PT_R4(sp) # Restore argument registers
11145 li t0, -EMAXERRNO - 1 # error?
11147 --- a/arch/mips64/kernel/scall_o32.S
11148 +++ b/arch/mips64/kernel/scall_o32.S
11149 @@ -118,9 +118,8 @@ trace_a_syscall:
11158 ld a0, PT_R4(sp) # Restore argument registers
11160 @@ -129,7 +128,7 @@ trace_a_syscall:
11167 li t0, -EMAXERRNO - 1 # error?
11169 @@ -576,6 +575,8 @@ out: jr ra
11175 .macro sys function, nargs
11178 --- a/arch/mips64/kernel/setup.c
11179 +++ b/arch/mips64/kernel/setup.c
11180 @@ -129,14 +129,6 @@ asmlinkage void __init init_arch(int arg
11185 - * On IP27, I am seeing the TS bit set when the kernel is loaded.
11186 - * Maybe because the kernel is in ckseg0 and not xkphys? Clear it
11189 - clear_c0_status(ST0_BEV|ST0_TS|ST0_CU1|ST0_CU2|ST0_CU3);
11190 - set_c0_status(ST0_CU0|ST0_KX|ST0_SX|ST0_FR);
11195 --- a/arch/mips64/kernel/signal_n32.c
11196 +++ b/arch/mips64/kernel/signal_n32.c
11197 @@ -68,7 +68,7 @@ struct rt_sigframe_n32 {
11200 extern asmlinkage int restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc);
11201 -extern int inline setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc);
11202 +extern int setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc);
11204 asmlinkage void sysn32_rt_sigreturn(abi64_no_regargs, struct pt_regs regs)
11206 --- a/arch/mips64/kernel/traps.c
11207 +++ b/arch/mips64/kernel/traps.c
11208 @@ -462,9 +462,10 @@ static inline void simulate_ll(struct pt
11212 + compute_return_epc(regs);
11214 regs->regs[(opcode & RT) >> 16] = value;
11216 - compute_return_epc(regs);
11220 @@ -495,8 +496,8 @@ static inline void simulate_sc(struct pt
11223 if (ll_bit == 0 || ll_task != current) {
11224 - regs->regs[reg] = 0;
11225 compute_return_epc(regs);
11226 + regs->regs[reg] = 0;
11230 @@ -505,9 +506,9 @@ static inline void simulate_sc(struct pt
11234 + compute_return_epc(regs);
11235 regs->regs[reg] = 1;
11237 - compute_return_epc(regs);
11241 @@ -809,13 +810,18 @@ extern asmlinkage int fpu_emulator_resto
11242 void __init per_cpu_trap_init(void)
11244 unsigned int cpu = smp_processor_id();
11245 + unsigned int status_set = ST0_CU0|ST0_FR|ST0_KX|ST0_SX|ST0_UX;
11247 - /* Some firmware leaves the BEV flag set, clear it. */
11248 - clear_c0_status(ST0_CU1|ST0_CU2|ST0_CU3|ST0_BEV);
11249 - set_c0_status(ST0_CU0|ST0_FR|ST0_KX|ST0_SX|ST0_UX);
11252 + * Disable coprocessors, enable 64-bit addressing and set FPU
11253 + * for the 32/32 FPR register model. Reset the BEV flag that
11254 + * some firmware may have left set and the TS bit (for IP27).
11255 + * Set XX for ISA IV code to work.
11257 if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV)
11258 - set_c0_status(ST0_XX);
11259 + status_set |= ST0_XX;
11260 + change_c0_status(ST0_CU|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
11264 * Some MIPS CPUs have a dedicated interrupt vector which reduces the
11265 @@ -825,13 +831,11 @@ void __init per_cpu_trap_init(void)
11266 set_c0_cause(CAUSEF_IV);
11268 cpu_data[cpu].asid_cache = ASID_FIRST_VERSION;
11269 - write_c0_context(((long)(&pgd_current[cpu])) << 23);
11270 - write_c0_wired(0);
11271 + TLBMISS_HANDLER_SETUP();
11273 atomic_inc(&init_mm.mm_count);
11274 current->active_mm = &init_mm;
11277 + BUG_ON(current->mm);
11278 enter_lazy_tlb(&init_mm, current, cpu);
11281 @@ -842,8 +846,6 @@ void __init trap_init(void)
11282 extern char except_vec4;
11285 - per_cpu_trap_init();
11287 /* Copy the generic exception handlers to their final destination. */
11288 memcpy((void *) KSEG0 , &except_vec0_generic, 0x80);
11289 memcpy((void *)(KSEG0 + 0x180), &except_vec3_generic, 0x80);
11290 @@ -933,6 +935,5 @@ void __init trap_init(void)
11292 flush_icache_range(KSEG0, KSEG0 + 0x400);
11294 - atomic_inc(&init_mm.mm_count); /* XXX UP? */
11295 - current->active_mm = &init_mm;
11296 + per_cpu_trap_init();
11298 --- a/arch/mips64/mm/cerr-sb1.c
11299 +++ b/arch/mips64/mm/cerr-sb1.c
11300 @@ -252,14 +252,14 @@ static const uint8_t parity[256] = {
11302 /* Masks to select bits for Hamming parity, mask_72_64[i] for bit[i] */
11303 static const uint64_t mask_72_64[8] = {
11304 - 0x0738C808099264FFL,
11305 - 0x38C808099264FF07L,
11306 - 0xC808099264FF0738L,
11307 - 0x08099264FF0738C8L,
11308 - 0x099264FF0738C808L,
11309 - 0x9264FF0738C80809L,
11310 - 0x64FF0738C8080992L,
11311 - 0xFF0738C808099264L
11312 + 0x0738C808099264FFULL,
11313 + 0x38C808099264FF07ULL,
11314 + 0xC808099264FF0738ULL,
11315 + 0x08099264FF0738C8ULL,
11316 + 0x099264FF0738C808ULL,
11317 + 0x9264FF0738C80809ULL,
11318 + 0x64FF0738C8080992ULL,
11319 + 0xFF0738C808099264ULL
11322 /* Calculate the parity on a range of bits */
11323 @@ -331,9 +331,9 @@ static uint32_t extract_ic(unsigned shor
11324 ((lru >> 4) & 0x3),
11325 ((lru >> 6) & 0x3));
11327 - va = (taglo & 0xC0000FFFFFFFE000) | addr;
11328 + va = (taglo & 0xC0000FFFFFFFE000ULL) | addr;
11329 if ((taglo & (1 << 31)) && (((taglo >> 62) & 0x3) == 3))
11330 - va |= 0x3FFFF00000000000;
11331 + va |= 0x3FFFF00000000000ULL;
11332 valid = ((taghi >> 29) & 1);
11334 tlo_tmp = taglo & 0xfff3ff;
11335 @@ -474,7 +474,7 @@ static uint32_t extract_dc(unsigned shor
11336 : "r" ((way << 13) | addr));
11338 taglo = ((unsigned long long)taglohi << 32) | taglolo;
11339 - pa = (taglo & 0xFFFFFFE000) | addr;
11340 + pa = (taglo & 0xFFFFFFE000ULL) | addr;
11342 lru = (taghi >> 14) & 0xff;
11343 prom_printf("[Bank %d Set 0x%02x] LRU > %d %d %d %d > MRU\n",
11344 --- a/arch/mips64/mm/c-r4k.c
11345 +++ b/arch/mips64/mm/c-r4k.c
11346 @@ -867,9 +867,16 @@ static void __init probe_pcache(void)
11347 * normally they'd suffer from aliases but magic in the hardware deals
11348 * with that for us so we don't need to take care ourselves.
11350 - if (c->cputype != CPU_R10000 && c->cputype != CPU_R12000)
11351 - if (c->dcache.waysize > PAGE_SIZE)
11352 - c->dcache.flags |= MIPS_CACHE_ALIASES;
11353 + switch (c->cputype) {
11358 + if (!(read_c0_config7() & (1 << 16)))
11360 + if (c->dcache.waysize > PAGE_SIZE)
11361 + c->dcache.flags |= MIPS_CACHE_ALIASES;
11364 switch (c->cputype) {
11366 @@ -1070,9 +1077,6 @@ void __init ld_mmu_r4xx0(void)
11370 - if (c->dcache.sets * c->dcache.ways > PAGE_SIZE)
11371 - c->dcache.flags |= MIPS_CACHE_ALIASES;
11373 r4k_blast_dcache_page_setup();
11374 r4k_blast_dcache_page_indexed_setup();
11375 r4k_blast_dcache_setup();
11376 --- a/arch/mips64/mm/tlbex-r4k.S
11377 +++ b/arch/mips64/mm/tlbex-r4k.S
11378 @@ -125,6 +125,33 @@ LEAF(except_vec1_r4k)
11380 END(except_vec1_r4k)
11385 +LEAF(handle_vec1_r4k)
11387 + LOAD_PTE2 k1 k0 9f
11388 + ld k0, 0(k1) # get even pte
11389 + ld k1, 8(k1) # get odd pte
11396 +9: # handle the vmalloc range
11397 + LOAD_KPTE2 k1 k0 invalid_vmalloc_address
11398 + ld k0, 0(k1) # get even pte
11399 + ld k1, 8(k1) # get odd pte
11405 +END(handle_vec1_r4k)
11409 LEAF(except_vec1_sb1)
11411 dmfc0 k0, CP0_BADVADDR
11412 @@ -134,28 +161,24 @@ LEAF(except_vec1_sb1)
11416 - dla k0, handle_vec1_r4k
11417 + dla k0, handle_vec1_sb1
11423 END(except_vec1_sb1)
11428 -LEAF(handle_vec1_r4k)
11429 +LEAF(handle_vec1_sb1)
11432 ld k0, 0(k1) # get even pte
11433 ld k1, 8(k1) # get odd pte
11435 - rm9000_tlb_hazard
11439 - rm9000_tlb_hazard
11444 9: # handle the vmalloc range
11445 @@ -163,13 +186,10 @@ LEAF(handle_vec1_r4k)
11446 ld k0, 0(k1) # get even pte
11447 ld k1, 8(k1) # get odd pte
11449 - rm9000_tlb_hazard
11453 - rm9000_tlb_hazard
11457 -END(handle_vec1_r4k)
11458 +END(handle_vec1_sb1)
11462 @@ -195,10 +215,8 @@ LEAF(handle_vec1_r10k)
11463 ld k0, 0(k1) # get even pte
11464 ld k1, 8(k1) # get odd pte
11466 - rm9000_tlb_hazard
11470 - rm9000_tlb_hazard
11473 9: # handle the vmalloc range
11474 @@ -206,10 +224,8 @@ LEAF(handle_vec1_r10k)
11475 ld k0, 0(k1) # get even pte
11476 ld k1, 8(k1) # get odd pte
11478 - rm9000_tlb_hazard
11482 - rm9000_tlb_hazard
11484 END(handle_vec1_r10k)
11486 --- a/arch/mips64/mm/tlb-r4k.c
11487 +++ b/arch/mips64/mm/tlb-r4k.c
11490 - * Carsten Langgaard, carstenl@mips.com
11491 - * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved.
11493 - * This program is free software; you can distribute it and/or modify it
11494 - * under the terms of the GNU General Public License (Version 2) as
11495 - * published by the Free Software Foundation.
11497 - * This program is distributed in the hope it will be useful, but WITHOUT
11498 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11499 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11500 + * This file is subject to the terms and conditions of the GNU General Public
11501 + * License. See the file "COPYING" in the main directory of this archive
11502 * for more details.
11504 - * You should have received a copy of the GNU General Public License along
11505 - * with this program; if not, write to the Free Software Foundation, Inc.,
11506 - * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
11508 - * MIPS64 CPU variant specific MMU routines.
11509 - * These routine are not optimized in any way, they are done in a generic way
11510 - * so they can be used on all MIPS64 compliant CPUs, and also done in an
11511 - * attempt not to break anything for the R4xx0 style CPUs.
11512 + * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
11513 + * Copyright (C) 1997, 1998, 1999, 2000 Ralf Baechle ralf@gnu.org
11514 + * Carsten Langgaard, carstenl@mips.com
11515 + * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved.
11517 #include <linux/init.h>
11518 #include <linux/sched.h>
11520 #include <asm/pgtable.h>
11521 #include <asm/system.h>
11524 -#undef DEBUG_TLBUPDATE
11526 extern void except_vec1_r4k(void);
11528 /* CP0 hazard avoidance. */
11529 @@ -46,31 +31,23 @@ void local_flush_tlb_all(void)
11530 unsigned long old_ctx;
11534 - printk("[tlball]");
11537 local_irq_save(flags);
11538 /* Save old context and create impossible VPN2 value */
11539 old_ctx = read_c0_entryhi();
11540 - write_c0_entryhi(XKPHYS);
11541 write_c0_entrylo0(0);
11542 write_c0_entrylo1(0);
11545 entry = read_c0_wired();
11547 /* Blast 'em all away. */
11548 - while(entry < current_cpu_data.tlbsize) {
11549 - /* Make sure all entries differ. */
11550 - write_c0_entryhi(XKPHYS+entry*0x2000);
11551 + while (entry < current_cpu_data.tlbsize) {
11552 + write_c0_entryhi(XKPHYS + entry*0x2000);
11553 write_c0_index(entry);
11555 + mtc0_tlbw_hazard();
11556 tlb_write_indexed();
11561 + tlbw_use_hazard();
11562 write_c0_entryhi(old_ctx);
11563 local_irq_restore(flags);
11565 @@ -79,12 +56,8 @@ void local_flush_tlb_mm(struct mm_struct
11567 int cpu = smp_processor_id();
11569 - if (cpu_context(cpu, mm) != 0) {
11571 - printk("[tlbmm<%d>]", mm->context);
11573 + if (cpu_context(cpu, mm) != 0)
11574 drop_mmu_context(mm,cpu);
11578 void local_flush_tlb_range(struct mm_struct *mm, unsigned long start,
11579 @@ -96,10 +69,6 @@ void local_flush_tlb_range(struct mm_str
11580 unsigned long flags;
11584 - printk("[tlbrange<%02x,%08lx,%08lx>]", (mm->context & ASID_MASK),
11587 local_irq_save(flags);
11588 size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
11589 size = (size + 1) >> 1;
11590 @@ -110,25 +79,25 @@ void local_flush_tlb_range(struct mm_str
11591 start &= (PAGE_MASK << 1);
11592 end += ((PAGE_SIZE << 1) - 1);
11593 end &= (PAGE_MASK << 1);
11594 - while(start < end) {
11595 + while (start < end) {
11598 write_c0_entryhi(start | newpid);
11599 start += (PAGE_SIZE << 1);
11601 + mtc0_tlbw_hazard();
11604 idx = read_c0_index();
11605 write_c0_entrylo0(0);
11606 write_c0_entrylo1(0);
11610 /* Make sure all entries differ. */
11611 write_c0_entryhi(XKPHYS+idx*0x2000);
11613 + mtc0_tlbw_hazard();
11614 tlb_write_indexed();
11617 + tlbw_use_hazard();
11618 write_c0_entryhi(oldpid);
11620 drop_mmu_context(mm, cpu);
11621 @@ -145,28 +114,26 @@ void local_flush_tlb_page(struct vm_area
11622 unsigned long flags;
11623 unsigned long oldpid, newpid, idx;
11626 - printk("[tlbpage<%d,%08lx>]", vma->vm_mm->context, page);
11628 newpid = cpu_asid(cpu, vma->vm_mm);
11629 page &= (PAGE_MASK << 1);
11630 local_irq_save(flags);
11631 oldpid = read_c0_entryhi();
11632 write_c0_entryhi(page | newpid);
11634 + mtc0_tlbw_hazard();
11637 idx = read_c0_index();
11638 write_c0_entrylo0(0);
11639 write_c0_entrylo1(0);
11643 /* Make sure all entries differ. */
11644 write_c0_entryhi(XKPHYS+idx*0x2000);
11646 + mtc0_tlbw_hazard();
11647 tlb_write_indexed();
11648 + tlbw_use_hazard();
11652 write_c0_entryhi(oldpid);
11653 local_irq_restore(flags);
11655 @@ -186,7 +153,7 @@ void local_flush_tlb_one(unsigned long p
11657 local_irq_save(flags);
11658 write_c0_entryhi(page);
11660 + mtc0_tlbw_hazard();
11663 idx = read_c0_index();
11664 @@ -195,10 +162,12 @@ void local_flush_tlb_one(unsigned long p
11666 /* Make sure all entries differ. */
11667 write_c0_entryhi(KSEG0+idx*0x2000);
11668 + mtc0_tlbw_hazard();
11669 tlb_write_indexed();
11670 + tlbw_use_hazard();
11673 write_c0_entryhi(oldpid);
11675 local_irq_restore(flags);
11678 @@ -208,7 +177,6 @@ void local_flush_tlb_one(unsigned long p
11679 void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte)
11681 unsigned long flags;
11682 - unsigned int asid;
11686 @@ -222,70 +190,58 @@ void __update_tlb(struct vm_area_struct
11688 pid = read_c0_entryhi() & ASID_MASK;
11691 - if ((pid != (cpu_asid(smp_processor_id(), vma->vm_mm))) ||
11692 - (cpu_context(smp_processor_id(), vma->vm_mm) == 0)) {
11693 - printk("update_mmu_cache: Wheee, bogus tlbpid mmpid=%d"
11694 - "tlbpid=%d\n", (int) (cpu_context(smp_processor_id(),
11695 - vma->vm_mm) & ASID_MASK), pid);
11699 local_irq_save(flags);
11700 address &= (PAGE_MASK << 1);
11701 - write_c0_entryhi(address | (pid));
11702 + write_c0_entryhi(address | pid);
11703 pgdp = pgd_offset(vma->vm_mm, address);
11705 + mtc0_tlbw_hazard();
11708 pmdp = pmd_offset(pgdp, address);
11709 idx = read_c0_index();
11710 ptep = pte_offset(pmdp, address);
11712 write_c0_entrylo0(pte_val(*ptep++) >> 6);
11713 write_c0_entrylo1(pte_val(*ptep) >> 6);
11714 - write_c0_entryhi(address | (pid));
11717 + write_c0_entryhi(address | pid);
11718 + mtc0_tlbw_hazard();
11720 tlb_write_random();
11723 tlb_write_indexed();
11726 + tlbw_use_hazard();
11727 write_c0_entryhi(pid);
11729 local_irq_restore(flags);
11732 -void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
11733 - unsigned long entryhi, unsigned long pagemask)
11734 +void __init add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
11735 + unsigned long entryhi, unsigned long pagemask)
11737 - unsigned long flags;
11738 - unsigned long wired;
11739 - unsigned long old_pagemask;
11740 - unsigned long old_ctx;
11742 - local_irq_save(flags);
11743 - /* Save old context and create impossible VPN2 value */
11744 - old_ctx = (read_c0_entryhi() & ASID_MASK);
11745 - old_pagemask = read_c0_pagemask();
11746 - wired = read_c0_wired();
11747 - write_c0_wired(wired + 1);
11748 - write_c0_index(wired);
11750 - write_c0_pagemask(pagemask);
11751 - write_c0_entryhi(entryhi);
11752 - write_c0_entrylo0(entrylo0);
11753 - write_c0_entrylo1(entrylo1);
11755 - tlb_write_indexed();
11758 - write_c0_entryhi(old_ctx);
11760 - write_c0_pagemask(old_pagemask);
11761 - local_flush_tlb_all();
11762 - local_irq_restore(flags);
11763 + unsigned long flags;
11764 + unsigned long wired;
11765 + unsigned long old_pagemask;
11766 + unsigned long old_ctx;
11768 + local_irq_save(flags);
11769 + /* Save old context and create impossible VPN2 value */
11770 + old_ctx = read_c0_entryhi() & ASID_MASK;
11771 + old_pagemask = read_c0_pagemask();
11772 + wired = read_c0_wired();
11773 + write_c0_wired(wired + 1);
11774 + write_c0_index(wired);
11776 + write_c0_pagemask(pagemask);
11777 + write_c0_entryhi(entryhi);
11778 + write_c0_entrylo0(entrylo0);
11779 + write_c0_entrylo1(entrylo1);
11780 + mtc0_tlbw_hazard();
11781 + tlb_write_indexed();
11782 + tlbw_use_hazard();
11784 + write_c0_entryhi(old_ctx);
11786 + write_c0_pagemask(old_pagemask);
11787 + local_flush_tlb_all();
11788 + local_irq_restore(flags);
11792 @@ -317,17 +273,15 @@ __init int add_temporary_entry(unsigned
11795 write_c0_index(temp_tlb_entry);
11797 write_c0_pagemask(pagemask);
11798 write_c0_entryhi(entryhi);
11799 write_c0_entrylo0(entrylo0);
11800 write_c0_entrylo1(entrylo1);
11802 + mtc0_tlbw_hazard();
11803 tlb_write_indexed();
11805 + tlbw_use_hazard();
11807 write_c0_entryhi(old_ctx);
11809 write_c0_pagemask(old_pagemask);
11811 local_irq_restore(flags);
11812 @@ -348,15 +302,23 @@ static void __init probe_tlb(unsigned lo
11815 config1 = read_c0_config1();
11816 - if (!((config1 >> 7) & 3))
11817 - panic("No MMU present");
11818 + if (!((config >> 7) & 3))
11819 + panic("No TLB present");
11821 c->tlbsize = ((config1 >> 25) & 0x3f) + 1;
11824 void __init r4k_tlb_init(void)
11826 - unsigned long config = read_c0_config();
11827 + unsigned int config = read_c0_config();
11830 + * You should never change this register:
11831 + * - On R4600 1.7 the tlbp never hits for pages smaller than
11832 + * the value in the c0_pagemask register.
11833 + * - The entire mm handling assumes the c0_pagemask register to
11834 + * be set for 4kb pages.
11837 write_c0_pagemask(PM_DEFAULT_MASK);
11839 --- a/drivers/char/au1000_gpio.c
11840 +++ b/drivers/char/au1000_gpio.c
11841 @@ -246,7 +246,7 @@ static struct file_operations au1000gpio
11843 static struct miscdevice au1000gpio_miscdev =
11846 + MISC_DYNAMIC_MINOR,
11851 +++ b/drivers/char/au1550_psc_spi.c
11854 + * Driver for Alchemy Au1550 SPI on the PSC.
11856 + * Copyright 2004 Embedded Edge, LLC.
11857 + * dan@embeddededge.com
11859 + * This program is free software; you can redistribute it and/or modify it
11860 + * under the terms of the GNU General Public License as published by the
11861 + * Free Software Foundation; either version 2 of the License, or (at your
11862 + * option) any later version.
11864 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
11865 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
11866 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
11867 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
11868 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11869 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
11870 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
11871 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11872 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
11873 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11875 + * You should have received a copy of the GNU General Public License along
11876 + * with this program; if not, write to the Free Software Foundation, Inc.,
11877 + * 675 Mass Ave, Cambridge, MA 02139, USA.
11880 +#include <linux/module.h>
11881 +#include <linux/config.h>
11882 +#include <linux/types.h>
11883 +#include <linux/kernel.h>
11884 +#include <linux/miscdevice.h>
11885 +#include <linux/init.h>
11886 +#include <asm/uaccess.h>
11887 +#include <asm/io.h>
11888 +#include <asm/au1000.h>
11889 +#include <asm/au1550_spi.h>
11890 +#include <asm/au1xxx_psc.h>
11892 +#ifdef CONFIG_MIPS_PB1550
11893 +#include <asm/pb1550.h>
11896 +#ifdef CONFIG_MIPS_DB1550
11897 +#include <asm/db1x00.h>
11900 +#ifdef CONFIG_MIPS_PB1200
11901 +#include <asm/pb1200.h>
11904 +/* This is just a simple programmed I/O SPI interface on the PSC of the 1550.
11905 + * We support open, close, write, and ioctl. The SPI is a full duplex
11906 + * interface, you can't read without writing. So, the write system call
11907 + * copies the bytes out to the SPI, and whatever is returned is placed
11908 + * in the same buffer. Kinda weird, maybe we'll change it, but for now
11910 + * I didn't implement any DMA yet, and it's a debate about the necessity.
11911 + * The SPI clocks are usually quite fast, so data is sent/received as
11912 + * quickly as you can stuff the FIFO. The overhead of DMA and interrupts
11913 + * are usually far greater than the data transfer itself. If, however,
11914 + * we find applications that move large amounts of data, we may choose
11915 + * use the overhead of buffering and DMA to do the work.
11918 +/* The maximum clock rate specified in the manual is 2mHz.
11920 +#define MAX_BAUD_RATE (2 * 1000000)
11921 +#define PSC_INTCLK_RATE (32 * 1000000)
11925 +/* We have to know what the user requested for the data length
11926 + * so we know how to stuff the fifo. The FIFO is 32 bits wide,
11927 + * and we have to load it with the bits to go in a single transfer.
11929 +static uint spi_datalen;
11932 +au1550spi_master_done( int ms )
11935 + volatile psc_spi_t *sp;
11937 + sp = (volatile psc_spi_t *)SPI_PSC_BASE;
11939 + /* Loop until MD is set or timeout has expired */
11940 + while(!(sp->psc_spievent & PSC_SPIEVNT_MD) && timeout--) udelay(1000);
11945 + sp->psc_spievent |= PSC_SPIEVNT_MD;
11951 +au1550spi_open(struct inode *inode, struct file *file)
11958 + MOD_INC_USE_COUNT;
11964 +au1550spi_write(struct file *fp, const char *bp, size_t count, loff_t *ppos)
11967 + size_t rcount, retval;
11968 + unsigned char sb, *rp, *wp;
11969 + uint fifoword, pcr, stat;
11970 + volatile psc_spi_t *sp;
11972 + /* Get the number of bytes per transfer.
11974 + bytelen = ((spi_datalen - 1) / 8) + 1;
11976 + /* User needs to send us multiple of this count.
11978 + if ((count % bytelen) != 0)
11981 + rp = wp = (unsigned char *)bp;
11982 + retval = rcount = count;
11984 + /* Reset the FIFO.
11986 + sp = (volatile psc_spi_t *)SPI_PSC_BASE;
11987 + sp->psc_spipcr = (PSC_SPIPCR_RC | PSC_SPIPCR_TC);
11990 + pcr = sp->psc_spipcr;
11992 + } while (pcr != 0);
11994 + /* Prime the transmit FIFO.
11996 + while (count > 0) {
11998 + for (i=0; i<bytelen; i++) {
12000 + if (get_user(sb, wp) < 0)
12005 + count -= bytelen;
12007 + fifoword |= PSC_SPITXRX_LC;
12008 + sp->psc_spitxrx = fifoword;
12010 + stat = sp->psc_spistat;
12012 + if (stat & PSC_SPISTAT_TF)
12016 + /* Start the transfer.
12018 + sp->psc_spipcr = PSC_SPIPCR_MS;
12021 + /* Now, just keep the transmit fifo full and empty the receive.
12023 + while (count > 0) {
12024 + stat = sp->psc_spistat;
12026 + while ((stat & PSC_SPISTAT_RE) == 0) {
12027 + fifoword = sp->psc_spitxrx;
12029 + for (i=0; i<bytelen; i++) {
12030 + sb = fifoword & 0xff;
12031 + if (put_user(sb, rp) < 0)
12036 + rcount -= bytelen;
12037 + stat = sp->psc_spistat;
12040 + if ((stat & PSC_SPISTAT_TF) == 0) {
12042 + for (i=0; i<bytelen; i++) {
12044 + if (get_user(sb, wp) < 0)
12049 + count -= bytelen;
12051 + fifoword |= PSC_SPITXRX_LC;
12052 + sp->psc_spitxrx = fifoword;
12057 + /* All of the bytes for transmit have been written. Hang
12058 + * out waiting for any residual bytes that are yet to be
12059 + * read from the fifo.
12061 + while (rcount > 0) {
12062 + stat = sp->psc_spistat;
12064 + if ((stat & PSC_SPISTAT_RE) == 0) {
12065 + fifoword = sp->psc_spitxrx;
12067 + for (i=0; i<bytelen; i++) {
12068 + sb = fifoword & 0xff;
12069 + if (put_user(sb, rp) < 0)
12074 + rcount -= bytelen;
12078 + /* Wait for MasterDone event. 30ms timeout */
12079 + if (!au1550spi_master_done(30) ) retval = -EFAULT;
12084 +au1550spi_release(struct inode *inode, struct file *file)
12086 + MOD_DEC_USE_COUNT;
12093 +/* Set the baud rate closest to the request, then return the actual
12094 + * value we are using.
12097 +set_baud_rate(uint baud)
12099 + uint rate, tmpclk, brg, ctl, stat;
12100 + volatile psc_spi_t *sp;
12102 + /* For starters, the input clock is divided by two.
12104 + tmpclk = PSC_INTCLK_RATE/2;
12106 + rate = tmpclk / baud;
12108 + /* The dividers work as follows:
12109 + * baud = tmpclk / (2 * (brg + 1))
12111 + brg = (rate/2) - 1;
12113 + /* Test BRG to ensure it will fit into the 6 bits allocated.
12116 + /* Make sure the device is disabled while we make the change.
12118 + sp = (volatile psc_spi_t *)SPI_PSC_BASE;
12119 + ctl = sp->psc_spicfg;
12121 + sp->psc_spicfg = ctl & ~PSC_SPICFG_DE_ENABLE;
12123 + ctl = PSC_SPICFG_CLR_BAUD(ctl);
12124 + ctl |= PSC_SPICFG_SET_BAUD(brg);
12125 + sp->psc_spicfg = ctl;
12128 + /* If the device was running prior to getting here, wait for
12131 + if (ctl & PSC_SPICFG_DE_ENABLE) {
12133 + stat = sp->psc_spistat;
12135 + } while ((stat & PSC_SPISTAT_DR) == 0);
12138 + /* Return the actual value.
12140 + rate = tmpclk / (2 * (brg + 1));
12146 +set_word_len(uint len)
12149 + volatile psc_spi_t *sp;
12151 + if ((len < 4) || (len > 24))
12154 + /* Make sure the device is disabled while we make the change.
12156 + sp = (volatile psc_spi_t *)SPI_PSC_BASE;
12157 + ctl = sp->psc_spicfg;
12159 + sp->psc_spicfg = ctl & ~PSC_SPICFG_DE_ENABLE;
12161 + ctl = PSC_SPICFG_CLR_LEN(ctl);
12162 + ctl |= PSC_SPICFG_SET_LEN(len);
12163 + sp->psc_spicfg = ctl;
12166 + /* If the device was running prior to getting here, wait for
12169 + if (ctl & PSC_SPICFG_DE_ENABLE) {
12171 + stat = sp->psc_spistat;
12173 + } while ((stat & PSC_SPISTAT_DR) == 0);
12180 +au1550spi_ioctl(struct inode *inode, struct file *file,
12181 + unsigned int cmd, unsigned long arg)
12189 + case AU1550SPI_WORD_LEN:
12190 + status = set_word_len(arg);
12193 + case AU1550SPI_SET_BAUD:
12194 + if (get_user(val, (u32 *)arg))
12197 + val = set_baud_rate(val);
12198 + if (put_user(val, (u32 *)arg))
12203 + status = -ENOIOCTLCMD;
12211 +static struct file_operations au1550spi_fops =
12213 + owner: THIS_MODULE,
12214 + write: au1550spi_write,
12215 + ioctl: au1550spi_ioctl,
12216 + open: au1550spi_open,
12217 + release: au1550spi_release,
12221 +static struct miscdevice au1550spi_miscdev =
12223 + MISC_DYNAMIC_MINOR,
12230 +au1550spi_init(void)
12232 + uint clk, rate, stat;
12233 + volatile psc_spi_t *sp;
12235 + /* Wire up Freq3 as a clock for the SPI. The PSC does
12236 + * factor of 2 divisor, so run a higher rate so we can
12237 + * get some granularity to the clock speeds.
12238 + * We can't do this in board set up because the frequency
12239 + * is computed too late.
12241 + rate = get_au1x00_speed();
12242 + rate /= PSC_INTCLK_RATE;
12244 + /* The FRDIV in the frequency control is (FRDIV + 1) * 2
12248 + clk = au_readl(SYS_FREQCTRL1);
12250 + clk &= ~SYS_FC_FRDIV3_MASK;
12251 + clk |= (rate << SYS_FC_FRDIV3_BIT);
12252 + clk |= SYS_FC_FE3;
12253 + au_writel(clk, SYS_FREQCTRL1);
12256 + /* Set up the clock source routing to get Freq3 to PSC0_intclk.
12258 + clk = au_readl(SYS_CLKSRC);
12262 + au_writel(clk, SYS_CLKSRC);
12265 + /* Set up GPIO pin function to drive PSC0_SYNC1, which is
12266 + * the SPI Select.
12268 + clk = au_readl(SYS_PINFUNC);
12271 + au_writel(clk, SYS_PINFUNC);
12274 + /* Now, set up the PSC for SPI PIO mode.
12276 + sp = (volatile psc_spi_t *)SPI_PSC_BASE;
12277 + sp->psc_ctrl = PSC_CTRL_DISABLE;
12279 + sp->psc_sel = PSC_SEL_PS_SPIMODE;
12280 + sp->psc_spicfg = 0;
12282 + sp->psc_ctrl = PSC_CTRL_ENABLE;
12285 + stat = sp->psc_spistat;
12287 + } while ((stat & PSC_SPISTAT_SR) == 0);
12289 + sp->psc_spicfg = (PSC_SPICFG_RT_FIFO8 | PSC_SPICFG_TT_FIFO8 |
12290 + PSC_SPICFG_DD_DISABLE | PSC_SPICFG_MO);
12291 + sp->psc_spicfg |= PSC_SPICFG_SET_LEN(8);
12293 + sp->psc_spimsk = PSC_SPIMSK_ALLMASK;
12296 + set_baud_rate(1000000);
12298 + sp->psc_spicfg |= PSC_SPICFG_DE_ENABLE;
12300 + stat = sp->psc_spistat;
12302 + } while ((stat & PSC_SPISTAT_DR) == 0);
12304 + misc_register(&au1550spi_miscdev);
12305 + printk("Au1550 SPI driver\n");
12311 +au1550spi_exit(void)
12313 + misc_deregister(&au1550spi_miscdev);
12317 +module_init(au1550spi_init);
12318 +module_exit(au1550spi_exit);
12319 --- a/drivers/char/Config.in
12320 +++ b/drivers/char/Config.in
12321 @@ -320,14 +320,11 @@ fi
12322 if [ "$CONFIG_OBSOLETE" = "y" -a "$CONFIG_ALPHA_BOOK1" = "y" ]; then
12323 bool 'Tadpole ANA H8 Support (OBSOLETE)' CONFIG_H8
12325 -if [ "$CONFIG_MIPS" = "y" -a "$CONFIG_NEW_TIME_C" = "y" ]; then
12326 - tristate 'Generic MIPS RTC Support' CONFIG_MIPS_RTC
12328 if [ "$CONFIG_SGI_IP22" = "y" ]; then
12329 - bool 'SGI DS1286 RTC support' CONFIG_SGI_DS1286
12330 + tristate 'Dallas DS1286 RTC support' CONFIG_DS1286
12332 if [ "$CONFIG_SGI_IP27" = "y" ]; then
12333 - bool 'SGI M48T35 RTC support' CONFIG_SGI_IP27_RTC
12334 + tristate 'SGI M48T35 RTC support' CONFIG_SGI_IP27_RTC
12336 if [ "$CONFIG_TOSHIBA_RBTX4927" = "y" -o "$CONFIG_TOSHIBA_JMR3927" = "y" ]; then
12337 tristate 'Dallas DS1742 RTC support' CONFIG_DS1742
12338 @@ -390,6 +387,11 @@ if [ "$CONFIG_DRM" = "y" ]; then
12339 source drivers/char/drm/Config.in
12343 +if [ "$CONFIG_X86" = "y" ]; then
12344 + tristate 'ACP Modem (Mwave) support' CONFIG_MWAVE
12349 if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
12350 @@ -398,6 +400,7 @@ fi
12351 if [ "$CONFIG_SOC_AU1X00" = "y" ]; then
12352 tristate ' Alchemy Au1x00 GPIO device support' CONFIG_AU1X00_GPIO
12353 tristate ' Au1000/ADS7846 touchscreen support' CONFIG_TS_AU1X00_ADS7846
12354 + #tristate ' Alchemy Au1550 PSC SPI support' CONFIG_AU1550_PSC_SPI
12356 if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
12357 tristate ' ITE GPIO' CONFIG_ITE_GPIO
12358 --- a/drivers/char/decserial.c
12359 +++ b/drivers/char/decserial.c
12361 * choose the right serial device at boot time
12363 * triemer 6-SEP-1998
12364 - * sercons.c is designed to allow the three different kinds
12365 + * sercons.c is designed to allow the three different kinds
12366 * of serial devices under the decstation world to co-exist
12367 - * in the same kernel. The idea here is to abstract
12368 + * in the same kernel. The idea here is to abstract
12369 * the pieces of the drivers that are common to this file
12370 * so that they do not clash at compile time and runtime.
12372 * HK 16-SEP-1998 v0.002
12373 * removed the PROM console as this is not a real serial
12374 * device. Added support for PROM console in drivers/char/tty_io.c
12375 - * instead. Although it may work to enable more than one
12376 + * instead. Although it may work to enable more than one
12377 * console device I strongly recommend to use only one.
12379 + * Copyright (C) 2004 Maciej W. Rozycki
12382 #include <linux/config.h>
12383 +#include <linux/errno.h>
12384 #include <linux/init.h>
12386 #include <asm/dec/machtype.h>
12387 +#include <asm/dec/serial.h>
12389 +extern int register_zs_hook(unsigned int channel,
12390 + struct dec_serial_hook *hook);
12391 +extern int unregister_zs_hook(unsigned int channel);
12393 +extern int register_dz_hook(unsigned int channel,
12394 + struct dec_serial_hook *hook);
12395 +extern int unregister_dz_hook(unsigned int channel);
12397 +int register_dec_serial_hook(unsigned int channel,
12398 + struct dec_serial_hook *hook)
12401 -extern int zs_init(void);
12403 + return register_zs_hook(channel, hook);
12407 -extern int dz_init(void);
12409 + return register_dz_hook(channel, hook);
12414 -#ifdef CONFIG_SERIAL_DEC_CONSOLE
12416 +int unregister_dec_serial_hook(unsigned int channel)
12419 -extern void zs_serial_console_init(void);
12421 + return unregister_zs_hook(channel);
12425 -extern void dz_serial_console_init(void);
12429 + return unregister_dz_hook(channel);
12434 -/* rs_init - starts up the serial interface -
12435 - handle normal case of starting up the serial interface */
12437 -#ifdef CONFIG_SERIAL_DEC
12438 +extern int zs_init(void);
12439 +extern int dz_init(void);
12442 + * rs_init - starts up the serial interface -
12443 + * handle normal case of starting up the serial interface
12445 int __init rs_init(void)
12448 -#if defined(CONFIG_ZS) && defined(CONFIG_DZ)
12450 - return zs_init();
12452 - return dz_init();
12456 - return zs_init();
12458 + return zs_init();
12462 - return dz_init();
12466 + return dz_init();
12471 __initcall(rs_init);
12475 #ifdef CONFIG_SERIAL_DEC_CONSOLE
12477 -/* dec_serial_console_init handles the special case of starting
12478 - * up the console on the serial port
12479 +extern void zs_serial_console_init(void);
12480 +extern void dz_serial_console_init(void);
12483 + * dec_serial_console_init handles the special case of starting
12484 + * up the console on the serial port
12486 void __init dec_serial_console_init(void)
12488 -#if defined(CONFIG_ZS) && defined(CONFIG_DZ)
12490 - zs_serial_console_init();
12492 - dz_serial_console_init();
12496 - zs_serial_console_init();
12498 + zs_serial_console_init();
12502 - dz_serial_console_init();
12506 + dz_serial_console_init();
12510 --- a/drivers/char/ds1286.c
12511 +++ b/drivers/char/ds1286.c
12514 * DS1286 Real Time Clock interface for Linux
12516 + * Copyright (C) 2003 TimeSys Corp.
12517 + * S. James Hill (James.Hill@timesys.com)
12518 + * (sjhill@realitydiluted.com)
12520 * Copyright (C) 1998, 1999, 2000 Ralf Baechle
12522 * Based on code written by Paul Gortmaker.
12524 #include <linux/types.h>
12525 #include <linux/errno.h>
12526 #include <linux/miscdevice.h>
12527 +#include <linux/module.h>
12528 #include <linux/slab.h>
12529 #include <linux/ioport.h>
12530 #include <linux/fcntl.h>
12531 @@ -95,6 +100,12 @@ static ssize_t ds1286_read(struct file *
12535 +void rtc_ds1286_wait(void)
12537 + unsigned char sec = CMOS_READ(RTC_SECONDS);
12538 + while (sec == CMOS_READ(RTC_SECONDS));
12541 static int ds1286_ioctl(struct inode *inode, struct file *file,
12542 unsigned int cmd, unsigned long arg)
12544 @@ -249,23 +260,22 @@ static int ds1286_open(struct inode *ino
12546 spin_lock_irq(&ds1286_lock);
12548 - if (ds1286_status & RTC_IS_OPEN)
12550 + if (ds1286_status & RTC_IS_OPEN) {
12551 + spin_unlock_irq(&ds1286_lock);
12555 ds1286_status |= RTC_IS_OPEN;
12557 - spin_lock_irq(&ds1286_lock);
12558 + spin_unlock_irq(&ds1286_lock);
12562 - spin_lock_irq(&ds1286_lock);
12566 static int ds1286_release(struct inode *inode, struct file *file)
12568 + spin_lock_irq(&ds1286_lock);
12569 ds1286_status &= ~RTC_IS_OPEN;
12571 + spin_unlock_irq(&ds1286_lock);
12575 @@ -276,32 +286,6 @@ static unsigned int ds1286_poll(struct f
12580 - * The various file operations we support.
12583 -static struct file_operations ds1286_fops = {
12584 - .llseek = no_llseek,
12585 - .read = ds1286_read,
12586 - .poll = ds1286_poll,
12587 - .ioctl = ds1286_ioctl,
12588 - .open = ds1286_open,
12589 - .release = ds1286_release,
12592 -static struct miscdevice ds1286_dev=
12594 - .minor = RTC_MINOR,
12596 - .fops = &ds1286_fops,
12599 -int __init ds1286_init(void)
12601 - printk(KERN_INFO "DS1286 Real Time Clock Driver v%s\n", DS1286_VERSION);
12602 - return misc_register(&ds1286_dev);
12605 static char *days[] = {
12606 "***", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
12608 @@ -528,3 +512,38 @@ void ds1286_get_alm_time(struct rtc_time
12609 BCD_TO_BIN(alm_tm->tm_hour);
12610 alm_tm->tm_sec = 0;
12613 +static struct file_operations ds1286_fops = {
12614 + .owner = THIS_MODULE,
12615 + .llseek = no_llseek,
12616 + .read = ds1286_read,
12617 + .poll = ds1286_poll,
12618 + .ioctl = ds1286_ioctl,
12619 + .open = ds1286_open,
12620 + .release = ds1286_release,
12623 +static struct miscdevice ds1286_dev =
12625 + .minor = RTC_MINOR,
12627 + .fops = &ds1286_fops,
12630 +static int __init ds1286_init(void)
12632 + printk(KERN_INFO "DS1286 Real Time Clock Driver v%s\n", DS1286_VERSION);
12633 + return misc_register(&ds1286_dev);
12636 +static void __exit ds1286_exit(void)
12638 + misc_deregister(&ds1286_dev);
12641 +module_init(ds1286_init);
12642 +module_exit(ds1286_exit);
12643 +EXPORT_NO_SYMBOLS;
12645 +MODULE_AUTHOR("Ralf Baechle");
12646 +MODULE_LICENSE("GPL");
12647 --- a/drivers/char/ds1742.c
12648 +++ b/drivers/char/ds1742.c
12649 @@ -142,6 +142,7 @@ static int rtc_ds1742_set_time(unsigned
12650 CMOS_WRITE(RTC_WRITE, RTC_CONTROL);
12653 + memset(&tm, 0, sizeof(struct rtc_time));
12656 /* check each field one by one */
12657 @@ -216,6 +217,7 @@ static int get_ds1742_status(char *buf)
12658 unsigned long curr_time;
12660 curr_time = rtc_ds1742_get_time();
12661 + memset(&tm, 0, sizeof(struct rtc_time));
12662 to_tm(curr_time, &tm);
12665 @@ -251,8 +253,8 @@ static int ds1742_read_proc(char *page,
12667 void rtc_ds1742_wait(void)
12669 - while (CMOS_READ(RTC_SECONDS) & 1);
12670 - while (!(CMOS_READ(RTC_SECONDS) & 1));
12671 + unsigned char sec = CMOS_READ(RTC_SECONDS);
12672 + while (sec == CMOS_READ(RTC_SECONDS));
12675 static int ds1742_ioctl(struct inode *inode, struct file *file,
12676 @@ -264,6 +266,7 @@ static int ds1742_ioctl(struct inode *in
12678 case RTC_RD_TIME: /* Read the time/date from RTC */
12679 curr_time = rtc_ds1742_get_time();
12680 + memset(&rtc_tm, 0, sizeof(struct rtc_time));
12681 to_tm(curr_time, &rtc_tm);
12682 rtc_tm.tm_year -= 1900;
12683 return copy_to_user((void *) arg, &rtc_tm, sizeof(rtc_tm)) ?
12684 --- a/drivers/char/dummy_keyb.c
12685 +++ b/drivers/char/dummy_keyb.c
12686 @@ -141,3 +141,7 @@ void __init kbd_init_hw(void)
12688 printk("Dummy keyboard driver installed.\n");
12690 +#ifdef CONFIG_MAGIC_SYSRQ
12691 +unsigned char kbd_sysrq_key;
12692 +unsigned char kbd_sysrq_xlate[128];
12694 --- a/drivers/char/dz.c
12695 +++ b/drivers/char/dz.c
12698 - * dz.c: Serial port driver for DECStations equiped
12699 + * dz.c: Serial port driver for DECstations equipped
12700 * with the DZ chipset.
12702 * Copyright (C) 1998 Olivier A. D. Lebaillif
12704 * Email: olivier.lebaillif@ifrsys.com
12706 + * Copyright (C) 2004 Maciej W. Rozycki
12708 * [31-AUG-98] triemer
12709 * Changed IRQ to use Harald's dec internals interrupts.h
12710 * removed base_addr code - moving address assignment to setup.c
12714 #include <linux/config.h>
12715 +#include <linux/delay.h>
12716 #include <linux/version.h>
12717 #include <linux/kernel.h>
12718 #include <linux/sched.h>
12719 @@ -54,33 +57,56 @@
12720 #include <asm/system.h>
12721 #include <asm/uaccess.h>
12723 -#define CONSOLE_LINE (3) /* for definition of struct console */
12724 +#ifdef CONFIG_MAGIC_SYSRQ
12725 +#include <linux/sysrq.h>
12730 -#define DZ_INTR_DEBUG 1
12732 DECLARE_TASK_QUEUE(tq_serial);
12734 -static struct dz_serial *lines[4];
12735 -static unsigned char tmp_buffer[256];
12736 +static struct dz_serial multi[DZ_NB_PORT]; /* Four serial lines in the DZ chip */
12737 +static struct tty_driver serial_driver, callout_driver;
12739 +static struct tty_struct *serial_table[DZ_NB_PORT];
12740 +static struct termios *serial_termios[DZ_NB_PORT];
12741 +static struct termios *serial_termios_locked[DZ_NB_PORT];
12743 +static int serial_refcount;
12747 - * debugging code to send out chars via prom
12748 + * tmp_buf is used as a temporary buffer by serial_write. We need to
12749 + * lock it in case the copy_from_user blocks while swapping in a page,
12750 + * and some other program tries to do a serial write at the same time.
12751 + * Since the lock will only come under contention when the system is
12752 + * swapping and available memory is low, it makes sense to share one
12753 + * buffer across all the serial ports, since it significantly saves
12754 + * memory if large numbers of serial ports are open.
12756 -static void debug_console(const char *s, int count)
12759 +static unsigned char *tmp_buf;
12760 +static DECLARE_MUTEX(tmp_buf_sem);
12762 - for (i = 0; i < count; i++) {
12764 - prom_printf("%c", 13);
12765 - prom_printf("%c", *s++);
12768 +static char *dz_name __initdata = "DECstation DZ serial driver version ";
12769 +static char *dz_version __initdata = "1.03";
12771 +static struct dz_serial *lines[DZ_NB_PORT];
12772 +static unsigned char tmp_buffer[256];
12774 +#ifdef CONFIG_SERIAL_DEC_CONSOLE
12775 +static struct console dz_sercons;
12777 +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
12779 +static unsigned long break_pressed; /* break, really ... */
12782 +static void change_speed (struct dz_serial *);
12784 +static int baud_table[] = {
12785 + 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
12790 * ------------------------------------------------------------
12791 * dz_in () and dz_out ()
12792 @@ -94,15 +120,16 @@ static inline unsigned short dz_in(struc
12794 volatile unsigned short *addr =
12795 (volatile unsigned short *) (info->port + offset);
12800 static inline void dz_out(struct dz_serial *info, unsigned offset,
12801 unsigned short value)
12804 volatile unsigned short *addr =
12805 (volatile unsigned short *) (info->port + offset);
12810 @@ -143,25 +170,24 @@ static void dz_start(struct tty_struct *
12812 tmp |= mask; /* set the TX flag */
12813 dz_out(info, DZ_TCR, tmp);
12818 * ------------------------------------------------------------
12819 - * Here starts the interrupt handling routines. All of the
12820 - * following subroutines are declared as inline and are folded
12821 - * into dz_interrupt. They were separated out for readability's
12824 - * Note: rs_interrupt() is a "fast" interrupt, which means that it
12825 + * Here starts the interrupt handling routines. All of the following
12826 + * subroutines are declared as inline and are folded into
12827 + * dz_interrupt(). They were separated out for readability's sake.
12829 + * Note: dz_interrupt() is a "fast" interrupt, which means that it
12830 * runs with interrupts turned off. People who may want to modify
12831 - * rs_interrupt() should try to keep the interrupt handler as fast as
12832 + * dz_interrupt() should try to keep the interrupt handler as fast as
12833 * possible. After you are done making modifications, it is not a bad
12836 * gcc -S -DKERNEL -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer dz.c
12838 - * and look at the resulting assemble code in serial.s.
12839 + * and look at the resulting assemble code in dz.s.
12841 * ------------------------------------------------------------
12843 @@ -188,101 +214,97 @@ static inline void dz_sched_event(struct
12844 * This routine deals with inputs from any lines.
12845 * ------------------------------------------------------------
12847 -static inline void receive_chars(struct dz_serial *info_in)
12848 +static inline void receive_chars(struct dz_serial *info_in,
12849 + struct pt_regs *regs)
12852 struct dz_serial *info;
12853 - struct tty_struct *tty = 0;
12854 + struct tty_struct *tty;
12855 struct async_icount *icount;
12857 - unsigned short status, tmp;
12858 - unsigned char ch;
12860 - /* this code is going to be a problem...
12861 - the call to tty_flip_buffer is going to need
12862 - to be rethought...
12865 - status = dz_in(info_in, DZ_RBUF);
12866 - info = lines[LINE(status)];
12867 + int lines_rx[DZ_NB_PORT] = { [0 ... DZ_NB_PORT - 1] = 0 };
12868 + unsigned short status;
12869 + unsigned char ch, flag;
12872 - /* punt so we don't get duplicate characters */
12873 - if (!(status & DZ_DVAL))
12874 - goto ignore_char;
12876 - ch = UCHAR(status); /* grab the char */
12879 - if (info->is_console) {
12881 - return; /* it's a break ... */
12884 + while ((status = dz_in(info_in, DZ_RBUF)) & DZ_DVAL) {
12885 + info = lines[LINE(status)];
12886 + tty = info->tty; /* point to the proper dev */
12888 - tty = info->tty; /* now tty points to the proper dev */
12889 - icount = &info->icount;
12890 + ch = UCHAR(status); /* grab the char */
12894 - if (tty->flip.count >= TTY_FLIPBUF_SIZE)
12896 + if (!tty && (!info->hook || !info->hook->rx_char))
12899 - *tty->flip.char_buf_ptr = ch;
12900 - *tty->flip.flag_buf_ptr = 0;
12901 + icount = &info->icount;
12904 - /* keep track of the statistics */
12905 - if (status & (DZ_OERR | DZ_FERR | DZ_PERR)) {
12906 - if (status & DZ_PERR) /* parity error */
12907 - icount->parity++;
12908 - else if (status & DZ_FERR) /* frame error */
12910 - if (status & DZ_OERR) /* overrun error */
12911 - icount->overrun++;
12913 - /* check to see if we should ignore the character
12914 - and mask off conditions that should be ignored
12916 + if (status & DZ_FERR) { /* frame error */
12918 + * There is no separate BREAK status bit, so
12919 + * treat framing errors as BREAKs for Magic SysRq
12920 + * and SAK; normally, otherwise.
12923 - if (status & info->ignore_status_mask) {
12924 - if (++ignore > 100)
12926 - goto ignore_char;
12927 +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
12929 + if (info->line == dz_sercons.index) {
12930 + if (!break_pressed)
12931 + break_pressed = jiffies;
12934 - /* mask off the error conditions we want to ignore */
12935 - tmp = status & info->read_status_mask;
12937 - if (tmp & DZ_PERR) {
12938 - *tty->flip.flag_buf_ptr = TTY_PARITY;
12940 - debug_console("PERR\n", 5);
12942 - } else if (tmp & DZ_FERR) {
12943 - *tty->flip.flag_buf_ptr = TTY_FRAME;
12945 - debug_console("FERR\n", 5);
12947 + flag = TTY_BREAK;
12948 + if (info->flags & DZ_SAK)
12951 + flag = TTY_FRAME;
12952 + } else if (status & DZ_OERR) /* overrun error */
12953 + flag = TTY_OVERRUN;
12954 + else if (status & DZ_PERR) /* parity error */
12955 + flag = TTY_PARITY;
12957 +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
12959 + if (break_pressed && info->line == dz_sercons.index) {
12960 + if (time_before(jiffies, break_pressed + HZ * 5)) {
12961 + handle_sysrq(ch, regs, NULL, NULL);
12962 + break_pressed = 0;
12965 - if (tmp & DZ_OERR) {
12967 - debug_console("OERR\n", 5);
12968 + break_pressed = 0;
12971 - if (tty->flip.count < TTY_FLIPBUF_SIZE) {
12972 - tty->flip.count++;
12973 - tty->flip.flag_buf_ptr++;
12974 - tty->flip.char_buf_ptr++;
12975 - *tty->flip.flag_buf_ptr = TTY_OVERRUN;
12979 + if (info->hook && info->hook->rx_char) {
12980 + (*info->hook->rx_char)(ch, flag);
12983 - tty->flip.flag_buf_ptr++;
12984 - tty->flip.char_buf_ptr++;
12985 - tty->flip.count++;
12987 - } while (status & DZ_DVAL);
12990 - tty_flip_buffer_push(tty);
12991 + /* keep track of the statistics */
12997 + icount->parity++;
12999 + case TTY_OVERRUN:
13000 + icount->overrun++;
13009 + if ((status & info->ignore_status_mask) == 0) {
13010 + tty_insert_flip_char(tty, ch, flag);
13011 + lines_rx[LINE(status)] = 1;
13014 + for (i = 0; i < DZ_NB_PORT; i++)
13016 + tty_flip_buffer_push(lines[i]->tty);
13020 @@ -292,20 +314,34 @@ static inline void receive_chars(struct
13021 * This routine deals with outputs to any lines.
13022 * ------------------------------------------------------------
13024 -static inline void transmit_chars(struct dz_serial *info)
13025 +static inline void transmit_chars(struct dz_serial *info_in)
13027 + struct dz_serial *info;
13028 + unsigned short status;
13031 + status = dz_in(info_in, DZ_CSR);
13032 + info = lines[LINE(status)];
13034 + if (info->hook || !info->tty) {
13035 + unsigned short mask, tmp;
13037 - if (info->x_char) { /* XON/XOFF chars */
13038 + mask = 1 << info->line;
13039 + tmp = dz_in(info, DZ_TCR); /* read the TX flag */
13040 + tmp &= ~mask; /* clear the TX flag */
13041 + dz_out(info, DZ_TCR, tmp);
13045 + if (info->x_char) { /* XON/XOFF chars */
13046 dz_out(info, DZ_TDR, info->x_char);
13051 /* if nothing to do or stopped or hardware stopped */
13052 - if ((info->xmit_cnt <= 0) || info->tty->stopped || info->tty->hw_stopped) {
13053 + if (info->xmit_cnt <= 0 ||
13054 + info->tty->stopped || info->tty->hw_stopped) {
13055 dz_stop(info->tty);
13058 @@ -359,15 +395,14 @@ static inline void check_modem_status(st
13060 static void dz_interrupt(int irq, void *dev, struct pt_regs *regs)
13062 - struct dz_serial *info;
13063 + struct dz_serial *info = (struct dz_serial *)dev;
13064 unsigned short status;
13066 /* get the reason why we just got an irq */
13067 - status = dz_in((struct dz_serial *) dev, DZ_CSR);
13068 - info = lines[LINE(status)]; /* re-arrange info the proper port */
13069 + status = dz_in(info, DZ_CSR);
13071 if (status & DZ_RDONE)
13072 - receive_chars(info); /* the receive function */
13073 + receive_chars(info, regs);
13075 if (status & DZ_TRDY)
13076 transmit_chars(info);
13077 @@ -514,7 +549,7 @@ static void shutdown(struct dz_serial *i
13080 info->cflags &= ~DZ_CREAD; /* turn off receive enable flag */
13081 - dz_out(info, DZ_LPR, info->cflags);
13082 + dz_out(info, DZ_LPR, info->cflags | info->line);
13084 if (info->xmit_buf) { /* free Tx buffer */
13085 free_page((unsigned long) info->xmit_buf);
13086 @@ -545,18 +580,21 @@ static void change_speed(struct dz_seria
13088 unsigned long flags;
13093 - if (!info->tty || !info->tty->termios)
13095 + if (!info->hook) {
13096 + if (!info->tty || !info->tty->termios)
13098 + cflag = info->tty->termios->c_cflag;
13100 + cflag = info->hook->cflags;
13106 info->cflags = info->line;
13108 - cflag = info->tty->termios->c_cflag;
13110 switch (cflag & CSIZE) {
13112 info->cflags |= DZ_CS5;
13113 @@ -579,7 +617,16 @@ static void change_speed(struct dz_seria
13114 if (cflag & PARODD)
13115 info->cflags |= DZ_PARODD;
13117 - baud = tty_get_baud_rate(info->tty);
13118 + i = cflag & CBAUD;
13119 + if (i & CBAUDEX) {
13122 + info->tty->termios->c_cflag &= ~CBAUDEX;
13124 + info->hook->cflags &= ~CBAUDEX;
13126 + baud = baud_table[i];
13130 info->cflags |= DZ_B50;
13131 @@ -629,16 +676,16 @@ static void change_speed(struct dz_seria
13134 info->cflags |= DZ_RXENAB;
13135 - dz_out(info, DZ_LPR, info->cflags);
13136 + dz_out(info, DZ_LPR, info->cflags | info->line);
13138 /* setup accept flag */
13139 info->read_status_mask = DZ_OERR;
13140 - if (I_INPCK(info->tty))
13141 + if (info->tty && I_INPCK(info->tty))
13142 info->read_status_mask |= (DZ_FERR | DZ_PERR);
13144 /* characters to ignore */
13145 info->ignore_status_mask = 0;
13146 - if (I_IGNPAR(info->tty))
13147 + if (info->tty && I_IGNPAR(info->tty))
13148 info->ignore_status_mask |= (DZ_FERR | DZ_PERR);
13150 restore_flags(flags);
13151 @@ -694,7 +741,7 @@ static int dz_write(struct tty_struct *t
13153 down(&tmp_buf_sem);
13155 - c = MIN(count, MIN(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
13156 + c = min(count, min(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
13160 @@ -707,7 +754,7 @@ static int dz_write(struct tty_struct *t
13164 - c = MIN(c, MIN(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
13165 + c = min(c, min(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
13166 memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c);
13167 info->xmit_head = ((info->xmit_head + c) & (DZ_XMIT_SIZE - 1));
13168 info->xmit_cnt += c;
13169 @@ -727,7 +774,7 @@ static int dz_write(struct tty_struct *t
13173 - c = MIN(count, MIN(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
13174 + c = min(count, min(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
13176 restore_flags(flags);
13178 @@ -845,7 +892,7 @@ static void dz_send_xchar(struct tty_str
13181 * ------------------------------------------------------------
13182 - * rs_ioctl () and friends
13183 + * dz_ioctl () and friends
13184 * ------------------------------------------------------------
13186 static int get_serial_info(struct dz_serial *info,
13187 @@ -958,6 +1005,9 @@ static int dz_ioctl(struct tty_struct *t
13188 struct dz_serial *info = (struct dz_serial *) tty->driver_data;
13194 if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
13195 (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) &&
13196 (cmd != TIOCSERSWILD) && (cmd != TIOCSERGSTRUCT)) {
13197 @@ -1252,19 +1302,14 @@ static int dz_open(struct tty_struct *tt
13200 line = MINOR(tty->device) - tty->driver.minor_start;
13202 - /* The dz lines for the mouse/keyboard must be
13203 - * opened using their respective drivers.
13205 if ((line < 0) || (line >= DZ_NB_PORT))
13207 + info = lines[line];
13209 - if ((line == DZ_KEYBOARD) || (line == DZ_MOUSE))
13213 - info = lines[line];
13216 tty->driver_data = info;
13219 @@ -1285,14 +1330,21 @@ static int dz_open(struct tty_struct *tt
13221 *tty->termios = info->callout_termios;
13222 change_speed(info);
13225 +#ifdef CONFIG_SERIAL_DEC_CONSOLE
13226 + if (dz_sercons.cflag && dz_sercons.index == line) {
13227 + tty->termios->c_cflag = dz_sercons.cflag;
13228 + dz_sercons.cflag = 0;
13229 + change_speed(info);
13233 info->session = current->session;
13234 info->pgrp = current->pgrp;
13238 -static void show_serial_version(void)
13239 +static void __init show_serial_version(void)
13241 printk("%s%s\n", dz_name, dz_version);
13243 @@ -1300,7 +1352,6 @@ static void show_serial_version(void)
13244 int __init dz_init(void)
13248 struct dz_serial *info;
13250 /* Setup base handler, and timer table. */
13251 @@ -1311,9 +1362,9 @@ int __init dz_init(void)
13252 memset(&serial_driver, 0, sizeof(struct tty_driver));
13253 serial_driver.magic = TTY_DRIVER_MAGIC;
13254 #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
13255 - serial_driver.name = "ttyS";
13257 serial_driver.name = "tts/%d";
13259 + serial_driver.name = "ttyS";
13261 serial_driver.major = TTY_MAJOR;
13262 serial_driver.minor_start = 64;
13263 @@ -1352,9 +1403,9 @@ int __init dz_init(void)
13265 callout_driver = serial_driver;
13266 #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
13267 - callout_driver.name = "cua";
13269 callout_driver.name = "cua/%d";
13271 + callout_driver.name = "cua";
13273 callout_driver.major = TTYAUX_MAJOR;
13274 callout_driver.subtype = SERIAL_TYPE_CALLOUT;
13275 @@ -1363,25 +1414,27 @@ int __init dz_init(void)
13276 panic("Couldn't register serial driver");
13277 if (tty_register_driver(&callout_driver))
13278 panic("Couldn't register callout driver");
13279 - save_flags(flags);
13282 for (i = 0; i < DZ_NB_PORT; i++) {
13285 - info->magic = SERIAL_MAGIC;
13288 + info->x_char = 0;
13289 if (mips_machtype == MACH_DS23100 ||
13290 mips_machtype == MACH_DS5100)
13291 info->port = (unsigned long) KN01_DZ11_BASE;
13293 info->port = (unsigned long) KN02_DZ11_BASE;
13298 + if (info->hook && info->hook->init_info) {
13299 + (*info->hook->init_info)(info);
13303 + info->magic = SERIAL_MAGIC;
13304 info->close_delay = 50;
13305 info->closing_wait = 3000;
13306 - info->x_char = 0;
13309 info->blocked_open = 0;
13310 @@ -1393,25 +1446,16 @@ int __init dz_init(void)
13311 info->normal_termios = serial_driver.init_termios;
13312 init_waitqueue_head(&info->open_wait);
13313 init_waitqueue_head(&info->close_wait);
13316 - * If we are pointing to address zero then punt - not correctly
13317 - * set up in setup.c to handle this.
13322 - printk("ttyS%02d at 0x%08x (irq = %d)\n", info->line,
13323 - info->port, dec_interrupt[DEC_IRQ_DZ11]);
13325 + printk("ttyS%02d at 0x%08x (irq = %d) is a DC7085 DZ\n",
13326 + info->line, info->port, dec_interrupt[DEC_IRQ_DZ11]);
13327 tty_register_devfs(&serial_driver, 0,
13328 - serial_driver.minor_start + info->line);
13329 + serial_driver.minor_start + info->line);
13330 tty_register_devfs(&callout_driver, 0,
13331 - callout_driver.minor_start + info->line);
13332 + callout_driver.minor_start + info->line);
13335 - /* reset the chip */
13336 #ifndef CONFIG_SERIAL_DEC_CONSOLE
13337 + /* reset the chip */
13338 dz_out(info, DZ_CSR, DZ_CLR);
13339 while (dz_in(info, DZ_CSR) & DZ_CLR);
13341 @@ -1420,43 +1464,104 @@ int __init dz_init(void)
13342 dz_out(info, DZ_CSR, DZ_MSE);
13345 - /* order matters here... the trick is that flags
13346 - is updated... in request_irq - to immediatedly obliterate
13348 - restore_flags(flags);
13351 if (request_irq(dec_interrupt[DEC_IRQ_DZ11], dz_interrupt,
13352 - SA_INTERRUPT, "DZ", lines[0]))
13353 + 0, "DZ", lines[0]))
13354 panic("Unable to register DZ interrupt");
13356 + for (i = 0; i < DZ_NB_PORT; i++)
13357 + if (lines[i]->hook) {
13358 + startup(lines[i]);
13359 + if (lines[i]->hook->init_channel)
13360 + (*lines[i]->hook->init_channel)(lines[i]);
13366 -#ifdef CONFIG_SERIAL_DEC_CONSOLE
13367 -static void dz_console_put_char(unsigned char ch)
13369 + * polling I/O routines
13371 +static int dz_poll_tx_char(void *handle, unsigned char ch)
13373 unsigned long flags;
13374 - int loops = 2500;
13375 - unsigned short tmp = ch;
13376 - /* this code sends stuff out to serial device - spinning its
13377 - wheels and waiting. */
13378 + struct dz_serial *info = handle;
13379 + unsigned short csr, tcr, trdy, mask;
13380 + int loops = 10000;
13383 - /* force the issue - point it at lines[3] */
13384 - dz_console = &multi[CONSOLE_LINE];
13385 + local_irq_save(flags);
13386 + csr = dz_in(info, DZ_CSR);
13387 + dz_out(info, DZ_CSR, csr & ~DZ_TIE);
13388 + tcr = dz_in(info, DZ_TCR);
13389 + tcr |= 1 << info->line;
13391 + dz_out(info, DZ_TCR, mask);
13393 + local_irq_restore(flags);
13395 - save_flags(flags);
13397 + while (loops--) {
13398 + trdy = dz_in(info, DZ_CSR);
13399 + if (!(trdy & DZ_TRDY))
13401 + trdy = (trdy & DZ_TLINE) >> 8;
13402 + if (trdy == info->line)
13404 + mask &= ~(1 << trdy);
13405 + dz_out(info, DZ_TCR, mask);
13411 + dz_out(info, DZ_TDR, ch);
13416 - /* spin our wheels */
13417 - while (((dz_in(dz_console, DZ_CSR) & DZ_TRDY) != DZ_TRDY) && loops--);
13418 + dz_out(info, DZ_TCR, tcr);
13419 + dz_out(info, DZ_CSR, csr);
13421 - /* Actually transmit the character. */
13422 - dz_out(dz_console, DZ_TDR, tmp);
13426 - restore_flags(flags);
13427 +static int dz_poll_rx_char(void *handle)
13432 +int register_dz_hook(unsigned int channel, struct dec_serial_hook *hook)
13434 + struct dz_serial *info = multi + channel;
13436 + if (info->hook) {
13437 + printk("%s: line %d has already a hook registered\n",
13438 + __FUNCTION__, channel);
13442 + hook->poll_rx_char = dz_poll_rx_char;
13443 + hook->poll_tx_char = dz_poll_tx_char;
13444 + info->hook = hook;
13450 +int unregister_dz_hook(unsigned int channel)
13452 + struct dz_serial *info = &multi[channel];
13454 + if (info->hook) {
13455 + info->hook = NULL;
13458 + printk("%s: trying to unregister hook on line %d,"
13459 + " but none is registered\n", __FUNCTION__, channel);
13464 +#ifdef CONFIG_SERIAL_DEC_CONSOLE
13466 * -------------------------------------------------------------------
13467 * dz_console_print ()
13468 @@ -1465,17 +1570,19 @@ static void dz_console_put_char(unsigned
13469 * The console must be locked when we get here.
13470 * -------------------------------------------------------------------
13472 -static void dz_console_print(struct console *cons,
13473 +static void dz_console_print(struct console *co,
13475 unsigned int count)
13477 + struct dz_serial *info = multi + co->index;
13480 prom_printf((char *) str);
13484 - dz_console_put_char('\r');
13485 - dz_console_put_char(*str++);
13486 + dz_poll_tx_char(info, '\r');
13487 + dz_poll_tx_char(info, *str++);
13491 @@ -1486,12 +1593,12 @@ static kdev_t dz_console_device(struct c
13493 static int __init dz_console_setup(struct console *co, char *options)
13495 + struct dz_serial *info = multi + co->index;
13499 int cflag = CREAD | HUPCL | CLOCAL;
13501 - unsigned short mask, tmp;
13504 baud = simple_strtoul(options, NULL, 10);
13505 @@ -1542,44 +1649,31 @@ static int __init dz_console_setup(struc
13509 - /* TOFIX: force to console line */
13510 - dz_console = &multi[CONSOLE_LINE];
13511 if ((mips_machtype == MACH_DS23100) || (mips_machtype == MACH_DS5100))
13512 - dz_console->port = KN01_DZ11_BASE;
13513 + info->port = KN01_DZ11_BASE;
13515 - dz_console->port = KN02_DZ11_BASE;
13516 - dz_console->line = CONSOLE_LINE;
13517 + info->port = KN02_DZ11_BASE;
13518 + info->line = co->index;
13520 - dz_out(dz_console, DZ_CSR, DZ_CLR);
13521 - while ((tmp = dz_in(dz_console, DZ_CSR)) & DZ_CLR);
13522 + dz_out(info, DZ_CSR, DZ_CLR);
13523 + while (dz_in(info, DZ_CSR) & DZ_CLR);
13525 /* enable scanning */
13526 - dz_out(dz_console, DZ_CSR, DZ_MSE);
13527 + dz_out(info, DZ_CSR, DZ_MSE);
13529 /* Set up flags... */
13530 - dz_console->cflags = 0;
13531 - dz_console->cflags |= DZ_B9600;
13532 - dz_console->cflags |= DZ_CS8;
13533 - dz_console->cflags |= DZ_PARENB;
13534 - dz_out(dz_console, DZ_LPR, dz_console->cflags);
13536 - mask = 1 << dz_console->line;
13537 - tmp = dz_in(dz_console, DZ_TCR); /* read the TX flag */
13538 - if (!(tmp & mask)) {
13539 - tmp |= mask; /* set the TX flag */
13540 - dz_out(dz_console, DZ_TCR, tmp);
13542 + dz_out(info, DZ_LPR, cflag | info->line);
13547 -static struct console dz_sercons =
13550 - .write = dz_console_print,
13551 - .device = dz_console_device,
13552 - .setup = dz_console_setup,
13553 - .flags = CON_CONSDEV | CON_PRINTBUFFER,
13554 - .index = CONSOLE_LINE,
13555 +static struct console dz_sercons = {
13557 + .write = dz_console_print,
13558 + .device = dz_console_device,
13559 + .setup = dz_console_setup,
13560 + .flags = CON_PRINTBUFFER,
13564 void __init dz_serial_console_init(void)
13565 --- a/drivers/char/dz.h
13566 +++ b/drivers/char/dz.h
13568 #ifndef DZ_SERIAL_H
13569 #define DZ_SERIAL_H
13571 +#include <asm/dec/serial.h>
13573 #define SERIAL_MAGIC 0x5301
13578 #define DZ_TRDY 0x8000 /* Transmitter empty */
13579 #define DZ_TIE 0x4000 /* Transmitter Interrupt Enable */
13580 +#define DZ_TLINE 0x0300 /* Transmitter Line Number */
13581 #define DZ_RDONE 0x0080 /* Receiver data ready */
13582 #define DZ_RIE 0x0040 /* Receive Interrupt Enable */
13583 #define DZ_MSE 0x0020 /* Master Scan Enable */
13584 @@ -37,19 +40,30 @@
13585 #define UCHAR(x) (unsigned char)(x & DZ_RBUF_MASK)
13588 - * Definitions for the Transmit Register.
13589 + * Definitions for the Transmit Control Register.
13591 #define DZ_LINE_KEYBOARD 0x0001
13592 #define DZ_LINE_MOUSE 0x0002
13593 #define DZ_LINE_MODEM 0x0004
13594 #define DZ_LINE_PRINTER 0x0008
13596 +#define DZ_MODEM_RTS 0x0800 /* RTS for the modem line (2) */
13597 #define DZ_MODEM_DTR 0x0400 /* DTR for the modem line (2) */
13598 +#define DZ_PRINT_RTS 0x0200 /* RTS for the printer line (3) */
13599 +#define DZ_PRINT_DTR 0x0100 /* DTR for the printer line (3) */
13600 +#define DZ_LNENB 0x000f /* Transmitter Line Enable */
13603 * Definitions for the Modem Status Register.
13605 +#define DZ_MODEM_RI 0x0800 /* RI for the modem line (2) */
13606 +#define DZ_MODEM_CD 0x0400 /* CD for the modem line (2) */
13607 #define DZ_MODEM_DSR 0x0200 /* DSR for the modem line (2) */
13608 +#define DZ_MODEM_CTS 0x0100 /* CTS for the modem line (2) */
13609 +#define DZ_PRINT_RI 0x0008 /* RI for the printer line (2) */
13610 +#define DZ_PRINT_CD 0x0004 /* CD for the printer line (2) */
13611 +#define DZ_PRINT_DSR 0x0002 /* DSR for the printer line (2) */
13612 +#define DZ_PRINT_CTS 0x0001 /* CTS for the printer line (2) */
13615 * Definitions for the Transmit Data Register.
13616 @@ -115,9 +129,6 @@
13618 #define DZ_EVENT_WRITE_WAKEUP 0
13621 -#define MIN(a,b) ((a) < (b) ? (a) : (b))
13623 #define DZ_INITIALIZED 0x80000000 /* Serial port was initialized */
13624 #define DZ_CALLOUT_ACTIVE 0x40000000 /* Call out device is active */
13625 #define DZ_NORMAL_ACTIVE 0x20000000 /* Normal device is active */
13626 @@ -129,6 +140,7 @@
13627 #define DZ_CLOSING_WAIT_INF 0
13628 #define DZ_CLOSING_WAIT_NONE 65535
13630 +#define DZ_SAK 0x0004 /* Secure Attention Key (Orange book) */
13631 #define DZ_SPLIT_TERMIOS 0x0008 /* Separate termios for dialin/callout */
13632 #define DZ_SESSION_LOCKOUT 0x0100 /* Lock out cua opens based on session */
13633 #define DZ_PGRP_LOCKOUT 0x0200 /* Lock out cua opens based on pgrp */
13634 @@ -166,79 +178,9 @@ struct dz_serial {
13635 long session; /* Session of opening process */
13636 long pgrp; /* pgrp of opening process */
13638 + struct dec_serial_hook *hook; /* Hook on this channel. */
13639 unsigned char is_console; /* flag indicating a serial console */
13640 unsigned char is_initialized;
13643 -static struct dz_serial multi[DZ_NB_PORT]; /* Four serial lines in the DZ chip */
13644 -static struct dz_serial *dz_console;
13645 -static struct tty_driver serial_driver, callout_driver;
13647 -static struct tty_struct *serial_table[DZ_NB_PORT];
13648 -static struct termios *serial_termios[DZ_NB_PORT];
13649 -static struct termios *serial_termios_locked[DZ_NB_PORT];
13651 -static int serial_refcount;
13654 - * tmp_buf is used as a temporary buffer by serial_write. We need to
13655 - * lock it in case the copy_from_user blocks while swapping in a page,
13656 - * and some other program tries to do a serial write at the same time.
13657 - * Since the lock will only come under contention when the system is
13658 - * swapping and available memory is low, it makes sense to share one
13659 - * buffer across all the serial ports, since it significantly saves
13660 - * memory if large numbers of serial ports are open.
13662 -static unsigned char *tmp_buf;
13663 -static DECLARE_MUTEX(tmp_buf_sem);
13665 -static char *dz_name = "DECstation DZ serial driver version ";
13666 -static char *dz_version = "1.02";
13668 -static inline unsigned short dz_in (struct dz_serial *, unsigned);
13669 -static inline void dz_out (struct dz_serial *, unsigned, unsigned short);
13671 -static inline void dz_sched_event (struct dz_serial *, int);
13672 -static inline void receive_chars (struct dz_serial *);
13673 -static inline void transmit_chars (struct dz_serial *);
13674 -static inline void check_modem_status (struct dz_serial *);
13676 -static void dz_stop (struct tty_struct *);
13677 -static void dz_start (struct tty_struct *);
13678 -static void dz_interrupt (int, void *, struct pt_regs *);
13679 -static void do_serial_bh (void);
13680 -static void do_softint (void *);
13681 -static void do_serial_hangup (void *);
13682 -static void change_speed (struct dz_serial *);
13683 -static void dz_flush_chars (struct tty_struct *);
13684 -static void dz_console_print (struct console *, const char *, unsigned int);
13685 -static void dz_flush_buffer (struct tty_struct *);
13686 -static void dz_throttle (struct tty_struct *);
13687 -static void dz_unthrottle (struct tty_struct *);
13688 -static void dz_send_xchar (struct tty_struct *, char);
13689 -static void shutdown (struct dz_serial *);
13690 -static void send_break (struct dz_serial *, int);
13691 -static void dz_set_termios (struct tty_struct *, struct termios *);
13692 -static void dz_close (struct tty_struct *, struct file *);
13693 -static void dz_hangup (struct tty_struct *);
13694 -static void show_serial_version (void);
13696 -static int dz_write (struct tty_struct *, int, const unsigned char *, int);
13697 -static int dz_write_room (struct tty_struct *);
13698 -static int dz_chars_in_buffer (struct tty_struct *);
13699 -static int startup (struct dz_serial *);
13700 -static int get_serial_info (struct dz_serial *, struct serial_struct *);
13701 -static int set_serial_info (struct dz_serial *, struct serial_struct *);
13702 -static int get_lsr_info (struct dz_serial *, unsigned int *);
13703 -static int dz_ioctl (struct tty_struct *, struct file *, unsigned int, unsigned long);
13704 -static int block_til_ready (struct tty_struct *, struct file *, struct dz_serial *);
13705 -static int dz_open (struct tty_struct *, struct file *);
13708 -int init_module (void)
13709 -void cleanup_module (void)
13714 #endif /* DZ_SERIAL_H */
13716 +++ b/drivers/char/ibm_workpad_keymap.map
13718 +# Keymap for IBM Workpad z50
13721 +# by Michael Klar <wyldfier@iname.com>
13723 +# This is a great big mess on account of how the Caps Lock key is handled as
13724 +# LeftShift-RightShift. Right shift key had to be broken out, so don't use
13725 +# use this map file as a basis for other keyboards that don't do the same
13726 +# thing with Caps Lock.
13728 +# This file is subject to the terms and conditions of the GNU General Public
13729 +# License. See the file "COPYING" in the main directory of this archive
13730 +# for more details.
13732 +keymaps 0-2,4-5,8,12,32-33,36-37
13735 +keycode 0 = F1 F11 Console_13
13736 + shiftr keycode 0 = F11
13737 + shift shiftr keycode 0 = F11
13738 + control keycode 0 = F1
13739 + alt keycode 0 = Console_1
13740 + control alt keycode 0 = Console_1
13741 +keycode 1 = F3 F13 Console_15
13742 + shiftr keycode 1 = F13
13743 + shift shiftr keycode 1 = F13
13744 + control keycode 1 = F3
13745 + alt keycode 1 = Console_3
13746 + control alt keycode 1 = Console_3
13747 +keycode 2 = F5 F15 Console_17
13748 + shiftr keycode 2 = F15
13749 + shift shiftr keycode 2 = F15
13750 + control keycode 2 = F5
13751 + alt keycode 2 = Console_5
13752 + control alt keycode 2 = Console_5
13753 +keycode 3 = F7 F17 Console_19
13754 + shiftr keycode 3 = F17
13755 + shift shiftr keycode 3 = F17
13756 + control keycode 3 = F7
13757 + alt keycode 3 = Console_7
13758 + control alt keycode 3 = Console_7
13759 +keycode 4 = F9 F19 Console_21
13760 + shiftr keycode 4 = F19
13761 + shift shiftr keycode 4 = F19
13762 + control keycode 4 = F9
13763 + alt keycode 4 = Console_9
13764 + control alt keycode 4 = Console_9
13765 +#keycode 5 is contrast down
13766 +#keycode 6 is contrast up
13767 +keycode 7 = F11 F11 Console_23
13768 + shiftr keycode 7 = F11
13769 + shift shiftr keycode 7 = F11
13770 + control keycode 7 = F11
13771 + alt keycode 7 = Console_11
13772 + control alt keycode 7 = Console_11
13773 +keycode 8 = F2 F12 Console_14
13774 + shiftr keycode 8 = F12
13775 + shift shiftr keycode 8 = F12
13776 + control keycode 8 = F2
13777 + alt keycode 8 = Console_2
13778 + control alt keycode 8 = Console_2
13779 +keycode 9 = F4 F14 Console_16
13780 + shiftr keycode 9 = F14
13781 + shift shiftr keycode 9 = F14
13782 + control keycode 9 = F4
13783 + alt keycode 9 = Console_4
13784 + control alt keycode 9 = Console_4
13785 +keycode 10 = F6 F16 Console_18
13786 + shiftr keycode 10 = F16
13787 + shift shiftr keycode 10 = F16
13788 + control keycode 10 = F6
13789 + alt keycode 10 = Console_6
13790 + control alt keycode 10 = Console_6
13791 +keycode 11 = F8 F18 Console_20
13792 + shiftr keycode 11 = F18
13793 + shift shiftr keycode 11 = F18
13794 + control keycode 11 = F8
13795 + alt keycode 11 = Console_8
13796 + control alt keycode 11 = Console_8
13797 +keycode 12 = F10 F20 Console_22
13798 + shiftr keycode 12 = F20
13799 + shift shiftr keycode 12 = F20
13800 + control keycode 12 = F10
13801 + alt keycode 12 = Console_10
13802 + control alt keycode 12 = Console_10
13803 +#keycode 13 is brightness down
13804 +#keycode 14 is brightness up
13805 +keycode 15 = F12 F12 Console_24
13806 + shiftr keycode 15 = F12
13807 + shift shiftr keycode 15 = F12
13808 + control keycode 15 = F12
13809 + alt keycode 15 = Console_12
13810 + control alt keycode 15 = Console_12
13811 +keycode 16 = apostrophe quotedbl
13812 + shiftr keycode 16 = quotedbl
13813 + shift shiftr keycode 16 = quotedbl
13814 + control keycode 16 = Control_g
13815 + alt keycode 16 = Meta_apostrophe
13816 +keycode 17 = bracketleft braceleft
13817 + shiftr keycode 17 = braceleft
13818 + shift shiftr keycode 17 = braceleft
13819 + control keycode 17 = Escape
13820 + alt keycode 17 = Meta_bracketleft
13821 +keycode 18 = minus underscore backslash
13822 + shiftr keycode 18 = underscore
13823 + shift shiftr keycode 18 = underscore
13824 + control keycode 18 = Control_underscore
13825 + shift control keycode 18 = Control_underscore
13826 + shiftr control keycode 18 = Control_underscore
13827 + shift shiftr control keycode 18 = Control_underscore
13828 + alt keycode 18 = Meta_minus
13829 +keycode 19 = zero parenright braceright
13830 + shiftr keycode 19 = parenright
13831 + shift shiftr keycode 19 = parenright
13832 + alt keycode 19 = Meta_zero
13834 + shiftr keycode 20 = +P
13835 + shift shiftr keycode 20 = +p
13836 +keycode 21 = semicolon colon
13837 + shiftr keycode 21 = colon
13838 + shift shiftr keycode 21 = colon
13839 + alt keycode 21 = Meta_semicolon
13840 +keycode 22 = Up Scroll_Backward
13841 + shiftr keycode 22 = Scroll_Backward
13842 + shift shiftr keycode 22 = Scroll_Backward
13843 + alt keycode 22 = Prior
13844 +keycode 23 = slash question
13845 + shiftr keycode 23 = question
13846 + shift shiftr keycode 23 = question
13847 + control keycode 23 = Delete
13848 + alt keycode 23 = Meta_slash
13850 +keycode 27 = nine parenleft bracketright
13851 + shiftr keycode 27 = parenleft
13852 + shift shiftr keycode 27 = parenleft
13853 + alt keycode 27 = Meta_nine
13855 + shiftr keycode 28 = +O
13856 + shift shiftr keycode 28 = +o
13858 + shiftr keycode 29 = +L
13859 + shift shiftr keycode 29 = +l
13860 +keycode 30 = period greater
13861 + shiftr keycode 30 = greater
13862 + shift shiftr keycode 30 = greater
13863 + control keycode 30 = Compose
13864 + alt keycode 30 = Meta_period
13866 +keycode 32 = Left Decr_Console
13867 + shiftr keycode 32 = Decr_Console
13868 + shift shiftr keycode 32 = Decr_Console
13869 + alt keycode 32 = Home
13870 +keycode 33 = bracketright braceright asciitilde
13871 + shiftr keycode 33 = braceright
13872 + shift shiftr keycode 33 = braceright
13873 + control keycode 33 = Control_bracketright
13874 + alt keycode 33 = Meta_bracketright
13875 +keycode 34 = equal plus
13876 + shiftr keycode 34 = plus
13877 + shift shiftr keycode 34 = plus
13878 + alt keycode 34 = Meta_equal
13879 +keycode 35 = eight asterisk bracketleft
13880 + shiftr keycode 35 = asterisk
13881 + shift shiftr keycode 35 = asterisk
13882 + control keycode 35 = Delete
13883 + alt keycode 35 = Meta_eight
13885 + shiftr keycode 36 = +I
13886 + shift shiftr keycode 36 = +i
13888 + shiftr keycode 37 = +K
13889 + shift shiftr keycode 37 = +k
13890 +keycode 38 = comma less
13891 + shiftr keycode 38 = less
13892 + shift shiftr keycode 38 = less
13893 + alt keycode 38 = Meta_comma
13896 + shiftr keycode 40 = +H
13897 + shift shiftr keycode 40 = +h
13899 + shiftr keycode 41 = +Y
13900 + shift shiftr keycode 41 = +y
13901 +keycode 42 = six asciicircum
13902 + shiftr keycode 42 = asciicircum
13903 + shift shiftr keycode 42 = asciicircum
13904 + control keycode 42 = Control_asciicircum
13905 + alt keycode 42 = Meta_six
13906 +keycode 43 = seven ampersand braceleft
13907 + shiftr keycode 43 = ampersand
13908 + shift shiftr keycode 43 = ampersand
13909 + control keycode 43 = Control_underscore
13910 + alt keycode 43 = Meta_seven
13912 + shiftr keycode 44 = +U
13913 + shift shiftr keycode 44 = +u
13915 + shiftr keycode 45 = +J
13916 + shift shiftr keycode 45 = +j
13918 + shiftr keycode 46 = +M
13919 + shift shiftr keycode 46 = +m
13921 + shiftr keycode 47 = +N
13922 + shift shiftr keycode 47 = +n
13924 +# This is the "Backspace" key:
13925 +keycode 49 = Delete Delete
13926 + shiftr keycode 49 = Delete
13927 + shift shiftr keycode 49 = Delete
13928 + control keycode 49 = BackSpace
13929 + alt keycode 49 = Meta_Delete
13930 +keycode 50 = Num_Lock
13931 + shift keycode 50 = Bare_Num_Lock
13932 + shiftr keycode 50 = Bare_Num_Lock
13933 + shift shiftr keycode 50 = Bare_Num_Lock
13934 +# This is the "Delete" key:
13935 +keycode 51 = Remove
13936 + control alt keycode 51 = Boot
13938 +keycode 53 = backslash bar
13939 + shiftr keycode 53 = bar
13940 + shift shiftr keycode 53 = bar
13941 + control keycode 53 = Control_backslash
13942 + alt keycode 53 = Meta_backslash
13943 +keycode 54 = Return
13944 + alt keycode 54 = Meta_Control_m
13945 +keycode 55 = space space
13946 + shiftr keycode 55 = space
13947 + shift shiftr keycode 55 = space
13948 + control keycode 55 = nul
13949 + alt keycode 55 = Meta_space
13951 + shiftr keycode 56 = +G
13952 + shift shiftr keycode 56 = +g
13954 + shiftr keycode 57 = +T
13955 + shift shiftr keycode 57 = +t
13956 +keycode 58 = five percent
13957 + shiftr keycode 58 = percent
13958 + shift shiftr keycode 58 = percent
13959 + control keycode 58 = Control_bracketright
13960 + alt keycode 58 = Meta_five
13961 +keycode 59 = four dollar dollar
13962 + shiftr keycode 59 = dollar
13963 + shift shiftr keycode 59 = dollar
13964 + control keycode 59 = Control_backslash
13965 + alt keycode 59 = Meta_four
13967 + shiftr keycode 60 = +R
13968 + shift shiftr keycode 60 = +r
13970 + shiftr keycode 61 = +F
13971 + shift shiftr keycode 61 = +f
13972 + altgr keycode 61 = Hex_F
13974 + shiftr keycode 62 = +V
13975 + shift shiftr keycode 62 = +v
13977 + shiftr keycode 63 = +B
13978 + shift shiftr keycode 63 = +b
13979 + altgr keycode 63 = Hex_B
13981 +keycode 67 = three numbersign
13982 + shiftr keycode 67 = numbersign
13983 + shift shiftr keycode 67 = numbersign
13984 + control keycode 67 = Escape
13985 + alt keycode 67 = Meta_three
13987 + shiftr keycode 68 = +E
13988 + shift shiftr keycode 68 = +e
13989 + altgr keycode 68 = Hex_E
13991 + shiftr keycode 69 = +D
13992 + shift shiftr keycode 69 = +d
13993 + altgr keycode 69 = Hex_D
13995 + shiftr keycode 70 = +C
13996 + shift shiftr keycode 70 = +c
13997 + altgr keycode 70 = Hex_C
13998 +keycode 71 = Right Incr_Console
13999 + shiftr keycode 71 = Incr_Console
14000 + shift shiftr keycode 71 = Incr_Console
14001 + alt keycode 71 = End
14003 +keycode 75 = two at at
14004 + shiftr keycode 75 = at
14005 + shift shiftr keycode 75 = at
14006 + control keycode 75 = nul
14007 + shift control keycode 75 = nul
14008 + shiftr control keycode 75 = nul
14009 + shift shiftr control keycode 75 = nul
14010 + alt keycode 75 = Meta_two
14012 + shiftr keycode 76 = +W
14013 + shift shiftr keycode 76 = +w
14015 + shiftr keycode 77 = +S
14016 + shift shiftr keycode 77 = +s
14018 + shiftr keycode 78 = +X
14019 + shift shiftr keycode 78 = +x
14020 +keycode 79 = Down Scroll_Forward
14021 + shiftr keycode 79 = Scroll_Forward
14022 + shift shiftr keycode 79 = Scroll_Forward
14023 + alt keycode 79 = Next
14024 +keycode 80 = Escape Escape
14025 + shiftr keycode 80 = Escape
14026 + shift shiftr keycode 80 = Escape
14027 + alt keycode 80 = Meta_Escape
14028 +keycode 81 = Tab Tab
14029 + shiftr keycode 81 = Tab
14030 + shift shiftr keycode 81 = Tab
14031 + alt keycode 81 = Meta_Tab
14032 +keycode 82 = grave asciitilde
14033 + shiftr keycode 82 = asciitilde
14034 + shift shiftr keycode 82 = asciitilde
14035 + control keycode 82 = nul
14036 + alt keycode 82 = Meta_grave
14037 +keycode 83 = one exclam
14038 + shiftr keycode 83 = exclam
14039 + shift shiftr keycode 83 = exclam
14040 + alt keycode 83 = Meta_one
14042 + shiftr keycode 84 = +Q
14043 + shift shiftr keycode 84 = +q
14045 + shiftr keycode 85 = +A
14046 + shift shiftr keycode 85 = +a
14047 + altgr keycode 85 = Hex_A
14049 + shiftr keycode 86 = +Z
14050 + shift shiftr keycode 86 = +z
14052 +# This is the windows key:
14053 +keycode 88 = Decr_Console
14054 +keycode 89 = Shift
14055 +keycode 90 = Control
14056 +keycode 91 = Control
14058 +keycode 93 = AltGr
14059 +keycode 94 = ShiftR
14060 + shift keycode 94 = Caps_Lock
14061 --- a/drivers/char/indydog.c
14062 +++ b/drivers/char/indydog.c
14065 - * IndyDog 0.2 A Hardware Watchdog Device for SGI IP22
14066 + * IndyDog 0.3 A Hardware Watchdog Device for SGI IP22
14068 * (c) Copyright 2002 Guido Guenther <agx@sigxcpu.org>, All Rights Reserved.
14071 * modify it under the terms of the GNU General Public License
14072 * as published by the Free Software Foundation; either version
14073 * 2 of the License, or (at your option) any later version.
14076 * based on softdog.c by Alan Cox <alan@redhat.com>
14080 #include <linux/module.h>
14081 #include <linux/config.h>
14082 #include <linux/types.h>
14083 @@ -19,13 +19,12 @@
14084 #include <linux/mm.h>
14085 #include <linux/miscdevice.h>
14086 #include <linux/watchdog.h>
14087 -#include <linux/smp_lock.h>
14088 #include <linux/init.h>
14089 #include <asm/uaccess.h>
14090 #include <asm/sgi/mc.h>
14092 -static unsigned long indydog_alive;
14093 -static int expect_close = 0;
14094 +#define PFX "indydog: "
14095 +static int indydog_alive;
14097 #ifdef CONFIG_WATCHDOG_NOWAYOUT
14098 static int nowayout = 1;
14099 @@ -33,10 +32,30 @@ static int nowayout = 1;
14100 static int nowayout = 0;
14103 +#define WATCHDOG_TIMEOUT 30 /* 30 sec default timeout */
14105 MODULE_PARM(nowayout,"i");
14106 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
14108 -static inline void indydog_ping(void)
14109 +static void indydog_start(void)
14111 + u32 mc_ctrl0 = sgimc->cpuctrl0;
14113 + mc_ctrl0 = sgimc->cpuctrl0 | SGIMC_CCTRL0_WDOG;
14114 + sgimc->cpuctrl0 = mc_ctrl0;
14117 +static void indydog_stop(void)
14119 + u32 mc_ctrl0 = sgimc->cpuctrl0;
14121 + mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG;
14122 + sgimc->cpuctrl0 = mc_ctrl0;
14124 + printk(KERN_INFO PFX "Stopped watchdog timer.\n");
14127 +static void indydog_ping(void)
14129 sgimc->watchdogt = 0;
14131 @@ -46,18 +65,14 @@ static inline void indydog_ping(void)
14133 static int indydog_open(struct inode *inode, struct file *file)
14137 - if (test_and_set_bit(0,&indydog_alive))
14138 + if (indydog_alive)
14146 /* Activate timer */
14147 - mc_ctrl0 = sgimc->cpuctrl0 | SGIMC_CCTRL0_WDOG;
14148 - sgimc->cpuctrl0 = mc_ctrl0;
14153 @@ -69,63 +84,48 @@ static int indydog_open(struct inode *in
14154 static int indydog_release(struct inode *inode, struct file *file)
14156 /* Shut off the timer.
14157 - * Lock it in if it's a module and we set nowayout. */
14159 - if (expect_close) {
14160 - u32 mc_ctrl0 = sgimc->cpuctrl0;
14161 + * Lock it in if it's a module and we defined ...NOWAYOUT */
14163 + u32 mc_ctrl0 = sgimc->cpuctrl0;
14164 mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG;
14165 sgimc->cpuctrl0 = mc_ctrl0;
14166 printk(KERN_INFO "Stopped watchdog timer.\n");
14168 - printk(KERN_CRIT "WDT device closed unexpectedly. WDT will not stop!\n");
14169 - clear_bit(0, &indydog_alive);
14172 + indydog_alive = 0;
14177 static ssize_t indydog_write(struct file *file, const char *data, size_t len, loff_t *ppos)
14179 - /* Can't seek (pwrite) on this device */
14180 + /* Can't seek (pwrite) on this device */
14181 if (ppos != &file->f_pos)
14185 - * Refresh the timer.
14187 + /* Refresh the timer. */
14192 - /* In case it was set long ago */
14193 - expect_close = 0;
14195 - for (i = 0; i != len; i++) {
14197 - if (get_user(c, data + i))
14200 - expect_close = 1;
14210 static int indydog_ioctl(struct inode *inode, struct file *file,
14211 unsigned int cmd, unsigned long arg)
14213 + int options, retval = -EINVAL;
14214 static struct watchdog_info ident = {
14215 - options: WDIOF_MAGICCLOSE,
14216 - identity: "Hardware Watchdog for SGI IP22",
14217 + .options = WDIOF_KEEPALIVEPING |
14218 + WDIOF_MAGICCLOSE,
14219 + .firmware_version = 0,
14220 + .identity = "Hardware Watchdog for SGI IP22",
14225 return -ENOIOCTLCMD;
14226 case WDIOC_GETSUPPORT:
14227 - if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
14228 + if (copy_to_user((struct watchdog_info *)arg,
14229 + &ident, sizeof(ident)))
14232 case WDIOC_GETSTATUS:
14233 @@ -134,31 +134,53 @@ static int indydog_ioctl(struct inode *i
14234 case WDIOC_KEEPALIVE:
14237 + case WDIOC_GETTIMEOUT:
14238 + return put_user(WATCHDOG_TIMEOUT,(int *)arg);
14239 + case WDIOC_SETOPTIONS:
14241 + if (get_user(options, (int *)arg))
14244 + if (options & WDIOS_DISABLECARD) {
14249 + if (options & WDIOS_ENABLECARD) {
14259 static struct file_operations indydog_fops = {
14260 - owner: THIS_MODULE,
14261 - write: indydog_write,
14262 - ioctl: indydog_ioctl,
14263 - open: indydog_open,
14264 - release: indydog_release,
14265 + .owner = THIS_MODULE,
14266 + .write = indydog_write,
14267 + .ioctl = indydog_ioctl,
14268 + .open = indydog_open,
14269 + .release = indydog_release,
14272 static struct miscdevice indydog_miscdev = {
14273 - minor: WATCHDOG_MINOR,
14274 - name: "watchdog",
14275 - fops: &indydog_fops,
14276 + .minor = WATCHDOG_MINOR,
14277 + .name = "watchdog",
14278 + .fops = &indydog_fops,
14281 -static const char banner[] __initdata = KERN_INFO "Hardware Watchdog Timer for SGI IP22: 0.2\n";
14282 +static char banner[] __initdata =
14283 + KERN_INFO PFX "Hardware Watchdog Timer for SGI IP22: 0.3\n";
14285 static int __init watchdog_init(void)
14287 int ret = misc_register(&indydog_miscdev);
14291 + printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
14292 + WATCHDOG_MINOR, ret);
14298 @@ -172,4 +194,7 @@ static void __exit watchdog_exit(void)
14300 module_init(watchdog_init);
14301 module_exit(watchdog_exit);
14303 +MODULE_AUTHOR("Guido Guenther <agx@sigxcpu.org>");
14304 +MODULE_DESCRIPTION("Hardware Watchdog Device for SGI IP22");
14305 MODULE_LICENSE("GPL");
14306 --- a/drivers/char/ip27-rtc.c
14307 +++ b/drivers/char/ip27-rtc.c
14309 #include <asm/sn/klconfig.h>
14310 #include <asm/sn/sn0/ip27.h>
14311 #include <asm/sn/sn0/hub.h>
14312 +#include <asm/sn/sn_private.h>
14314 static int rtc_ioctl(struct inode *inode, struct file *file,
14315 unsigned int cmd, unsigned long arg);
14316 @@ -209,11 +210,8 @@ static struct miscdevice rtc_dev=
14318 static int __init rtc_init(void)
14322 - nid = get_nasid();
14323 rtc = (struct m48t35_rtc *)
14324 - (KL_CONFIG_CH_CONS_INFO(nid)->memory_base + IOC3_BYTEBUS_DEV0);
14325 + (KL_CONFIG_CH_CONS_INFO(master_nasid)->memory_base + IOC3_BYTEBUS_DEV0);
14327 printk(KERN_INFO "Real Time Clock Driver v%s\n", RTC_VERSION);
14328 if (misc_register(&rtc_dev)) {
14329 @@ -325,3 +323,7 @@ static void get_rtc_time(struct rtc_time
14334 +MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
14335 +MODULE_DESCRIPTION("SGI IP27 M48T35 RTC driver");
14336 +MODULE_LICENSE("GPL");
14337 --- a/drivers/char/Makefile
14338 +++ b/drivers/char/Makefile
14339 @@ -48,7 +48,12 @@ ifeq ($(ARCH),mips)
14342 ifeq ($(CONFIG_VR41XX_KIU),y)
14344 + ifeq ($(CONFIG_IBM_WORKPAD),y)
14345 + KEYMAP = ibm_workpad_keymap.o
14347 + ifeq ($(CONFIG_VICTOR_MPC30X),y)
14348 + KEYMAP = victor_mpc30x_keymap.o
14350 KEYBD = vr41xx_keyb.o
14353 @@ -251,7 +256,6 @@ obj-$(CONFIG_MK712_MOUSE) += mk712.o
14354 obj-$(CONFIG_RTC) += rtc.o
14355 obj-$(CONFIG_GEN_RTC) += genrtc.o
14356 obj-$(CONFIG_EFI_RTC) += efirtc.o
14357 -obj-$(CONFIG_SGI_DS1286) += ds1286.o
14358 obj-$(CONFIG_MIPS_RTC) += mips_rtc.o
14359 obj-$(CONFIG_SGI_IP27_RTC) += ip27-rtc.o
14360 ifeq ($(CONFIG_PPC),)
14361 @@ -259,6 +263,7 @@ ifeq ($(CONFIG_PPC),)
14363 obj-$(CONFIG_TOSHIBA) += toshiba.o
14364 obj-$(CONFIG_I8K) += i8k.o
14365 +obj-$(CONFIG_DS1286) += ds1286.o
14366 obj-$(CONFIG_DS1620) += ds1620.o
14367 obj-$(CONFIG_DS1742) += ds1742.o
14368 obj-$(CONFIG_INTEL_RNG) += i810_rng.o
14369 @@ -270,6 +275,7 @@ obj-$(CONFIG_BRIQ_PANEL) += briq_panel.o
14371 obj-$(CONFIG_ITE_GPIO) += ite_gpio.o
14372 obj-$(CONFIG_AU1X00_GPIO) += au1000_gpio.o
14373 +obj-$(CONFIG_AU1550_PSC_SPI) += au1550_psc_spi.o
14374 obj-$(CONFIG_AU1X00_USB_TTY) += au1000_usbtty.o
14375 obj-$(CONFIG_AU1X00_USB_RAW) += au1000_usbraw.o
14376 obj-$(CONFIG_COBALT_LCD) += lcd.o
14377 @@ -357,3 +363,9 @@ defkeymap.c: defkeymap.map
14379 qtronixmap.c: qtronixmap.map
14380 set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@
14382 +ibm_workpad_keymap.c: ibm_workpad_keymap.map
14383 + set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@
14385 +victor_mpc30x_keymap.c: victor_mpc30x_keymap.map
14386 + set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@
14387 --- a/drivers/char/mips_rtc.c
14388 +++ b/drivers/char/mips_rtc.c
14390 #include <asm/io.h>
14391 #include <asm/uaccess.h>
14392 #include <asm/system.h>
14397 -#if !defined(CONFIG_MIPS) || !defined(CONFIG_NEW_TIME_C)
14398 -#error "This driver is for MIPS machines with CONFIG_NEW_TIME_C defined"
14401 #include <asm/time.h>
14403 static unsigned long rtc_status = 0; /* bitmapped status byte. */
14404 --- a/drivers/char/sb1250_duart.c
14405 +++ b/drivers/char/sb1250_duart.c
14406 @@ -328,10 +328,11 @@ static int duart_write(struct tty_struct
14410 + spin_unlock_irqrestore(&us->outp_lock, flags);
14411 if (copy_from_user(us->outp_buf + us->outp_tail, buf, c)) {
14412 - spin_unlock_irqrestore(&us->outp_lock, flags);
14415 + spin_lock_irqsave(&us->outp_lock, flags);
14417 memcpy(us->outp_buf + us->outp_tail, buf, c);
14419 @@ -498,9 +499,31 @@ static void duart_set_termios(struct tty
14420 duart_set_cflag(us->line, tty->termios->c_cflag);
14423 +static int get_serial_info(uart_state_t *us, struct serial_struct * retinfo) {
14425 + struct serial_struct tmp;
14427 + memset(&tmp, 0, sizeof(tmp));
14429 + tmp.type=PORT_SB1250;
14430 + tmp.line=us->line;
14431 + tmp.port=A_DUART_CHANREG(tmp.line,0);
14432 + tmp.irq=K_INT_UART_0 + tmp.line;
14433 + tmp.xmit_fifo_size=16; /* fixed by hw */
14434 + tmp.baud_base=5000000;
14435 + tmp.io_type=SERIAL_IO_MEM;
14437 + if (copy_to_user(retinfo,&tmp,sizeof(*retinfo)))
14443 static int duart_ioctl(struct tty_struct *tty, struct file * file,
14444 unsigned int cmd, unsigned long arg)
14446 + uart_state_t *us = (uart_state_t *) tty->driver_data;
14448 /* if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
14451 @@ -517,7 +540,7 @@ static int duart_ioctl(struct tty_struct
14452 printk("Ignoring TIOCMSET\n");
14455 - printk("Ignoring TIOCGSERIAL\n");
14456 + return get_serial_info(us,(struct serial_struct *) arg);
14459 printk("Ignoring TIOCSSERIAL\n");
14460 --- a/drivers/char/serial.c
14461 +++ b/drivers/char/serial.c
14463 * Robert Schwebel <robert@schwebel.de>,
14464 * Juergen Beisert <jbeisert@eurodsn.de>,
14465 * Theodore Ts'o <tytso@mit.edu>
14467 + * 10/00: Added suport for MIPS Atlas board.
14468 + * 11/00: Hooks for serial kernel debug port support added.
14469 + * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard,
14470 + * carstenl@mips.com
14471 + * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
14474 static char *serial_version = "5.05c";
14475 @@ -413,6 +419,22 @@ static inline int serial_paranoia_check(
14479 +#if defined(CONFIG_MIPS_ATLAS) || defined(CONFIG_MIPS_SEAD)
14481 +#include <asm/mips-boards/atlas.h>
14483 +static _INLINE_ unsigned int serial_in(struct async_struct *info, int offset)
14485 + return (*(volatile unsigned int *)(mips_io_port_base + ATLAS_UART_REGS_BASE + offset*8) & 0xff);
14488 +static _INLINE_ void serial_out(struct async_struct *info, int offset, int value)
14490 + *(volatile unsigned int *)(mips_io_port_base + ATLAS_UART_REGS_BASE + offset*8) = value;
14495 static _INLINE_ unsigned int serial_in(struct async_struct *info, int offset)
14497 switch (info->io_type) {
14498 @@ -447,6 +469,8 @@ static _INLINE_ void serial_out(struct a
14499 outb(value, info->port+offset);
14506 * We used to support using pause I/O for certain machines. We
14508 +++ b/drivers/char/victor_mpc30x_keymap.map
14510 +# Victor Interlink MP-C303/304 keyboard keymap
14512 +# Copyright (C) 2003 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
14514 +# This file is subject to the terms and conditions of the GNU General Public
14515 +# License. See the file "COPYING" in the main directory of this archive
14516 +# for more details.
14517 +keymaps 0-1,4-5,8-9,12
14520 +compose as usual for "iso-8859-1"
14523 +keycode 89 = Escape
14524 +keycode 9 = Delete
14527 +keycode 73 = one exclam
14528 +keycode 18 = two quotedbl
14529 +keycode 92 = three numbersign
14530 + control keycode 92 = Escape
14531 +keycode 53 = four dollar
14532 + control keycode 53 = Control_backslash
14533 +keycode 21 = five percent
14534 + control keycode 21 = Control_bracketright
14535 +keycode 50 = six ampersand
14536 + control keycode 50 = Control_underscore
14537 +keycode 48 = seven apostrophe
14538 +keycode 51 = eight parenleft
14539 +keycode 16 = nine parenright
14540 +keycode 80 = zero asciitilde
14541 + control keycode 80 = nul
14542 +keycode 49 = minus equal
14543 +keycode 30 = asciicircum asciitilde
14544 + control keycode 30 = Control_asciicircum
14545 +keycode 5 = backslash bar
14546 + control keycode 5 = Control_backslash
14547 +keycode 13 = BackSpace
14560 +keycode 1 = at grave
14561 + control keycode 1 = nul
14562 +keycode 54 = bracketleft braceleft
14563 +keycode 63 = Return
14564 + alt keycode 63 = Meta_Control_m
14566 +keycode 23 = Caps_Lock
14576 +keycode 22 = semicolon plus
14577 +keycode 61 = colon asterisk
14578 + control keycode 61 = Control_g
14579 +keycode 65 = bracketright braceright
14580 + control keycode 65 = Control_bracketright
14582 +keycode 91 = Shift
14590 +keycode 35 = comma less
14591 +keycode 3 = period greater
14592 + control keycode 3 = Compose
14593 +keycode 38 = slash question
14594 + control keycode 38 = Delete
14595 + shift control keycode 38 = Delete
14596 +keycode 6 = backslash underscore
14597 + control keycode 6 = Control_backslash
14599 + alt keycode 55 = PageUp
14600 +keycode 14 = Shift
14602 +keycode 56 = Control
14604 +keycode 33 = space
14605 + control keycode 33 = nul
14607 + alt keycode 7 = Home
14609 + alt keycode 31 = PageDown
14610 +keycode 47 = Right
14611 + alt keycode 47 = End
14612 --- a/drivers/char/vr41xx_keyb.c
14613 +++ b/drivers/char/vr41xx_keyb.c
14614 @@ -308,7 +308,7 @@ void __devinit kbd_init_hw(void)
14616 kiu_base = VRC4173_KIU_OFFSET;
14617 mkiuintreg = VRC4173_MKIUINTREG_OFFSET;
14618 - vrc4173_clock_supply(VRC4173_KIU_CLOCK);
14619 + vrc4173_supply_clock(VRC4173_KIU_CLOCK);
14623 @@ -325,7 +325,7 @@ void __devinit kbd_init_hw(void)
14625 if (current_cpu_data.cputype == CPU_VR4111 ||
14626 current_cpu_data.cputype == CPU_VR4121)
14627 - vr41xx_clock_supply(KIU_CLOCK);
14628 + vr41xx_supply_clock(KIU_CLOCK);
14630 kiu_writew(KIURST_KIURST, KIURST);
14632 --- a/drivers/i2c/Config.in
14633 +++ b/drivers/i2c/Config.in
14634 @@ -57,6 +57,10 @@ if [ "$CONFIG_I2C" != "n" ]; then
14635 if [ "$CONFIG_SGI_IP22" = "y" ]; then
14636 dep_tristate 'I2C SGI interfaces' CONFIG_I2C_ALGO_SGI $CONFIG_I2C
14639 + if [ "$CONFIG_SOC_AU1550" = "y" -o "$CONFIG_SOC_AU1200" ]; then
14640 + dep_tristate 'Au1550/Au1200 SMBus interface' CONFIG_I2C_ALGO_AU1550 $CONFIG_I2C
14643 # This is needed for automatic patch generation: sensors code starts here
14644 # This is needed for automatic patch generation: sensors code ends here
14646 +++ b/drivers/i2c/i2c-algo-au1550.c
14649 + * i2c-algo-au1550.c: SMBus (i2c) driver algorithms for Alchemy PSC interface
14650 + * Copyright (C) 2004 Embedded Edge, LLC <dan@embeddededge.com>
14652 + * The documentation describes this as an SMBus controller, but it doesn't
14653 + * understand any of the SMBus protocol in hardware. It's really an I2C
14654 + * controller that could emulate most of the SMBus in software.
14657 +#include <linux/kernel.h>
14658 +#include <linux/module.h>
14659 +#include <linux/init.h>
14660 +#include <linux/errno.h>
14661 +#include <linux/delay.h>
14663 +#include <asm/au1000.h>
14664 +#include <asm/au1xxx_psc.h>
14666 +#include <linux/i2c.h>
14667 +#include <linux/i2c-algo-au1550.h>
14670 +wait_xfer_done(struct i2c_algo_au1550_data *adap)
14674 + volatile psc_smb_t *sp;
14676 + sp = (volatile psc_smb_t *)(adap->psc_base);
14678 + /* Wait for Tx FIFO Underflow.
14680 + for (i = 0; i < adap->xfer_timeout; i++) {
14681 + stat = sp->psc_smbevnt;
14683 + if ((stat & PSC_SMBEVNT_TU) != 0) {
14685 + sp->psc_smbevnt = PSC_SMBEVNT_TU;
14692 + return -ETIMEDOUT;
14696 +wait_ack(struct i2c_algo_au1550_data *adap)
14699 + volatile psc_smb_t *sp;
14701 + if (wait_xfer_done(adap))
14702 + return -ETIMEDOUT;
14704 + sp = (volatile psc_smb_t *)(adap->psc_base);
14706 + stat = sp->psc_smbevnt;
14709 + if ((stat & (PSC_SMBEVNT_DN | PSC_SMBEVNT_AN | PSC_SMBEVNT_AL)) != 0)
14710 + return -ETIMEDOUT;
14716 +wait_master_done(struct i2c_algo_au1550_data *adap)
14720 + volatile psc_smb_t *sp;
14722 + sp = (volatile psc_smb_t *)(adap->psc_base);
14724 + /* Wait for Master Done.
14726 + for (i = 0; i < adap->xfer_timeout; i++) {
14727 + stat = sp->psc_smbevnt;
14729 + if ((stat & PSC_SMBEVNT_MD) != 0)
14734 + return -ETIMEDOUT;
14738 +do_address(struct i2c_algo_au1550_data *adap, unsigned int addr, int rd)
14740 + volatile psc_smb_t *sp;
14743 + sp = (volatile psc_smb_t *)(adap->psc_base);
14745 + /* Reset the FIFOs, clear events.
14747 + sp->psc_smbpcr = PSC_SMBPCR_DC;
14748 + sp->psc_smbevnt = PSC_SMBEVNT_ALLCLR;
14751 + stat = sp->psc_smbpcr;
14753 + } while ((stat & PSC_SMBPCR_DC) != 0);
14755 + /* Write out the i2c chip address and specify operation
14761 + /* Put byte into fifo, start up master.
14763 + sp->psc_smbtxrx = addr;
14765 + sp->psc_smbpcr = PSC_SMBPCR_MS;
14767 + if (wait_ack(adap))
14773 +wait_for_rx_byte(struct i2c_algo_au1550_data *adap, u32 *ret_data)
14777 + volatile psc_smb_t *sp;
14779 + if (wait_xfer_done(adap))
14782 + sp = (volatile psc_smb_t *)(adap->psc_base);
14784 + j = adap->xfer_timeout * 100;
14790 + stat = sp->psc_smbstat;
14792 + if ((stat & PSC_SMBSTAT_RE) == 0)
14797 + data = sp->psc_smbtxrx;
14799 + *ret_data = data;
14805 +i2c_read(struct i2c_algo_au1550_data *adap, unsigned char *buf,
14806 + unsigned int len)
14810 + volatile psc_smb_t *sp;
14815 + /* A read is performed by stuffing the transmit fifo with
14816 + * zero bytes for timing, waiting for bytes to appear in the
14817 + * receive fifo, then reading the bytes.
14820 + sp = (volatile psc_smb_t *)(adap->psc_base);
14823 + while (i < (len-1)) {
14824 + sp->psc_smbtxrx = 0;
14826 + if (wait_for_rx_byte(adap, &data))
14833 + /* The last byte has to indicate transfer done.
14835 + sp->psc_smbtxrx = PSC_SMBTXRX_STP;
14837 + if (wait_master_done(adap))
14840 + data = sp->psc_smbtxrx;
14847 +i2c_write(struct i2c_algo_au1550_data *adap, unsigned char *buf,
14848 + unsigned int len)
14852 + volatile psc_smb_t *sp;
14857 + sp = (volatile psc_smb_t *)(adap->psc_base);
14860 + while (i < (len-1)) {
14862 + sp->psc_smbtxrx = data;
14864 + if (wait_ack(adap))
14869 + /* The last byte has to indicate transfer done.
14872 + data |= PSC_SMBTXRX_STP;
14873 + sp->psc_smbtxrx = data;
14875 + if (wait_master_done(adap))
14881 +au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
14883 + struct i2c_algo_au1550_data *adap = i2c_adap->algo_data;
14884 + struct i2c_msg *p;
14887 + for (i = 0; !err && i < num; i++) {
14889 + err = do_address(adap, p->addr, p->flags & I2C_M_RD);
14890 + if (err || !p->len)
14892 + if (p->flags & I2C_M_RD)
14893 + err = i2c_read(adap, p->buf, p->len);
14895 + err = i2c_write(adap, p->buf, p->len);
14898 + /* Return the number of messages processed, or the error code.
14906 +au1550_func(struct i2c_adapter *adap)
14908 + return I2C_FUNC_I2C;
14911 +static struct i2c_algorithm au1550_algo = {
14912 + .name = "Au1550 algorithm",
14913 + .id = I2C_ALGO_AU1550,
14914 + .master_xfer = au1550_xfer,
14915 + .functionality = au1550_func,
14919 + * registering functions to load algorithms at runtime
14920 + * Prior to calling us, the 50MHz clock frequency and routing
14921 + * must have been set up for the PSC indicated by the adapter.
14924 +i2c_au1550_add_bus(struct i2c_adapter *i2c_adap)
14926 + struct i2c_algo_au1550_data *adap = i2c_adap->algo_data;
14927 + volatile psc_smb_t *sp;
14930 + i2c_adap->algo = &au1550_algo;
14932 + /* Now, set up the PSC for SMBus PIO mode.
14934 + sp = (volatile psc_smb_t *)(adap->psc_base);
14935 + sp->psc_ctrl = PSC_CTRL_DISABLE;
14937 + sp->psc_sel = PSC_SEL_PS_SMBUSMODE;
14938 + sp->psc_smbcfg = 0;
14940 + sp->psc_ctrl = PSC_CTRL_ENABLE;
14943 + stat = sp->psc_smbstat;
14945 + } while ((stat & PSC_SMBSTAT_SR) == 0);
14947 + sp->psc_smbcfg = (PSC_SMBCFG_RT_FIFO8 | PSC_SMBCFG_TT_FIFO8 |
14948 + PSC_SMBCFG_DD_DISABLE);
14950 + /* Divide by 8 to get a 6.25 MHz clock. The later protocol
14951 + * timings are based on this clock.
14953 + sp->psc_smbcfg |= PSC_SMBCFG_SET_DIV(PSC_SMBCFG_DIV2);
14954 + sp->psc_smbmsk = PSC_SMBMSK_ALLMASK;
14957 + /* Set the protocol timer values. See Table 71 in the
14958 + * Au1550 Data Book for standard timing values.
14960 + sp->psc_smbtmr = PSC_SMBTMR_SET_TH(2) | PSC_SMBTMR_SET_PS(15) | \
14961 + PSC_SMBTMR_SET_PU(11) | PSC_SMBTMR_SET_SH(11) | \
14962 + PSC_SMBTMR_SET_SU(11) | PSC_SMBTMR_SET_CL(15) | \
14963 + PSC_SMBTMR_SET_CH(11);
14966 + sp->psc_smbcfg |= PSC_SMBCFG_DE_ENABLE;
14968 + stat = sp->psc_smbstat;
14970 + } while ((stat & PSC_SMBSTAT_DR) == 0);
14972 + return i2c_add_adapter(i2c_adap);
14977 +i2c_au1550_del_bus(struct i2c_adapter *adap)
14979 + return i2c_del_adapter(adap);
14982 +EXPORT_SYMBOL(i2c_au1550_add_bus);
14983 +EXPORT_SYMBOL(i2c_au1550_del_bus);
14985 +MODULE_AUTHOR("Dan Malek <dan@embeddededge.com>");
14986 +MODULE_DESCRIPTION("SMBus Au1550 algorithm");
14987 +MODULE_LICENSE("GPL");
14989 +++ b/drivers/i2c/i2c-au1550.c
14992 + * i2c-au1550.c: SMBus (i2c) adapter for Alchemy PSC interface
14993 + * Copyright (C) 2004 Embedded Edge, LLC <dan@embeddededge.com>
14995 + * This is just a skeleton adapter to use with the Au1550 PSC
14996 + * algorithm. It was developed for the Pb1550, but will work with
14997 + * any Au1550 board that has a similar PSC configuration.
14999 + * This program is free software; you can redistribute it and/or
15000 + * modify it under the terms of the GNU General Public License
15001 + * as published by the Free Software Foundation; either version 2
15002 + * of the License, or (at your option) any later version.
15004 + * This program is distributed in the hope that it will be useful,
15005 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
15006 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15007 + * GNU General Public License for more details.
15009 + * You should have received a copy of the GNU General Public License
15010 + * along with this program; if not, write to the Free Software
15011 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15014 +#include <linux/config.h>
15015 +#include <linux/kernel.h>
15016 +#include <linux/module.h>
15017 +#include <linux/init.h>
15018 +#include <linux/errno.h>
15020 +#include <asm/au1000.h>
15021 +#include <asm/au1xxx_psc.h>
15022 +#if defined( CONFIG_MIPS_PB1550 )
15023 + #include <asm/pb1550.h>
15025 +#if defined( CONFIG_MIPS_PB1200 )
15026 + #include <asm/pb1200.h>
15028 +#if defined( CONFIG_MIPS_DB1200 )
15029 + #include <asm/db1200.h>
15031 +#if defined( CONFIG_MIPS_FICMMP )
15032 + #include <asm/ficmmp.h>
15035 +#include <linux/i2c.h>
15036 +#include <linux/i2c-algo-au1550.h>
15041 +pb1550_reg(struct i2c_client *client)
15047 +pb1550_unreg(struct i2c_client *client)
15053 +pb1550_inc_use(struct i2c_adapter *adap)
15056 + MOD_INC_USE_COUNT;
15061 +pb1550_dec_use(struct i2c_adapter *adap)
15064 + MOD_DEC_USE_COUNT;
15068 +static struct i2c_algo_au1550_data pb1550_i2c_info = {
15069 + SMBUS_PSC_BASE, 200, 200
15072 +static struct i2c_adapter pb1550_board_adapter = {
15073 + name: "pb1550 adapter",
15074 + id: I2C_HW_AU1550_PSC,
15076 + algo_data: &pb1550_i2c_info,
15077 + inc_use: pb1550_inc_use,
15078 + dec_use: pb1550_dec_use,
15079 + client_register: pb1550_reg,
15080 + client_unregister: pb1550_unreg,
15085 +i2c_pb1550_init(void)
15087 + /* This is where we would set up a 50MHz clock source
15088 + * and routing. On the Pb1550, the SMBus is PSC2, which
15089 + * uses a shared clock with USB. This has been already
15090 + * configured by Yamon as a 48MHz clock, close enough
15093 + if (i2c_au1550_add_bus(&pb1550_board_adapter) < 0)
15099 +/* BIG hack to support the control interface on the Wolfson WM8731
15100 + * audio codec on the Pb1550 board. We get an address and two data
15101 + * bytes to write, create an i2c message, and send it across the
15102 + * i2c transfer function. We do this here because we have access to
15103 + * the i2c adapter structure.
15105 +static struct i2c_msg wm_i2c_msg; /* We don't want this stuff on the stack */
15106 +static u8 i2cbuf[2];
15109 +pb1550_wm_codec_write(u8 addr, u8 reg, u8 val)
15111 + wm_i2c_msg.addr = addr;
15112 + wm_i2c_msg.flags = 0;
15113 + wm_i2c_msg.buf = i2cbuf;
15114 + wm_i2c_msg.len = 2;
15118 + return pb1550_board_adapter.algo->master_xfer(&pb1550_board_adapter, &wm_i2c_msg, 1);
15121 +/* the next function is needed by DVB driver. */
15122 +int pb1550_i2c_xfer(struct i2c_msg msgs[], int num)
15124 + return pb1550_board_adapter.algo->master_xfer(&pb1550_board_adapter, msgs, num);
15127 +EXPORT_SYMBOL(pb1550_wm_codec_write);
15128 +EXPORT_SYMBOL(pb1550_i2c_xfer);
15130 +MODULE_AUTHOR("Dan Malek, Embedded Edge, LLC.");
15131 +MODULE_DESCRIPTION("SMBus adapter Alchemy pb1550");
15132 +MODULE_LICENSE("GPL");
15137 + return i2c_pb1550_init();
15141 +cleanup_module(void)
15143 + i2c_au1550_del_bus(&pb1550_board_adapter);
15145 --- a/drivers/i2c/i2c-core.c
15146 +++ b/drivers/i2c/i2c-core.c
15147 @@ -1277,6 +1277,9 @@ static int __init i2c_init(void)
15148 #ifdef CONFIG_I2C_MAX1617
15149 extern int i2c_max1617_init(void);
15151 +#ifdef CONFIG_I2C_ALGO_AU1550
15152 + extern int i2c_pb1550_init(void);
15155 #ifdef CONFIG_I2C_PROC
15156 extern int sensors_init(void);
15157 @@ -1332,6 +1335,10 @@ int __init i2c_init_all(void)
15158 i2c_max1617_init();
15161 +#ifdef CONFIG_I2C_ALGO_AU1550
15162 + i2c_pb1550_init();
15165 /* -------------- proc interface ---- */
15166 #ifdef CONFIG_I2C_PROC
15168 --- a/drivers/i2c/Makefile
15169 +++ b/drivers/i2c/Makefile
15170 @@ -6,7 +6,7 @@ O_TARGET := i2c.o
15172 export-objs := i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o \
15173 i2c-algo-ite.o i2c-algo-sibyte.o i2c-algo-sgi.o \
15175 + i2c-algo-au1550.o i2c-proc.o i2c-au1550.o
15177 obj-$(CONFIG_I2C) += i2c-core.o
15178 obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o
15179 @@ -25,6 +25,7 @@ obj-$(CONFIG_I2C_KEYWEST) += i2c-keywest
15180 obj-$(CONFIG_I2C_ALGO_SIBYTE) += i2c-algo-sibyte.o i2c-sibyte.o
15181 obj-$(CONFIG_I2C_MAX1617) += i2c-max1617.o
15182 obj-$(CONFIG_I2C_ALGO_SGI) += i2c-algo-sgi.o
15183 +obj-$(CONFIG_I2C_ALGO_AU1550) += i2c-algo-au1550.o i2c-au1550.o
15185 # This is needed for automatic patch generation: sensors code starts here
15186 # This is needed for automatic patch generation: sensors code ends here
15187 --- a/drivers/media/video/indycam.c
15188 +++ b/drivers/media/video/indycam.c
15189 @@ -50,13 +50,14 @@ static int indycam_attach(struct i2c_ada
15190 0x80, /* INDYCAM_GAMMA */
15194 struct indycam *camera;
15195 struct i2c_client *client;
15198 client = kmalloc(sizeof(*client), GFP_KERNEL);
15203 camera = kmalloc(sizeof(*camera), GFP_KERNEL);
15206 @@ -67,7 +68,7 @@ static int indycam_attach(struct i2c_ada
15207 client->adapter = adap;
15208 client->addr = addr;
15209 client->driver = &i2c_driver_indycam;
15210 - strcpy(client->name, "IndyCam client");
15211 + strcpy(client->name, "IndyCam client");
15212 camera->client = client;
15214 err = i2c_attach_client(client);
15215 @@ -75,18 +76,18 @@ static int indycam_attach(struct i2c_ada
15216 goto out_free_camera;
15218 camera->version = i2c_smbus_read_byte_data(client, INDYCAM_VERSION);
15219 - if (camera->version != CAMERA_VERSION_INDY &&
15220 - camera->version != CAMERA_VERSION_MOOSE) {
15221 + if ((camera->version != CAMERA_VERSION_INDY) &&
15222 + (camera->version != CAMERA_VERSION_MOOSE)) {
15224 goto out_detach_client;
15226 - printk(KERN_INFO "Indycam v%d.%d detected.\n",
15227 + printk(KERN_INFO "IndyCam v%d.%d detected.\n",
15228 INDYCAM_VERSION_MAJOR(camera->version),
15229 INDYCAM_VERSION_MINOR(camera->version));
15231 err = i2c_master_send(client, initseq, sizeof(initseq));
15233 - printk(KERN_INFO "IndyCam initalization failed\n");
15234 + printk(KERN_ERR "IndyCam initalization failed.\n");
15238 --- a/drivers/media/video/vino.c
15239 +++ b/drivers/media/video/vino.c
15241 * License version 2 as published by the Free Software Foundation.
15243 * Copyright (C) 2003 Ladislav Michl <ladis@linux-mips.org>
15244 + * Copyright (C) 2004 Mikael Nousiainen <tmnousia@cc.hut.fi>
15248 #include <linux/module.h>
15249 @@ -37,13 +39,23 @@
15250 #define DEBUG(x...)
15253 +/* Channels (who could have guessed) */
15254 +#define VINO_CHAN_NONE 0
15255 +#define VINO_CHAN_A 1
15256 +#define VINO_CHAN_B 2
15258 /* VINO video size */
15259 #define VINO_PAL_WIDTH 768
15260 #define VINO_PAL_HEIGHT 576
15261 #define VINO_NTSC_WIDTH 646
15262 #define VINO_NTSC_HEIGHT 486
15264 -/* set this to some sensible values. note: VINO_MIN_WIDTH has to be 8*x */
15265 +/* Minimum value for Y-clipping (for smaller values the images
15266 + * will be corrupted) */
15267 +#define VINO_MIN_Y_CLIPPING 2
15269 +/* Set these to some sensible values.
15270 + * Note: the picture width has to be divisible by 8 */
15271 #define VINO_MIN_WIDTH 32
15272 #define VINO_MIN_HEIGHT 32
15274 @@ -64,9 +76,7 @@ static int threshold_b = 512;
15276 struct vino_device {
15277 struct video_device vdev;
15278 -#define VINO_CHAN_A 1
15279 -#define VINO_CHAN_B 2
15281 + int chan; /* VINO_CHAN_NONE, VINO_CHAN_A or VINO_CHAN_B */
15284 unsigned int left, right, top, bottom;
15285 @@ -106,7 +116,7 @@ struct vino_device {
15287 struct vino_client {
15288 struct i2c_client *driver;
15290 + int owner; /* VINO_CHAN_NONE, VINO_CHAN_A or VINO_CHAN_B */
15293 struct vino_video {
15294 @@ -362,6 +372,7 @@ static int set_scaling(struct vino_devic
15295 static int dma_setup(struct vino_device *v)
15299 struct sgi_vino_channel *ch;
15301 ch = (v->chan == VINO_CHAN_A) ? &vino->a : &vino->b;
15302 @@ -377,14 +388,24 @@ static int dma_setup(struct vino_device
15303 ch->line_size = v->line_size - 8;
15304 /* set the alpha register */
15305 ch->alpha = v->alpha;
15306 - /* set cliping registers */
15307 - ch->clip_start = VINO_CLIP_ODD(v->top) | VINO_CLIP_EVEN(v->top+1) |
15308 + /* Set the clipping registers, this is the constant source of fun :)
15309 + * Y clipping start has to be >= 2 and end has to be start + height/2
15310 + * The values of top and bottom are even so dividing is not a problem
15312 + * The docs say that clipping values for the even field should be
15313 + * odd_end + something_to_skip_vertical_blanking + some_lines and
15314 + * even_start + height/2, though the image is good this way also
15316 + * TODO: for analog sources (SAA7191), the clipping values are a bit
15317 + * different and that case isn't yet handled
15319 + ofs = VINO_MIN_Y_CLIPPING; /* Should depend on input source */
15320 + ch->clip_start = VINO_CLIP_ODD(ofs + v->top / 2) |
15321 + VINO_CLIP_EVEN(ofs + v->top / 2 + 1) |
15322 VINO_CLIP_X(v->left);
15323 - ch->clip_end = VINO_CLIP_ODD(v->bottom) | VINO_CLIP_EVEN(v->bottom+1) |
15324 + ch->clip_end = VINO_CLIP_ODD(ofs + v->bottom / 2 - 1) |
15325 + VINO_CLIP_EVEN(ofs + v->bottom / 2) |
15326 VINO_CLIP_X(v->right);
15327 - /* FIXME: end-of-field bug workaround
15328 - VINO_CLIP_X(VINO_PAL_WIDTH);
15330 /* init the frame rate and norm (full frame rate only for now...) */
15331 ch->frame_rate = VINO_FRAMERT_RT(0x1fff) |
15332 (get_capture_norm(v) == VIDEO_MODE_PAL ?
15333 @@ -510,6 +531,7 @@ static void field_done(struct vino_devic
15334 static void vino_interrupt(int irq, void *dev_id, struct pt_regs *regs)
15337 + int a_eof, b_eof;
15339 spin_lock(&Vino->vino_lock);
15340 ctrl = vino->control;
15341 @@ -525,12 +547,14 @@ static void vino_interrupt(int irq, void
15342 vino->control = ctrl;
15343 clear_eod(&Vino->chB);
15345 + a_eof = intr & VINO_INTSTAT_A_EOF;
15346 + b_eof = intr & VINO_INTSTAT_B_EOF;
15347 vino->intr_status = ~intr;
15348 spin_unlock(&Vino->vino_lock);
15349 - /* FIXME: For now we are assuming that interrupt means that frame is
15350 - * done. That's not true, but we can live with such brokeness for
15352 - field_done(&Vino->chA);
15354 + field_done(&Vino->chA);
15356 + field_done(&Vino->chB);
15359 static int vino_grab(struct vino_device *v, int frame)
15360 --- a/drivers/mtd/devices/docprobe.c
15361 +++ b/drivers/mtd/devices/docprobe.c
15362 @@ -89,10 +89,10 @@ static unsigned long __initdata doc_loca
15364 #elif defined(CONFIG_MOMENCO_OCELOT)
15368 #elif defined(CONFIG_MOMENCO_OCELOT_G) || defined (CONFIG_MOMENCO_OCELOT_C)
15373 #warning Unknown architecture for DiskOnChip. No default probe locations defined
15376 --- a/drivers/mtd/devices/ms02-nv.c
15377 +++ b/drivers/mtd/devices/ms02-nv.c
15380 - * Copyright (c) 2001 Maciej W. Rozycki
15381 + * Copyright (c) 2001 Maciej W. Rozycki
15383 - * This program is free software; you can redistribute it and/or
15384 - * modify it under the terms of the GNU General Public License
15385 - * as published by the Free Software Foundation; either version
15386 - * 2 of the License, or (at your option) any later version.
15387 + * This program is free software; you can redistribute it and/or
15388 + * modify it under the terms of the GNU General Public License
15389 + * as published by the Free Software Foundation; either version
15390 + * 2 of the License, or (at your option) any later version.
15392 * $Id: ms02-nv.c,v 1.2 2003/01/24 14:05:17 dwmw2 Exp $
15394 @@ -29,18 +29,18 @@
15397 static char version[] __initdata =
15398 - "ms02-nv.c: v.1.0.0 13 Aug 2001 Maciej W. Rozycki.\n";
15399 + "ms02-nv.c: v.1.0.0 13 Aug 2001 Maciej W. Rozycki.\n";
15401 -MODULE_AUTHOR("Maciej W. Rozycki <macro@ds2.pg.gda.pl>");
15402 +MODULE_AUTHOR("Maciej W. Rozycki <macro@linux-mips.org>");
15403 MODULE_DESCRIPTION("DEC MS02-NV NVRAM module driver");
15404 MODULE_LICENSE("GPL");
15408 * Addresses we probe for an MS02-NV at. Modules may be located
15409 - * at any 8MB boundary within a 0MB up to 112MB range or at any 32MB
15410 - * boundary within a 0MB up to 448MB range. We don't support a module
15411 - * at 0MB, though.
15412 + * at any 8MiB boundary within a 0MiB up to 112MiB range or at any 32MiB
15413 + * boundary within a 0MiB up to 448MiB range. We don't support a module
15414 + * at 0MiB, though.
15416 static ulong ms02nv_addrs[] __initdata = {
15417 0x07000000, 0x06800000, 0x06000000, 0x05800000, 0x05000000,
15418 @@ -130,7 +130,7 @@ static int __init ms02nv_init_one(ulong
15422 - /* The module decodes 8MB of address space. */
15423 + /* The module decodes 8MiB of address space. */
15424 mod_res = kmalloc(sizeof(*mod_res), GFP_KERNEL);
15427 @@ -233,7 +233,7 @@ static int __init ms02nv_init_one(ulong
15428 goto err_out_csr_res;
15431 - printk(KERN_INFO "mtd%d: %s at 0x%08lx, size %uMB.\n",
15432 + printk(KERN_INFO "mtd%d: %s at 0x%08lx, size %uMiB.\n",
15433 mtd->index, ms02nv_name, addr, size >> 20);
15435 mp->next = root_ms02nv_mtd;
15436 @@ -293,12 +293,12 @@ static int __init ms02nv_init(void)
15438 switch (mips_machtype) {
15439 case MACH_DS5000_200:
15440 - csr = (volatile u32 *)KN02_CSR_ADDR;
15441 + csr = (volatile u32 *)KN02_CSR_BASE;
15442 if (*csr & KN02_CSR_BNK32M)
15445 case MACH_DS5000_2X0:
15446 - case MACH_DS5000:
15447 + case MACH_DS5900:
15448 csr = (volatile u32 *)KN03_MCR_BASE;
15449 if (*csr & KN03_MCR_BNK32M)
15451 --- a/drivers/mtd/devices/ms02-nv.h
15452 +++ b/drivers/mtd/devices/ms02-nv.h
15455 - * Copyright (c) 2001 Maciej W. Rozycki
15456 + * Copyright (c) 2001, 2003 Maciej W. Rozycki
15458 - * This program is free software; you can redistribute it and/or
15459 - * modify it under the terms of the GNU General Public License
15460 - * as published by the Free Software Foundation; either version
15461 - * 2 of the License, or (at your option) any later version.
15462 + * DEC MS02-NV (54-20948-01) battery backed-up NVRAM module for
15463 + * DECstation/DECsystem 5000/2x0 and DECsystem 5900 and 5900/260
15466 + * This program is free software; you can redistribute it and/or
15467 + * modify it under the terms of the GNU General Public License
15468 + * as published by the Free Software Foundation; either version
15469 + * 2 of the License, or (at your option) any later version.
15471 + * $Id: ms02-nv.h,v 1.3 2003/08/19 09:25:36 dwmw2 Exp $
15474 #include <linux/ioport.h>
15475 #include <linux/mtd/mtd.h>
15478 + * Addresses are decoded as follows:
15480 + * 0x000000 - 0x3fffff SRAM
15481 + * 0x400000 - 0x7fffff CSR
15483 + * Within the SRAM area the following ranges are forced by the system
15486 + * 0x000000 - 0x0003ff diagnostic area, destroyed upon a reboot
15487 + * 0x000400 - ENDofRAM storage area, available to operating systems
15489 + * but we can't really use the available area right from 0x000400 as
15490 + * the first word is used by the firmware as a status flag passed
15491 + * from an operating system. If anything but the valid data magic
15492 + * ID value is found, the firmware considers the SRAM clean, i.e.
15493 + * containing no valid data, and disables the battery resulting in
15494 + * data being erased as soon as power is switched off. So the choice
15495 + * for the start address of the user-available is 0x001000 which is
15496 + * nicely page aligned. The area between 0x000404 and 0x000fff may
15497 + * be used by the driver for own needs.
15499 + * The diagnostic area defines two status words to be read by an
15500 + * operating system, a magic ID to distinguish a MS02-NV board from
15501 + * anything else and a status information providing results of tests
15502 + * as well as the size of SRAM available, which can be 1MiB or 2MiB
15503 + * (that's what the firmware handles; no idea if 2MiB modules ever
15506 + * The firmware only handles the MS02-NV board if installed in the
15507 + * last (15th) slot, so for any other location the status information
15508 + * stored in the SRAM cannot be relied upon. But from the hardware
15509 + * point of view there is no problem using up to 14 such boards in a
15510 + * system -- only the 1st slot needs to be filled with a DRAM module.
15511 + * The MS02-NV board is ECC-protected, like other MS02 memory boards.
15513 + * The state of the battery as provided by the CSR is reflected on
15514 + * the two onboard LEDs. When facing the battery side of the board,
15515 + * with the LEDs at the top left and the battery at the bottom right
15516 + * (i.e. looking from the back side of the system box), their meaning
15517 + * is as follows (the system has to be powered on):
15519 + * left LED battery disable status: lit = enabled
15520 + * right LED battery condition status: lit = OK
15523 /* MS02-NV iomem register offsets. */
15524 #define MS02NV_CSR 0x400000 /* control & status register */
15526 +/* MS02-NV CSR status bits. */
15527 +#define MS02NV_CSR_BATT_OK 0x01 /* battery OK */
15528 +#define MS02NV_CSR_BATT_OFF 0x02 /* battery disabled */
15531 /* MS02-NV memory offsets. */
15532 #define MS02NV_DIAG 0x0003f8 /* diagnostic status */
15533 #define MS02NV_MAGIC 0x0003fc /* MS02-NV magic ID */
15534 -#define MS02NV_RAM 0x000400 /* general-purpose RAM start */
15535 +#define MS02NV_VALID 0x000400 /* valid data magic ID */
15536 +#define MS02NV_RAM 0x001000 /* user-exposed RAM start */
15538 -/* MS02-NV diagnostic status constants. */
15539 -#define MS02NV_DIAG_SIZE_MASK 0xf0 /* RAM size mask */
15540 -#define MS02NV_DIAG_SIZE_SHIFT 0x10 /* RAM size shift (left) */
15541 +/* MS02-NV diagnostic status bits. */
15542 +#define MS02NV_DIAG_TEST 0x01 /* SRAM test done (?) */
15543 +#define MS02NV_DIAG_RO 0x02 /* SRAM r/o test done */
15544 +#define MS02NV_DIAG_RW 0x04 /* SRAM r/w test done */
15545 +#define MS02NV_DIAG_FAIL 0x08 /* SRAM test failed */
15546 +#define MS02NV_DIAG_SIZE_MASK 0xf0 /* SRAM size mask */
15547 +#define MS02NV_DIAG_SIZE_SHIFT 0x10 /* SRAM size shift (left) */
15549 /* MS02-NV general constants. */
15550 #define MS02NV_ID 0x03021966 /* MS02-NV magic ID value */
15551 +#define MS02NV_VALID_ID 0xbd100248 /* valid data magic ID value */
15552 #define MS02NV_SLOT_SIZE 0x800000 /* size of the address space
15553 decoded by the module */
15556 typedef volatile u32 ms02nv_uint;
15558 struct ms02nv_private {
15559 --- a/drivers/mtd/maps/Config.in
15560 +++ b/drivers/mtd/maps/Config.in
15561 @@ -51,11 +51,26 @@ if [ "$CONFIG_MIPS" = "y" ]; then
15562 dep_tristate ' Pb1000 MTD support' CONFIG_MTD_PB1000 $CONFIG_MIPS_PB1000
15563 dep_tristate ' Pb1500 MTD support' CONFIG_MTD_PB1500 $CONFIG_MIPS_PB1500
15564 dep_tristate ' Pb1100 MTD support' CONFIG_MTD_PB1100 $CONFIG_MIPS_PB1100
15565 + dep_tristate ' Bosporus MTD support' CONFIG_MTD_BOSPORUS $CONFIG_MIPS_BOSPORUS
15566 + dep_tristate ' XXS1500 boot flash device' CONFIG_MTD_XXS1500 $CONFIG_MIPS_XXS1500
15567 + dep_tristate ' MTX-1 flash device' CONFIG_MTD_MTX1 $CONFIG_MIPS_MTX1
15568 if [ "$CONFIG_MTD_PB1500" = "y" -o "$CONFIG_MTD_PB1500" = "m" \
15569 -o "$CONFIG_MTD_PB1100" = "y" -o "$CONFIG_MTD_PB1100" = "m" ]; then
15570 bool ' Pb[15]00 boot flash device' CONFIG_MTD_PB1500_BOOT
15571 bool ' Pb[15]00 user flash device (2nd 32MiB bank)' CONFIG_MTD_PB1500_USER
15573 + tristate ' Db1x00 MTD support' CONFIG_MTD_DB1X00
15574 + if [ "$CONFIG_MTD_DB1X00" = "y" -o "$CONFIG_MTD_DB1X00" = "m" ]; then
15575 + bool ' Db1x00 boot flash device' CONFIG_MTD_DB1X00_BOOT
15576 + bool ' Db1x00 user flash device (2nd bank)' CONFIG_MTD_DB1X00_USER
15578 + tristate ' Pb1550 MTD support' CONFIG_MTD_PB1550
15579 + if [ "$CONFIG_MTD_PB1550" = "y" -o "$CONFIG_MTD_PB1550" = "m" ]; then
15580 + bool ' Pb1550 Boot Flash' CONFIG_MTD_PB1550_BOOT
15581 + bool ' Pb1550 User Parameter Flash' CONFIG_MTD_PB1550_USER
15583 + dep_tristate ' Hydrogen 3 MTD support' CONFIG_MTD_HYDROGEN3 $CONFIG_MIPS_HYDROGEN3
15584 + dep_tristate ' Mirage MTD support' CONFIG_MTD_MIRAGE $CONFIG_MIPS_MIRAGE
15585 dep_tristate ' Flash chip mapping on ITE QED-4N-S01B, Globespan IVR or custom board' CONFIG_MTD_CSTM_MIPS_IXX $CONFIG_MTD_CFI $CONFIG_MTD_JEDEC $CONFIG_MTD_PARTITIONS
15586 if [ "$CONFIG_MTD_CSTM_MIPS_IXX" = "y" -o "$CONFIG_MTD_CSTM_MIPS_IXX" = "m" ]; then
15587 hex ' Physical start address of flash mapping' CONFIG_MTD_CSTM_MIPS_IXX_START 0x8000000
15589 +++ b/drivers/mtd/maps/db1x00-flash.c
15592 + * Flash memory access on Alchemy Db1xxx boards
15594 + * (C) 2003 Pete Popov <ppopov@pacbell.net>
15598 +#include <linux/config.h>
15599 +#include <linux/module.h>
15600 +#include <linux/types.h>
15601 +#include <linux/kernel.h>
15603 +#include <linux/mtd/mtd.h>
15604 +#include <linux/mtd/map.h>
15605 +#include <linux/mtd/partitions.h>
15607 +#include <asm/io.h>
15608 +#include <asm/au1000.h>
15609 +#include <asm/db1x00.h>
15612 +#define DBG(x...) printk(x)
15617 +static unsigned long window_addr;
15618 +static unsigned long window_size;
15619 +static unsigned long flash_size;
15621 +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
15624 + ret = __raw_readb(map->map_priv_1 + ofs);
15625 + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
15629 +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
15632 + ret = __raw_readw(map->map_priv_1 + ofs);
15633 + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
15637 +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
15640 + ret = __raw_readl(map->map_priv_1 + ofs);
15641 + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
15645 +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
15647 + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
15648 + memcpy_fromio(to, map->map_priv_1 + from, len);
15651 +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
15653 + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
15654 + __raw_writeb(d, map->map_priv_1 + adr);
15658 +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
15660 + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
15661 + __raw_writew(d, map->map_priv_1 + adr);
15665 +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
15667 + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
15668 + __raw_writel(d, map->map_priv_1 + adr);
15672 +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
15674 + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
15675 + memcpy_toio(map->map_priv_1 + to, from, len);
15678 +static struct map_info db1x00_map = {
15679 + name: "Db1x00 flash",
15680 + read8: physmap_read8,
15681 + read16: physmap_read16,
15682 + read32: physmap_read32,
15683 + copy_from: physmap_copy_from,
15684 + write8: physmap_write8,
15685 + write16: physmap_write16,
15686 + write32: physmap_write32,
15687 + copy_to: physmap_copy_to,
15690 +static unsigned char flash_buswidth = 4;
15693 + * The Db1x boards support different flash densities. We setup
15694 + * the mtd_partition structures below for default of 64Mbit
15695 + * flash densities, and override the partitions sizes, if
15696 + * necessary, after we check the board status register.
15699 +#ifdef DB1X00_BOTH_BANKS
15700 +/* both banks will be used. Combine the first bank and the first
15701 + * part of the second bank together into a single jffs/jffs2
15704 +static struct mtd_partition db1x00_partitions[] = {
15708 + offset: 0x0000000
15712 + offset: MTDPART_OFS_APPEND,
15713 + mask_flags: MTD_WRITEABLE
15715 + name: "raw kernel",
15716 + size: (0x300000-0x40000), /* last 256KB is yamon env */
15717 + offset: MTDPART_OFS_APPEND,
15720 +#elif defined(DB1X00_BOOT_ONLY)
15721 +static struct mtd_partition db1x00_partitions[] = {
15724 + size: 0x00c00000,
15725 + offset: 0x0000000
15729 + offset: MTDPART_OFS_APPEND,
15730 + mask_flags: MTD_WRITEABLE
15732 + name: "raw kernel",
15733 + size: (0x300000-0x40000), /* last 256KB is yamon env */
15734 + offset: MTDPART_OFS_APPEND,
15737 +#elif defined(DB1X00_USER_ONLY)
15738 +static struct mtd_partition db1x00_partitions[] = {
15742 + offset: 0x0000000
15744 + name: "raw kernel",
15745 + size: MTDPART_SIZ_FULL,
15746 + offset: MTDPART_OFS_APPEND,
15750 +#error MTD_DB1X00 define combo error /* should never happen */
15754 +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
15756 +static struct mtd_partition *parsed_parts;
15757 +static struct mtd_info *mymtd;
15760 + * Probe the flash density and setup window address and size
15761 + * based on user CONFIG options. There are times when we don't
15762 + * want the MTD driver to be probing the boot or user flash,
15763 + * so having the option to enable only one bank is important.
15765 +int setup_flash_params()
15767 + switch ((bcsr->status >> 14) & 0x3) {
15768 + case 0: /* 64Mbit devices */
15769 + flash_size = 0x800000; /* 8MB per part */
15770 +#if defined(DB1X00_BOTH_BANKS)
15771 + window_addr = 0x1E000000;
15772 + window_size = 0x2000000;
15773 +#elif defined(DB1X00_BOOT_ONLY)
15774 + window_addr = 0x1F000000;
15775 + window_size = 0x1000000;
15776 +#else /* USER ONLY */
15777 + window_addr = 0x1E000000;
15778 + window_size = 0x1000000;
15782 + /* 128 Mbit devices */
15783 + flash_size = 0x1000000; /* 16MB per part */
15784 +#if defined(DB1X00_BOTH_BANKS)
15785 + window_addr = 0x1C000000;
15786 + window_size = 0x4000000;
15787 + /* USERFS from 0x1C00 0000 to 0x1FC0 0000 */
15788 + db1x00_partitions[0].size = 0x3C00000;
15789 +#elif defined(DB1X00_BOOT_ONLY)
15790 + window_addr = 0x1E000000;
15791 + window_size = 0x2000000;
15792 + /* USERFS from 0x1E00 0000 to 0x1FC0 0000 */
15793 + db1x00_partitions[0].size = 0x1C00000;
15794 +#else /* USER ONLY */
15795 + window_addr = 0x1C000000;
15796 + window_size = 0x2000000;
15797 + /* USERFS from 0x1C00 0000 to 0x1DE00000 */
15798 + db1x00_partitions[0].size = 0x1DE0000;
15802 + /* 256 Mbit devices */
15803 + flash_size = 0x4000000; /* 64MB per part */
15804 +#if defined(DB1X00_BOTH_BANKS)
15806 +#elif defined(DB1X00_BOOT_ONLY)
15807 + /* Boot ROM flash bank only; no user bank */
15808 + window_addr = 0x1C000000;
15809 + window_size = 0x4000000;
15810 + /* USERFS from 0x1C00 0000 to 0x1FC00000 */
15811 + db1x00_partitions[0].size = 0x3C00000;
15812 +#else /* USER ONLY */
15822 +int __init db1x00_mtd_init(void)
15824 + struct mtd_partition *parts;
15825 + int nb_parts = 0;
15828 + /* Default flash buswidth */
15829 + db1x00_map.buswidth = flash_buswidth;
15831 + if (setup_flash_params())
15835 + * Static partition definition selection
15837 + part_type = "static";
15838 + parts = db1x00_partitions;
15839 + nb_parts = NB_OF(db1x00_partitions);
15840 + db1x00_map.size = window_size;
15843 + * Now let's probe for the actual flash. Do it here since
15844 + * specific machine settings might have been set above.
15846 + printk(KERN_NOTICE "Db1xxx flash: probing %d-bit flash bus\n",
15847 + db1x00_map.buswidth*8);
15848 + db1x00_map.map_priv_1 =
15849 + (unsigned long)ioremap(window_addr, window_size);
15850 + mymtd = do_map_probe("cfi_probe", &db1x00_map);
15851 + if (!mymtd) return -ENXIO;
15852 + mymtd->module = THIS_MODULE;
15854 + add_mtd_partitions(mymtd, parts, nb_parts);
15858 +static void __exit db1x00_mtd_cleanup(void)
15861 + del_mtd_partitions(mymtd);
15862 + map_destroy(mymtd);
15863 + if (parsed_parts)
15864 + kfree(parsed_parts);
15868 +module_init(db1x00_mtd_init);
15869 +module_exit(db1x00_mtd_cleanup);
15871 +MODULE_AUTHOR("Pete Popov");
15872 +MODULE_DESCRIPTION("Db1x00 mtd map driver");
15873 +MODULE_LICENSE("GPL");
15875 +++ b/drivers/mtd/maps/hydrogen3-flash.c
15878 + * Flash memory access on Alchemy HydrogenIII boards
15880 + * (C) 2003 Pete Popov <ppopov@pacbell.net>
15884 +#include <linux/config.h>
15885 +#include <linux/module.h>
15886 +#include <linux/types.h>
15887 +#include <linux/kernel.h>
15889 +#include <linux/mtd/mtd.h>
15890 +#include <linux/mtd/map.h>
15891 +#include <linux/mtd/partitions.h>
15893 +#include <asm/io.h>
15894 +#include <asm/au1000.h>
15897 +#define DBG(x...) printk(x)
15902 +#define WINDOW_ADDR 0x1E000000
15903 +#define WINDOW_SIZE 0x02000000
15906 +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
15909 + ret = __raw_readb(map->map_priv_1 + ofs);
15910 + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
15914 +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
15917 + ret = __raw_readw(map->map_priv_1 + ofs);
15918 + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
15922 +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
15925 + ret = __raw_readl(map->map_priv_1 + ofs);
15926 + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
15930 +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
15932 + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
15933 + memcpy_fromio(to, map->map_priv_1 + from, len);
15936 +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
15938 + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
15939 + __raw_writeb(d, map->map_priv_1 + adr);
15943 +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
15945 + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
15946 + __raw_writew(d, map->map_priv_1 + adr);
15950 +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
15952 + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
15953 + __raw_writel(d, map->map_priv_1 + adr);
15957 +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
15959 + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
15960 + memcpy_toio(map->map_priv_1 + to, from, len);
15963 +static struct map_info hydrogen3_map = {
15964 + name: "HydrogenIII flash",
15965 + read8: physmap_read8,
15966 + read16: physmap_read16,
15967 + read32: physmap_read32,
15968 + copy_from: physmap_copy_from,
15969 + write8: physmap_write8,
15970 + write16: physmap_write16,
15971 + write32: physmap_write32,
15972 + copy_to: physmap_copy_to,
15975 +static unsigned char flash_buswidth = 4;
15977 +/* MTDPART_OFS_APPEND is vastly preferred to any attempt at statically lining
15978 + * up the offsets. */
15979 +static struct mtd_partition hydrogen3_partitions[] = {
15983 + offset: 0x0000000
15987 + offset: MTDPART_OFS_APPEND,
15988 + mask_flags: MTD_WRITEABLE
15990 + name: "raw kernel",
15992 + offset: MTDPART_OFS_APPEND
15996 +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
15998 +static struct mtd_partition *parsed_parts;
15999 +static struct mtd_info *mymtd;
16001 +int __init hydrogen3_mtd_init(void)
16003 + struct mtd_partition *parts;
16004 + int nb_parts = 0;
16007 + /* Default flash buswidth */
16008 + hydrogen3_map.buswidth = flash_buswidth;
16011 + * Static partition definition selection
16013 + part_type = "static";
16014 + parts = hydrogen3_partitions;
16015 + nb_parts = NB_OF(hydrogen3_partitions);
16016 + hydrogen3_map.size = WINDOW_SIZE;
16019 + * Now let's probe for the actual flash. Do it here since
16020 + * specific machine settings might have been set above.
16022 + printk(KERN_NOTICE "HydrogenIII flash: probing %d-bit flash bus\n",
16023 + hydrogen3_map.buswidth*8);
16024 + hydrogen3_map.map_priv_1 =
16025 + (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
16026 + mymtd = do_map_probe("cfi_probe", &hydrogen3_map);
16027 + if (!mymtd) return -ENXIO;
16028 + mymtd->module = THIS_MODULE;
16030 + add_mtd_partitions(mymtd, parts, nb_parts);
16034 +static void __exit hydrogen3_mtd_cleanup(void)
16037 + del_mtd_partitions(mymtd);
16038 + map_destroy(mymtd);
16039 + if (parsed_parts)
16040 + kfree(parsed_parts);
16046 +static int __init _bootflashonly(char *str)
16048 + bootflashonly = simple_strtol(str, NULL, 0);
16053 +__setup("bootflashonly=", _bootflashonly);
16058 +module_init(hydrogen3_mtd_init);
16059 +module_exit(hydrogen3_mtd_cleanup);
16061 +MODULE_PARM(bootflashonly, "i");
16062 +MODULE_PARM_DESC(bootflashonly, "1=use \"boot flash only\"");
16063 +MODULE_AUTHOR("Pete Popov");
16064 +MODULE_DESCRIPTION("HydrogenIII mtd map driver");
16065 +MODULE_LICENSE("GPL");
16066 --- a/drivers/mtd/maps/lasat.c
16067 +++ b/drivers/mtd/maps/lasat.c
16070 * Flash device on lasat 100 and 200 boards
16072 - * Presumably (C) 2002 Brian Murphy <brian@murphy.dk> or whoever he
16075 - * This program is free software; you can redistribute it and/or
16076 - * modify it under the terms of the GNU General Public License version
16077 - * 2 as published by the Free Software Foundation.
16079 - * $Id: lasat.c,v 1.1 2003/01/24 14:26:38 dwmw2 Exp $
16083 #include <linux/module.h>
16085 #include <linux/mtd/partitions.h>
16086 #include <linux/config.h>
16087 #include <asm/lasat/lasat.h>
16088 -#include <asm/lasat/lasat_mtd.h>
16090 static struct mtd_info *mymtd;
16092 @@ -69,30 +59,33 @@ static void sp_copy_to(struct map_info *
16095 static struct map_info sp_map = {
16096 - .name = "SP flash",
16098 - .read8 = sp_read8,
16099 - .read16 = sp_read16,
16100 - .read32 = sp_read32,
16101 - .copy_from = sp_copy_from,
16102 - .write8 = sp_write8,
16103 - .write16 = sp_write16,
16104 - .write32 = sp_write32,
16105 - .copy_to = sp_copy_to
16106 + name: "SP flash",
16109 + read16: sp_read16,
16110 + read32: sp_read32,
16111 + copy_from: sp_copy_from,
16112 + write8: sp_write8,
16113 + write16: sp_write16,
16114 + write32: sp_write32,
16115 + copy_to: sp_copy_to
16118 static struct mtd_partition partition_info[LASAT_MTD_LAST];
16119 -static char *lasat_mtd_partnames[] = {"Bootloader", "Service", "Normal", "Filesystem", "Config"};
16120 +static char *lasat_mtd_partnames[] = {"Bootloader", "Service", "Normal", "Config", "Filesystem"};
16122 static int __init init_sp(void)
16126 /* this does not play well with the old flash code which
16127 * protects and uprotects the flash when necessary */
16128 printk(KERN_NOTICE "Unprotecting flash\n");
16129 *lasat_misc->flash_wp_reg |= 1 << lasat_misc->flash_wp_bit;
16131 - sp_map.map_priv_1 = lasat_flash_partition_start(LASAT_MTD_BOOTLOADER);
16132 + sp_map.map_priv_1 = ioremap_nocache(
16133 + lasat_flash_partition_start(LASAT_MTD_BOOTLOADER),
16134 + lasat_board_info.li_flash_size);
16135 sp_map.size = lasat_board_info.li_flash_size;
16137 printk(KERN_NOTICE "sp flash device: %lx at %lx\n",
16138 @@ -109,12 +102,15 @@ static int __init init_sp(void)
16140 for (i=0; i < LASAT_MTD_LAST; i++) {
16141 size = lasat_flash_partition_size(i);
16142 - partition_info[i].size = size;
16143 - partition_info[i].offset = offset;
16147 + partition_info[i].size = size;
16148 + partition_info[i].offset = offset;
16153 - add_mtd_partitions( mymtd, partition_info, LASAT_MTD_LAST );
16154 + add_mtd_partitions( mymtd, partition_info, nparts );
16158 @@ -124,11 +120,11 @@ static int __init init_sp(void)
16159 static void __exit cleanup_sp(void)
16162 - del_mtd_partitions(mymtd);
16163 - map_destroy(mymtd);
16164 + del_mtd_partitions(mymtd);
16165 + map_destroy(mymtd);
16167 if (sp_map.map_priv_1) {
16168 - sp_map.map_priv_1 = 0;
16169 + sp_map.map_priv_1 = 0;
16173 --- a/drivers/mtd/maps/Makefile
16174 +++ b/drivers/mtd/maps/Makefile
16175 @@ -52,7 +52,13 @@ obj-$(CONFIG_MTD_PCI) += pci.o
16176 obj-$(CONFIG_MTD_PB1000) += pb1xxx-flash.o
16177 obj-$(CONFIG_MTD_PB1100) += pb1xxx-flash.o
16178 obj-$(CONFIG_MTD_PB1500) += pb1xxx-flash.o
16179 +obj-$(CONFIG_MTD_XXS1500) += xxs1500.o
16180 +obj-$(CONFIG_MTD_MTX1) += mtx-1.o
16181 obj-$(CONFIG_MTD_LASAT) += lasat.o
16182 +obj-$(CONFIG_MTD_DB1X00) += db1x00-flash.o
16183 +obj-$(CONFIG_MTD_PB1550) += pb1550-flash.o
16184 +obj-$(CONFIG_MTD_HYDROGEN3) += hydrogen3-flash.o
16185 +obj-$(CONFIG_MTD_BOSPORUS) += pb1xxx-flash.o
16186 obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o
16187 obj-$(CONFIG_MTD_EDB7312) += edb7312.o
16188 obj-$(CONFIG_MTD_IMPA7) += impa7.o
16189 @@ -61,5 +67,6 @@ obj-$(CONFIG_MTD_REDWOOD) += redwood.o
16190 obj-$(CONFIG_MTD_UCLINUX) += uclinux.o
16191 obj-$(CONFIG_MTD_NETtel) += nettel.o
16192 obj-$(CONFIG_MTD_SCB2_FLASH) += scb2_flash.o
16193 +obj-$(CONFIG_MTD_MIRAGE) += mirage-flash.o
16195 include $(TOPDIR)/Rules.make
16197 +++ b/drivers/mtd/maps/mirage-flash.c
16200 + * Flash memory access on AMD Mirage board.
16202 + * (C) 2003 Embedded Edge
16203 + * based on mirage-flash.c:
16204 + * (C) 2003 Pete Popov <ppopov@pacbell.net>
16208 +#include <linux/config.h>
16209 +#include <linux/module.h>
16210 +#include <linux/types.h>
16211 +#include <linux/kernel.h>
16213 +#include <linux/mtd/mtd.h>
16214 +#include <linux/mtd/map.h>
16215 +#include <linux/mtd/partitions.h>
16217 +#include <asm/io.h>
16218 +#include <asm/au1000.h>
16219 +//#include <asm/mirage.h>
16222 +#define DBG(x...) printk(x)
16227 +static unsigned long window_addr;
16228 +static unsigned long window_size;
16229 +static unsigned long flash_size;
16231 +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
16234 + ret = __raw_readb(map->map_priv_1 + ofs);
16235 + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16239 +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
16242 + ret = __raw_readw(map->map_priv_1 + ofs);
16243 + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16247 +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
16250 + ret = __raw_readl(map->map_priv_1 + ofs);
16251 + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16255 +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
16257 + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
16258 + memcpy_fromio(to, map->map_priv_1 + from, len);
16261 +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
16263 + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16264 + __raw_writeb(d, map->map_priv_1 + adr);
16268 +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
16270 + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16271 + __raw_writew(d, map->map_priv_1 + adr);
16275 +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
16277 + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16278 + __raw_writel(d, map->map_priv_1 + adr);
16282 +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
16284 + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
16285 + memcpy_toio(map->map_priv_1 + to, from, len);
16288 +static struct map_info mirage_map = {
16289 + name: "Mirage flash",
16290 + read8: physmap_read8,
16291 + read16: physmap_read16,
16292 + read32: physmap_read32,
16293 + copy_from: physmap_copy_from,
16294 + write8: physmap_write8,
16295 + write16: physmap_write16,
16296 + write32: physmap_write32,
16297 + copy_to: physmap_copy_to,
16300 +static unsigned char flash_buswidth = 4;
16302 +static struct mtd_partition mirage_partitions[] = {
16306 + offset: 0x0000000
16310 + offset: MTDPART_OFS_APPEND,
16311 + mask_flags: MTD_WRITEABLE
16313 + name: "raw kernel",
16314 + size: (0x300000-0x40000), /* last 256KB is yamon env */
16315 + offset: MTDPART_OFS_APPEND,
16319 +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
16321 +static struct mtd_partition *parsed_parts;
16322 +static struct mtd_info *mymtd;
16325 + * Probe the flash density and setup window address and size
16326 + * based on user CONFIG options. There are times when we don't
16327 + * want the MTD driver to be probing the boot or user flash,
16328 + * so having the option to enable only one bank is important.
16330 +int setup_flash_params()
16332 + flash_size = 0x4000000; /* 64MB per part */
16333 + /* Boot ROM flash bank only; no user bank */
16334 + window_addr = 0x1C000000;
16335 + window_size = 0x4000000;
16336 + /* USERFS from 0x1C00 0000 to 0x1FC00000 */
16337 + mirage_partitions[0].size = 0x3C00000;
16341 +int __init mirage_mtd_init(void)
16343 + struct mtd_partition *parts;
16344 + int nb_parts = 0;
16347 + /* Default flash buswidth */
16348 + mirage_map.buswidth = flash_buswidth;
16350 + if (setup_flash_params())
16354 + * Static partition definition selection
16356 + part_type = "static";
16357 + parts = mirage_partitions;
16358 + nb_parts = NB_OF(mirage_partitions);
16359 + mirage_map.size = window_size;
16362 + * Now let's probe for the actual flash. Do it here since
16363 + * specific machine settings might have been set above.
16365 + printk(KERN_NOTICE "Mirage flash: probing %d-bit flash bus\n",
16366 + mirage_map.buswidth*8);
16367 + mirage_map.map_priv_1 =
16368 + (unsigned long)ioremap(window_addr, window_size);
16369 + mymtd = do_map_probe("cfi_probe", &mirage_map);
16370 + if (!mymtd) return -ENXIO;
16371 + mymtd->module = THIS_MODULE;
16373 + add_mtd_partitions(mymtd, parts, nb_parts);
16377 +static void __exit mirage_mtd_cleanup(void)
16380 + del_mtd_partitions(mymtd);
16381 + map_destroy(mymtd);
16382 + if (parsed_parts)
16383 + kfree(parsed_parts);
16387 +module_init(mirage_mtd_init);
16388 +module_exit(mirage_mtd_cleanup);
16390 +MODULE_AUTHOR("Embedded Edge");
16391 +MODULE_DESCRIPTION("Mirage mtd map driver");
16392 +MODULE_LICENSE("GPL");
16394 +++ b/drivers/mtd/maps/mtx-1.c
16397 + * Flash memory access on 4G Systems MTX-1 board
16399 + * (C) 2003 Pete Popov <ppopov@mvista.com>
16400 + * Bruno Randolf <bruno.randolf@4g-systems.de>
16403 +#include <linux/config.h>
16404 +#include <linux/module.h>
16405 +#include <linux/types.h>
16406 +#include <linux/kernel.h>
16408 +#include <linux/mtd/mtd.h>
16409 +#include <linux/mtd/map.h>
16410 +#include <linux/mtd/partitions.h>
16412 +#include <asm/io.h>
16413 +#include <asm/au1000.h>
16416 +#define DBG(x...) printk(x)
16421 +#ifdef CONFIG_MIPS_MTX1
16422 +#define WINDOW_ADDR 0x1E000000
16423 +#define WINDOW_SIZE 0x2000000
16426 +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
16429 + ret = __raw_readb(map->map_priv_1 + ofs);
16430 + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16434 +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
16437 + ret = __raw_readw(map->map_priv_1 + ofs);
16438 + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16442 +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
16445 + ret = __raw_readl(map->map_priv_1 + ofs);
16446 + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16450 +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
16452 + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
16453 + memcpy_fromio(to, map->map_priv_1 + from, len);
16456 +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
16458 + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16459 + __raw_writeb(d, map->map_priv_1 + adr);
16463 +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
16465 + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16466 + __raw_writew(d, map->map_priv_1 + adr);
16470 +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
16472 + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16473 + __raw_writel(d, map->map_priv_1 + adr);
16477 +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
16479 + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
16480 + memcpy_toio(map->map_priv_1 + to, from, len);
16485 +static struct map_info mtx1_map = {
16486 + name: "MTX-1 flash",
16487 + read8: physmap_read8,
16488 + read16: physmap_read16,
16489 + read32: physmap_read32,
16490 + copy_from: physmap_copy_from,
16491 + write8: physmap_write8,
16492 + write16: physmap_write16,
16493 + write32: physmap_write32,
16494 + copy_to: physmap_copy_to,
16498 +static unsigned long flash_size = 0x01000000;
16499 +static unsigned char flash_buswidth = 4;
16500 +static struct mtd_partition mtx1_partitions[] = {
16508 + offset: MTDPART_OFS_APPEND,
16509 + mask_flags: MTD_WRITEABLE
16511 + name: "raw kernel",
16513 + offset: MTDPART_OFS_APPEND,
16515 + name: "yamon env vars",
16517 + offset: MTDPART_OFS_APPEND,
16518 + mask_flags: MTD_WRITEABLE
16523 +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
16525 +static struct mtd_partition *parsed_parts;
16526 +static struct mtd_info *mymtd;
16528 +int __init mtx1_mtd_init(void)
16530 + struct mtd_partition *parts;
16531 + int nb_parts = 0;
16534 + /* Default flash buswidth */
16535 + mtx1_map.buswidth = flash_buswidth;
16538 + * Static partition definition selection
16540 + part_type = "static";
16541 + parts = mtx1_partitions;
16542 + nb_parts = NB_OF(mtx1_partitions);
16543 + mtx1_map.size = flash_size;
16546 + * Now let's probe for the actual flash. Do it here since
16547 + * specific machine settings might have been set above.
16549 + printk(KERN_NOTICE "MTX-1 flash: probing %d-bit flash bus\n",
16550 + mtx1_map.buswidth*8);
16551 + mtx1_map.map_priv_1 =
16552 + (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
16553 + mymtd = do_map_probe("cfi_probe", &mtx1_map);
16554 + if (!mymtd) return -ENXIO;
16555 + mymtd->module = THIS_MODULE;
16557 + add_mtd_partitions(mymtd, parts, nb_parts);
16561 +static void __exit mtx1_mtd_cleanup(void)
16564 + del_mtd_partitions(mymtd);
16565 + map_destroy(mymtd);
16566 + if (parsed_parts)
16567 + kfree(parsed_parts);
16571 +module_init(mtx1_mtd_init);
16572 +module_exit(mtx1_mtd_cleanup);
16574 +MODULE_AUTHOR("Pete Popov");
16575 +MODULE_DESCRIPTION("MTX-1 CFI map driver");
16576 +MODULE_LICENSE("GPL");
16578 +++ b/drivers/mtd/maps/pb1550-flash.c
16581 + * Flash memory access on Alchemy Pb1550 board
16583 + * (C) 2004 Embedded Edge, LLC, based on pb1550-flash.c:
16584 + * (C) 2003 Pete Popov <ppopov@pacbell.net>
16588 +#include <linux/config.h>
16589 +#include <linux/module.h>
16590 +#include <linux/types.h>
16591 +#include <linux/kernel.h>
16593 +#include <linux/mtd/mtd.h>
16594 +#include <linux/mtd/map.h>
16595 +#include <linux/mtd/partitions.h>
16597 +#include <asm/io.h>
16598 +#include <asm/au1000.h>
16599 +#include <asm/pb1550.h>
16602 +#define DBG(x...) printk(x)
16607 +static unsigned long window_addr;
16608 +static unsigned long window_size;
16610 +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
16613 + ret = __raw_readb(map->map_priv_1 + ofs);
16614 + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16618 +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
16621 + ret = __raw_readw(map->map_priv_1 + ofs);
16622 + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16626 +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
16629 + ret = __raw_readl(map->map_priv_1 + ofs);
16630 + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16634 +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
16636 + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
16637 + memcpy_fromio(to, map->map_priv_1 + from, len);
16640 +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
16642 + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16643 + __raw_writeb(d, map->map_priv_1 + adr);
16647 +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
16649 + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16650 + __raw_writew(d, map->map_priv_1 + adr);
16654 +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
16656 + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16657 + __raw_writel(d, map->map_priv_1 + adr);
16661 +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
16663 + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
16664 + memcpy_toio(map->map_priv_1 + to, from, len);
16667 +static struct map_info pb1550_map = {
16668 + name: "Pb1550 flash",
16669 + read8: physmap_read8,
16670 + read16: physmap_read16,
16671 + read32: physmap_read32,
16672 + copy_from: physmap_copy_from,
16673 + write8: physmap_write8,
16674 + write16: physmap_write16,
16675 + write32: physmap_write32,
16676 + copy_to: physmap_copy_to,
16679 +static unsigned char flash_buswidth = 4;
16682 + * Support only 64MB NOR Flash parts
16685 +#ifdef PB1550_BOTH_BANKS
16686 +/* both banks will be used. Combine the first bank and the first
16687 + * part of the second bank together into a single jffs/jffs2
16690 +static struct mtd_partition pb1550_partitions[] = {
16691 + /* assume boot[2:0]:swap is '0000' or '1000', which translates to:
16692 + * 1C00 0000 1FFF FFFF CE0 64MB Boot NOR Flash
16693 + * 1800 0000 1BFF FFFF CE0 64MB Param NOR Flash
16697 + size: (0x1FC00000 - 0x18000000),
16698 + offset: 0x0000000
16702 + offset: MTDPART_OFS_APPEND,
16703 + mask_flags: MTD_WRITEABLE
16705 + name: "raw kernel",
16706 + size: (0x300000 - 0x40000), /* last 256KB is yamon env */
16707 + offset: MTDPART_OFS_APPEND,
16710 +#elif defined(PB1550_BOOT_ONLY)
16711 +static struct mtd_partition pb1550_partitions[] = {
16712 + /* assume boot[2:0]:swap is '0000' or '1000', which translates to:
16713 + * 1C00 0000 1FFF FFFF CE0 64MB Boot NOR Flash
16717 + size: 0x03c00000,
16718 + offset: 0x0000000
16722 + offset: MTDPART_OFS_APPEND,
16723 + mask_flags: MTD_WRITEABLE
16725 + name: "raw kernel",
16726 + size: (0x300000-0x40000), /* last 256KB is yamon env */
16727 + offset: MTDPART_OFS_APPEND,
16730 +#elif defined(PB1550_USER_ONLY)
16731 +static struct mtd_partition pb1550_partitions[] = {
16732 + /* assume boot[2:0]:swap is '0000' or '1000', which translates to:
16733 + * 1800 0000 1BFF FFFF CE0 64MB Param NOR Flash
16737 + size: (0x4000000 - 0x200000), /* reserve 2MB for raw kernel */
16738 + offset: 0x0000000
16740 + name: "raw kernel",
16741 + size: MTDPART_SIZ_FULL,
16742 + offset: MTDPART_OFS_APPEND,
16746 +#error MTD_PB1550 define combo error /* should never happen */
16749 +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
16751 +static struct mtd_partition *parsed_parts;
16752 +static struct mtd_info *mymtd;
16755 + * Probe the flash density and setup window address and size
16756 + * based on user CONFIG options. There are times when we don't
16757 + * want the MTD driver to be probing the boot or user flash,
16758 + * so having the option to enable only one bank is important.
16760 +int setup_flash_params()
16762 + u16 boot_swapboot;
16763 + boot_swapboot = (au_readl(MEM_STSTAT) & (0x7<<1)) |
16764 + ((bcsr->status >> 6) & 0x1);
16765 + printk("Pb1550 MTD: boot:swap %d\n", boot_swapboot);
16767 + switch (boot_swapboot) {
16768 + case 0: /* 512Mbit devices, both enabled */
16772 +#if defined(PB1550_BOTH_BANKS)
16773 + window_addr = 0x18000000;
16774 + window_size = 0x8000000;
16775 +#elif defined(PB1550_BOOT_ONLY)
16776 + window_addr = 0x1C000000;
16777 + window_size = 0x4000000;
16778 +#else /* USER ONLY */
16779 + window_addr = 0x1E000000;
16780 + window_size = 0x1000000;
16787 + /* 64 MB Boot NOR Flash is disabled */
16788 + /* and the start address is moved to 0x0C00000 */
16789 + window_addr = 0x0C000000;
16790 + window_size = 0x4000000;
16792 + printk("Pb1550 MTD: unsupported boot:swap setting\n");
16798 +int __init pb1550_mtd_init(void)
16800 + struct mtd_partition *parts;
16801 + int nb_parts = 0;
16804 + /* Default flash buswidth */
16805 + pb1550_map.buswidth = flash_buswidth;
16807 + if (setup_flash_params())
16811 + * Static partition definition selection
16813 + part_type = "static";
16814 + parts = pb1550_partitions;
16815 + nb_parts = NB_OF(pb1550_partitions);
16816 + pb1550_map.size = window_size;
16819 + * Now let's probe for the actual flash. Do it here since
16820 + * specific machine settings might have been set above.
16822 + printk(KERN_NOTICE "Pb1550 flash: probing %d-bit flash bus\n",
16823 + pb1550_map.buswidth*8);
16824 + pb1550_map.map_priv_1 =
16825 + (unsigned long)ioremap(window_addr, window_size);
16826 + mymtd = do_map_probe("cfi_probe", &pb1550_map);
16827 + if (!mymtd) return -ENXIO;
16828 + mymtd->module = THIS_MODULE;
16830 + add_mtd_partitions(mymtd, parts, nb_parts);
16834 +static void __exit pb1550_mtd_cleanup(void)
16837 + del_mtd_partitions(mymtd);
16838 + map_destroy(mymtd);
16839 + if (parsed_parts)
16840 + kfree(parsed_parts);
16844 +module_init(pb1550_mtd_init);
16845 +module_exit(pb1550_mtd_cleanup);
16847 +MODULE_AUTHOR("Embedded Edge, LLC");
16848 +MODULE_DESCRIPTION("Pb1550 mtd map driver");
16849 +MODULE_LICENSE("GPL");
16850 --- a/drivers/mtd/maps/pb1xxx-flash.c
16851 +++ b/drivers/mtd/maps/pb1xxx-flash.c
16852 @@ -192,6 +192,34 @@ static struct mtd_partition pb1xxx_parti
16854 #error MTD_PB1500 define combo error /* should never happen */
16856 +#elif defined(CONFIG_MTD_BOSPORUS)
16857 +static unsigned char flash_buswidth = 2;
16858 +static unsigned long flash_size = 0x02000000;
16859 +#define WINDOW_ADDR 0x1F000000
16860 +#define WINDOW_SIZE 0x2000000
16861 +static struct mtd_partition pb1xxx_partitions[] = {
16864 + size: 0x00400000,
16865 + offset: 0x00000000,
16868 + size: 0x00100000,
16869 + offset: 0x00400000,
16872 + size: 0x00700000,
16873 + offset: 0x00500000,
16876 + size: 0x00100000,
16877 + offset: 0x00C00000,
16880 + size: 0x00300000,
16881 + offset: 0x00D00000,
16885 #error Unsupported board
16888 +++ b/drivers/mtd/maps/xxs1500.c
16891 + * Flash memory access on MyCable XXS1500 board
16893 + * (C) 2003 Pete Popov <ppopov@mvista.com>
16895 + * $Id: xxs1500.c,v 1.1.2.1 2003/06/13 21:15:46 ppopov Exp $
16898 +#include <linux/config.h>
16899 +#include <linux/module.h>
16900 +#include <linux/types.h>
16901 +#include <linux/kernel.h>
16903 +#include <linux/mtd/mtd.h>
16904 +#include <linux/mtd/map.h>
16905 +#include <linux/mtd/partitions.h>
16907 +#include <asm/io.h>
16908 +#include <asm/au1000.h>
16911 +#define DBG(x...) printk(x)
16916 +#ifdef CONFIG_MIPS_XXS1500
16917 +#define WINDOW_ADDR 0x1F000000
16918 +#define WINDOW_SIZE 0x1000000
16921 +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
16924 + ret = __raw_readb(map->map_priv_1 + ofs);
16925 + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16929 +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
16932 + ret = __raw_readw(map->map_priv_1 + ofs);
16933 + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16937 +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
16940 + ret = __raw_readl(map->map_priv_1 + ofs);
16941 + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
16945 +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
16947 + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
16948 + memcpy_fromio(to, map->map_priv_1 + from, len);
16951 +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
16953 + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16954 + __raw_writeb(d, map->map_priv_1 + adr);
16958 +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
16960 + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16961 + __raw_writew(d, map->map_priv_1 + adr);
16965 +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
16967 + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
16968 + __raw_writel(d, map->map_priv_1 + adr);
16972 +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
16974 + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
16975 + memcpy_toio(map->map_priv_1 + to, from, len);
16980 +static struct map_info xxs1500_map = {
16981 + name: "XXS1500 flash",
16982 + read8: physmap_read8,
16983 + read16: physmap_read16,
16984 + read32: physmap_read32,
16985 + copy_from: physmap_copy_from,
16986 + write8: physmap_write8,
16987 + write16: physmap_write16,
16988 + write32: physmap_write32,
16989 + copy_to: physmap_copy_to,
16993 +static unsigned long flash_size = 0x00800000;
16994 +static unsigned char flash_buswidth = 4;
16995 +static struct mtd_partition xxs1500_partitions[] = {
16997 + name: "kernel image",
16998 + size: 0x00200000,
17001 + name: "user fs 0",
17002 + size: (0x00C00000-0x200000),
17003 + offset: MTDPART_OFS_APPEND,
17006 + size: 0x00100000,
17007 + offset: MTDPART_OFS_APPEND,
17008 + mask_flags: MTD_WRITEABLE
17010 + name: "user fs 1",
17012 + offset: MTDPART_OFS_APPEND,
17014 + name: "yamon env vars",
17016 + offset: MTDPART_OFS_APPEND,
17017 + mask_flags: MTD_WRITEABLE
17022 +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
17024 +static struct mtd_partition *parsed_parts;
17025 +static struct mtd_info *mymtd;
17027 +int __init xxs1500_mtd_init(void)
17029 + struct mtd_partition *parts;
17030 + int nb_parts = 0;
17033 + /* Default flash buswidth */
17034 + xxs1500_map.buswidth = flash_buswidth;
17037 + * Static partition definition selection
17039 + part_type = "static";
17040 + parts = xxs1500_partitions;
17041 + nb_parts = NB_OF(xxs1500_partitions);
17042 + xxs1500_map.size = flash_size;
17045 + * Now let's probe for the actual flash. Do it here since
17046 + * specific machine settings might have been set above.
17048 + printk(KERN_NOTICE "XXS1500 flash: probing %d-bit flash bus\n",
17049 + xxs1500_map.buswidth*8);
17050 + xxs1500_map.map_priv_1 =
17051 + (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
17052 + mymtd = do_map_probe("cfi_probe", &xxs1500_map);
17053 + if (!mymtd) return -ENXIO;
17054 + mymtd->module = THIS_MODULE;
17056 + add_mtd_partitions(mymtd, parts, nb_parts);
17060 +static void __exit xxs1500_mtd_cleanup(void)
17063 + del_mtd_partitions(mymtd);
17064 + map_destroy(mymtd);
17065 + if (parsed_parts)
17066 + kfree(parsed_parts);
17070 +module_init(xxs1500_mtd_init);
17071 +module_exit(xxs1500_mtd_cleanup);
17073 +MODULE_AUTHOR("Pete Popov");
17074 +MODULE_DESCRIPTION("XXS1500 CFI map driver");
17075 +MODULE_LICENSE("GPL");
17076 --- a/drivers/net/defxx.c
17077 +++ b/drivers/net/defxx.c
17078 @@ -10,24 +10,18 @@
17081 * A Linux device driver supporting the Digital Equipment Corporation
17082 - * FDDI EISA and PCI controller families. Supported adapters include:
17083 + * FDDI TURBOchannel, EISA and PCI controller families. Supported
17084 + * adapters include:
17086 - * DEC FDDIcontroller/EISA (DEFEA)
17087 - * DEC FDDIcontroller/PCI (DEFPA)
17088 + * DEC FDDIcontroller/TURBOchannel (DEFTA)
17089 + * DEC FDDIcontroller/EISA (DEFEA)
17090 + * DEC FDDIcontroller/PCI (DEFPA)
17093 - * LVS Lawrence V. Stefani
17096 - * The author may be reached at:
17097 + * The original author:
17098 + * LVS Lawrence V. Stefani <lstefani@yahoo.com>
17100 - * Inet: stefani@lkg.dec.com
17101 - * (NOTE! this address no longer works -jgarzik)
17103 - * Mail: Digital Equipment Corporation
17104 - * 550 King Street
17105 - * M/S: LKG1-3/M07
17106 - * Littleton, MA 01460
17108 + * macro Maciej W. Rozycki <macro@linux-mips.org>
17111 * I'd like to thank Patricia Cross for helping me get started with
17112 @@ -197,16 +191,16 @@
17113 * Sep 2000 tjeerd Fix leak on unload, cosmetic code cleanup
17114 * Feb 2001 Skb allocation fixes
17115 * Feb 2001 davej PCI enable cleanups.
17116 + * 04 Aug 2003 macro Converted to the DMA API.
17117 + * 14 Aug 2004 macro Fix device names reported.
17118 + * 26 Sep 2004 macro TURBOchannel support.
17121 /* Include files */
17123 #include <linux/module.h>
17125 #include <linux/kernel.h>
17126 -#include <linux/sched.h>
17127 #include <linux/string.h>
17128 -#include <linux/ptrace.h>
17129 #include <linux/errno.h>
17130 #include <linux/ioport.h>
17131 #include <linux/slab.h>
17132 @@ -215,19 +209,33 @@
17133 #include <linux/delay.h>
17134 #include <linux/init.h>
17135 #include <linux/netdevice.h>
17136 +#include <linux/fddidevice.h>
17137 +#include <linux/skbuff.h>
17139 #include <asm/byteorder.h>
17140 #include <asm/bitops.h>
17141 #include <asm/io.h>
17143 -#include <linux/fddidevice.h>
17144 -#include <linux/skbuff.h>
17146 +#include <asm/dec/tc.h>
17148 +static int search_tc_card(const char *name) { return -ENODEV; }
17149 +static void claim_tc_card(int slot) { }
17150 +static void release_tc_card(int slot) { }
17151 +static unsigned long get_tc_base_addr(int slot) { return 0; }
17152 +static unsigned long get_tc_irq_nr(int slot) { return -1; }
17157 -/* Version information string - should be updated prior to each new release!!! */
17158 +/* Version information string should be updated prior to each new release! */
17159 +#define DRV_NAME "defxx"
17160 +#define DRV_VERSION "v1.07T"
17161 +#define DRV_RELDATE "2004/09/26"
17163 static char version[] __devinitdata =
17164 - "defxx.c:v1.05e 2001/02/03 Lawrence V. Stefani and others\n";
17165 + DRV_NAME ": " DRV_VERSION " " DRV_RELDATE
17166 + " Lawrence V. Stefani and others\n";
17168 #define DYNAMIC_BUFFERS 1
17170 @@ -243,7 +251,7 @@ static char version[] __devinitdata =
17171 static void dfx_bus_init(struct net_device *dev);
17172 static void dfx_bus_config_check(DFX_board_t *bp);
17174 -static int dfx_driver_init(struct net_device *dev);
17175 +static int dfx_driver_init(struct net_device *dev, const char *print_name);
17176 static int dfx_adap_init(DFX_board_t *bp, int get_buffers);
17178 static int dfx_open(struct net_device *dev);
17179 @@ -337,48 +345,84 @@ static inline void dfx_port_write_byte(
17184 + if (bp->bus_type == DFX_BUS_TYPE_TC)
17186 + volatile u8 *addr = (void *)(bp->base_addr + offset);
17193 u16 port = bp->base_addr + offset;
17199 static inline void dfx_port_read_byte(
17205 + if (bp->bus_type == DFX_BUS_TYPE_TC)
17207 + volatile u8 *addr = (void *)(bp->base_addr + offset);
17214 u16 port = bp->base_addr + offset;
17220 static inline void dfx_port_write_long(
17226 + if (bp->bus_type == DFX_BUS_TYPE_TC)
17228 + volatile u32 *addr = (void *)(bp->base_addr + offset);
17235 u16 port = bp->base_addr + offset;
17241 static inline void dfx_port_read_long(
17247 + if (bp->bus_type == DFX_BUS_TYPE_TC)
17249 + volatile u32 *addr = (void *)(bp->base_addr + offset);
17256 u16 port = bp->base_addr + offset;
17264 @@ -393,8 +437,9 @@ static inline void dfx_port_read_long(
17268 - * pdev - pointer to pci device information (NULL for EISA)
17269 - * ioaddr - pointer to port (NULL for PCI)
17270 + * pdev - pointer to pci device information (NULL for EISA or TURBOchannel)
17271 + * bus_type - bus type (one of DFX_BUS_TYPE_*)
17272 + * handle - bus-specific data: slot (TC), pointer to port (EISA), NULL (PCI)
17274 * Functional Description:
17276 @@ -410,54 +455,68 @@ static inline void dfx_port_read_long(
17277 * initialized and the board resources are read and stored in
17278 * the device structure.
17280 -static int __devinit dfx_init_one_pci_or_eisa(struct pci_dev *pdev, long ioaddr)
17281 +static int __devinit dfx_init_one_pci_or_eisa(struct pci_dev *pdev, u32 bus_type, long handle)
17283 + static int version_disp;
17284 + char *print_name = DRV_NAME;
17285 struct net_device *dev;
17286 DFX_board_t *bp; /* board pointer */
17287 + long ioaddr; /* pointer to port */
17288 + unsigned long len; /* resource length */
17289 + int alloc_size; /* total buffer size used */
17293 - static int version_disp;
17295 - if (!version_disp) /* display version info if adapter is found */
17297 + if (!version_disp) { /* display version info if adapter is found */
17298 version_disp = 1; /* set display flag to TRUE so that */
17299 printk(version); /* we only display this string ONCE */
17304 - * init_fddidev() allocates a device structure with private data, clears the device structure and private data,
17305 - * and calls fddi_setup() and register_netdev(). Not much left to do for us here.
17307 - dev = init_fddidev(NULL, sizeof(*bp));
17308 + if (pdev != NULL)
17309 + print_name = pdev->slot_name;
17311 + dev = alloc_fddidev(sizeof(*bp));
17313 - printk (KERN_ERR "defxx: unable to allocate fddidev, aborting\n");
17314 + printk(KERN_ERR "%s: unable to allocate fddidev, aborting\n",
17319 /* Enable PCI device. */
17320 - if (pdev != NULL) {
17321 + if (bus_type == DFX_BUS_TYPE_PCI) {
17322 err = pci_enable_device (pdev);
17323 if (err) goto err_out;
17324 ioaddr = pci_resource_start (pdev, 1);
17327 SET_MODULE_OWNER(dev);
17328 + SET_NETDEV_DEV(dev, &pdev->dev);
17332 - if (!request_region (ioaddr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, dev->name)) {
17333 - printk (KERN_ERR "%s: Cannot reserve I/O resource 0x%x @ 0x%lx, aborting\n",
17334 - dev->name, PFI_K_CSR_IO_LEN, ioaddr);
17335 + if (bus_type == DFX_BUS_TYPE_TC) {
17336 + /* TURBOchannel board */
17337 + bp->slot = handle;
17338 + claim_tc_card(bp->slot);
17339 + ioaddr = get_tc_base_addr(handle) + PI_TC_K_CSR_OFFSET;
17340 + len = PI_TC_K_CSR_LEN;
17341 + } else if (bus_type == DFX_BUS_TYPE_EISA) {
17344 + len = PI_ESIC_K_CSR_IO_LEN;
17347 + len = PFI_K_CSR_IO_LEN;
17348 + dev->base_addr = ioaddr; /* save port (I/O) base address */
17350 + if (!request_region(ioaddr, len, print_name)) {
17351 + printk(KERN_ERR "%s: Cannot reserve I/O resource "
17352 + "0x%lx @ 0x%lx, aborting\n", print_name, len, ioaddr);
17357 /* Initialize new device structure */
17359 - dev->base_addr = ioaddr; /* save port (I/O) base address */
17361 dev->get_stats = dfx_ctl_get_stats;
17362 dev->open = dfx_open;
17363 dev->stop = dfx_close;
17364 @@ -465,37 +524,54 @@ static int __devinit dfx_init_one_pci_or
17365 dev->set_multicast_list = dfx_ctl_set_multicast_list;
17366 dev->set_mac_address = dfx_ctl_set_mac_address;
17368 - if (pdev == NULL) {
17370 - bp->bus_type = DFX_BUS_TYPE_EISA;
17371 + bp->bus_type = bus_type;
17372 + if (bus_type == DFX_BUS_TYPE_TC || bus_type == DFX_BUS_TYPE_EISA) {
17373 + /* TURBOchannel or EISA board */
17374 bp->next = root_dfx_eisa_dev;
17375 root_dfx_eisa_dev = dev;
17378 - bp->bus_type = DFX_BUS_TYPE_PCI;
17379 bp->pci_dev = pdev;
17380 pci_set_drvdata (pdev, dev);
17381 pci_set_master (pdev);
17384 - if (dfx_driver_init(dev) != DFX_K_SUCCESS) {
17386 + if (dfx_driver_init(dev, print_name) != DFX_K_SUCCESS) {
17388 goto err_out_region;
17391 + err = register_netdev(dev);
17393 + goto err_out_kfree;
17395 + printk("%s: registered as %s\n", print_name, dev->name);
17399 + alloc_size = sizeof(PI_DESCR_BLOCK) +
17400 + PI_CMD_REQ_K_SIZE_MAX + PI_CMD_RSP_K_SIZE_MAX +
17401 +#ifndef DYNAMIC_BUFFERS
17402 + (bp->rcv_bufs_to_post * PI_RCV_DATA_K_SIZE_MAX) +
17404 + sizeof(PI_CONSUMER_BLOCK) +
17405 + (PI_ALIGN_K_DESC_BLK - 1);
17406 + if (bp->kmalloced)
17407 + pci_free_consistent(pdev, alloc_size,
17408 + bp->kmalloced, bp->kmalloced_dma);
17410 - release_region(ioaddr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN);
17411 + release_region(ioaddr, len);
17413 - unregister_netdev(dev);
17415 + if (bp->bus_type == DFX_BUS_TYPE_TC)
17416 + release_tc_card(bp->slot);
17417 + free_netdev(dev);
17421 static int __devinit dfx_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
17423 - return dfx_init_one_pci_or_eisa(pdev, 0);
17424 + return dfx_init_one_pci_or_eisa(pdev, DFX_BUS_TYPE_PCI, 0);
17427 static int __init dfx_eisa_init(void)
17428 @@ -507,6 +583,7 @@ static int __init dfx_eisa_init(void)
17430 DBG_printk("In dfx_eisa_init...\n");
17432 +#ifdef CONFIG_EISA
17433 /* Scan for FDDI EISA controllers */
17435 for (i=0; i < DFX_MAX_EISA_SLOTS; i++) /* only scan for up to 16 EISA slots */
17436 @@ -517,9 +594,27 @@ static int __init dfx_eisa_init(void)
17438 port = (i << 12); /* recalc base addr */
17440 - if (dfx_init_one_pci_or_eisa(NULL, port) == 0) rc = 0;
17441 + if (dfx_init_one_pci_or_eisa(NULL, DFX_BUS_TYPE_EISA, port) == 0) rc = 0;
17448 +static int __init dfx_tc_init(void)
17450 + int rc = -ENODEV;
17451 + int slot; /* TC slot number */
17453 + DBG_printk("In dfx_tc_init...\n");
17455 + /* Scan for FDDI TC controllers */
17456 + while ((slot = search_tc_card("PMAF-F")) >= 0) {
17457 + if (dfx_init_one_pci_or_eisa(NULL, DFX_BUS_TYPE_TC, slot) == 0)
17465 @@ -583,8 +678,9 @@ static void __devinit dfx_bus_init(struc
17467 /* Initialize adapter based on bus type */
17469 - if (bp->bus_type == DFX_BUS_TYPE_EISA)
17471 + if (bp->bus_type == DFX_BUS_TYPE_TC) {
17472 + dev->irq = get_tc_irq_nr(bp->slot);
17473 + } else if (bp->bus_type == DFX_BUS_TYPE_EISA) {
17474 /* Get the interrupt level from the ESIC chip */
17476 dfx_port_read_byte(bp, PI_ESIC_K_IO_CONFIG_STAT_0, &val);
17477 @@ -766,6 +862,7 @@ static void __devinit dfx_bus_config_che
17480 * dev - pointer to device information
17481 + * print_name - printable device name
17483 * Functional Description:
17484 * This function allocates additional resources such as the host memory
17485 @@ -780,20 +877,21 @@ static void __devinit dfx_bus_config_che
17486 * or read adapter MAC address
17489 - * Memory allocated from kmalloc() call is physically contiguous, locked
17490 - * memory whose physical address equals its virtual address.
17491 + * Memory allocated from pci_alloc_consistent() call is physically
17492 + * contiguous, locked memory.
17495 * Adapter is reset and should be in DMA_UNAVAILABLE state before
17496 * returning from this routine.
17499 -static int __devinit dfx_driver_init(struct net_device *dev)
17500 +static int __devinit dfx_driver_init(struct net_device *dev,
17501 + const char *print_name)
17503 DFX_board_t *bp = dev->priv;
17504 int alloc_size; /* total buffer size needed */
17505 char *top_v, *curr_v; /* virtual addrs into memory block */
17506 - u32 top_p, curr_p; /* physical addrs into memory block */
17507 + dma_addr_t top_p, curr_p; /* physical addrs into memory block */
17508 u32 data; /* host data register value */
17510 DBG_printk("In dfx_driver_init...\n");
17511 @@ -837,26 +935,20 @@ static int __devinit dfx_driver_init(str
17513 /* Read the factory MAC address from the adapter then save it */
17515 - if (dfx_hw_port_ctrl_req(bp,
17517 - PI_PDATA_A_MLA_K_LO,
17519 - &data) != DFX_K_SUCCESS)
17521 - printk("%s: Could not read adapter factory MAC address!\n", dev->name);
17522 + if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_LO, 0,
17523 + &data) != DFX_K_SUCCESS) {
17524 + printk("%s: Could not read adapter factory MAC address!\n",
17526 return(DFX_K_FAILURE);
17529 memcpy(&bp->factory_mac_addr[0], &data, sizeof(u32));
17531 - if (dfx_hw_port_ctrl_req(bp,
17533 - PI_PDATA_A_MLA_K_HI,
17535 - &data) != DFX_K_SUCCESS)
17537 - printk("%s: Could not read adapter factory MAC address!\n", dev->name);
17538 + if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_HI, 0,
17539 + &data) != DFX_K_SUCCESS) {
17540 + printk("%s: Could not read adapter factory MAC address!\n",
17542 return(DFX_K_FAILURE);
17545 memcpy(&bp->factory_mac_addr[4], &data, sizeof(u16));
17548 @@ -867,28 +959,27 @@ static int __devinit dfx_driver_init(str
17551 memcpy(dev->dev_addr, bp->factory_mac_addr, FDDI_K_ALEN);
17552 - if (bp->bus_type == DFX_BUS_TYPE_EISA)
17553 - printk("%s: DEFEA at I/O addr = 0x%lX, IRQ = %d, Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n",
17557 - dev->dev_addr[0],
17558 - dev->dev_addr[1],
17559 - dev->dev_addr[2],
17560 - dev->dev_addr[3],
17561 - dev->dev_addr[4],
17562 - dev->dev_addr[5]);
17563 + if (bp->bus_type == DFX_BUS_TYPE_TC)
17564 + printk("%s: DEFTA at addr = 0x%lX, IRQ = %d, "
17565 + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n",
17566 + print_name, dev->base_addr, dev->irq,
17567 + dev->dev_addr[0], dev->dev_addr[1],
17568 + dev->dev_addr[2], dev->dev_addr[3],
17569 + dev->dev_addr[4], dev->dev_addr[5]);
17570 + else if (bp->bus_type == DFX_BUS_TYPE_EISA)
17571 + printk("%s: DEFEA at I/O addr = 0x%lX, IRQ = %d, "
17572 + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n",
17573 + print_name, dev->base_addr, dev->irq,
17574 + dev->dev_addr[0], dev->dev_addr[1],
17575 + dev->dev_addr[2], dev->dev_addr[3],
17576 + dev->dev_addr[4], dev->dev_addr[5]);
17578 - printk("%s: DEFPA at I/O addr = 0x%lX, IRQ = %d, Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n",
17582 - dev->dev_addr[0],
17583 - dev->dev_addr[1],
17584 - dev->dev_addr[2],
17585 - dev->dev_addr[3],
17586 - dev->dev_addr[4],
17587 - dev->dev_addr[5]);
17588 + printk("%s: DEFPA at I/O addr = 0x%lX, IRQ = %d, "
17589 + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n",
17590 + print_name, dev->base_addr, dev->irq,
17591 + dev->dev_addr[0], dev->dev_addr[1],
17592 + dev->dev_addr[2], dev->dev_addr[3],
17593 + dev->dev_addr[4], dev->dev_addr[5]);
17596 * Get memory for descriptor block, consumer block, and other buffers
17597 @@ -903,14 +994,15 @@ static int __devinit dfx_driver_init(str
17599 sizeof(PI_CONSUMER_BLOCK) +
17600 (PI_ALIGN_K_DESC_BLK - 1);
17601 - bp->kmalloced = top_v = (char *) kmalloc(alloc_size, GFP_KERNEL);
17602 - if (top_v == NULL)
17604 - printk("%s: Could not allocate memory for host buffers and structures!\n", dev->name);
17605 + bp->kmalloced = top_v = pci_alloc_consistent(bp->pci_dev, alloc_size,
17606 + &bp->kmalloced_dma);
17607 + if (top_v == NULL) {
17608 + printk("%s: Could not allocate memory for host buffers "
17609 + "and structures!\n", print_name);
17610 return(DFX_K_FAILURE);
17613 memset(top_v, 0, alloc_size); /* zero out memory before continuing */
17614 - top_p = virt_to_bus(top_v); /* get physical address of buffer */
17615 + top_p = bp->kmalloced_dma; /* get physical address of buffer */
17618 * To guarantee the 8K alignment required for the descriptor block, 8K - 1
17619 @@ -924,7 +1016,7 @@ static int __devinit dfx_driver_init(str
17620 * for allocating the needed memory.
17623 - curr_p = (u32) (ALIGN(top_p, PI_ALIGN_K_DESC_BLK));
17624 + curr_p = ALIGN(top_p, PI_ALIGN_K_DESC_BLK);
17625 curr_v = top_v + (curr_p - top_p);
17627 /* Reserve space for descriptor block */
17628 @@ -965,14 +1057,20 @@ static int __devinit dfx_driver_init(str
17630 /* Display virtual and physical addresses if debug driver */
17632 - DBG_printk("%s: Descriptor block virt = %0lX, phys = %0X\n", dev->name, (long)bp->descr_block_virt, bp->descr_block_phys);
17633 - DBG_printk("%s: Command Request buffer virt = %0lX, phys = %0X\n", dev->name, (long)bp->cmd_req_virt, bp->cmd_req_phys);
17634 - DBG_printk("%s: Command Response buffer virt = %0lX, phys = %0X\n", dev->name, (long)bp->cmd_rsp_virt, bp->cmd_rsp_phys);
17635 - DBG_printk("%s: Receive buffer block virt = %0lX, phys = %0X\n", dev->name, (long)bp->rcv_block_virt, bp->rcv_block_phys);
17636 - DBG_printk("%s: Consumer block virt = %0lX, phys = %0X\n", dev->name, (long)bp->cons_block_virt, bp->cons_block_phys);
17637 + DBG_printk("%s: Descriptor block virt = %0lX, phys = %0X\n",
17639 + (long)bp->descr_block_virt, bp->descr_block_phys);
17640 + DBG_printk("%s: Command Request buffer virt = %0lX, phys = %0X\n",
17641 + print_name, (long)bp->cmd_req_virt, bp->cmd_req_phys);
17642 + DBG_printk("%s: Command Response buffer virt = %0lX, phys = %0X\n",
17643 + print_name, (long)bp->cmd_rsp_virt, bp->cmd_rsp_phys);
17644 + DBG_printk("%s: Receive buffer block virt = %0lX, phys = %0X\n",
17645 + print_name, (long)bp->rcv_block_virt, bp->rcv_block_phys);
17646 + DBG_printk("%s: Consumer block virt = %0lX, phys = %0X\n",
17647 + print_name, (long)bp->cons_block_virt, bp->cons_block_phys);
17649 return(DFX_K_SUCCESS);
17655 @@ -1218,7 +1316,9 @@ static int dfx_open(struct net_device *d
17657 /* Register IRQ - support shared interrupts by passing device ptr */
17659 - ret = request_irq(dev->irq, (void *)dfx_interrupt, SA_SHIRQ, dev->name, dev);
17660 + ret = request_irq(dev->irq, (void *)dfx_interrupt,
17661 + (bp->bus_type == DFX_BUS_TYPE_TC) ? 0 : SA_SHIRQ,
17664 printk(KERN_ERR "%s: Requested IRQ %d is busy\n", dev->name, dev->irq);
17666 @@ -1737,7 +1837,7 @@ static void dfx_interrupt(int irq, void
17667 dfx_port_write_long(bp, PFI_K_REG_MODE_CTRL,
17668 (PFI_MODE_M_PDQ_INT_ENB + PFI_MODE_M_DMA_ENB));
17671 + else if (bp->bus_type == DFX_BUS_TYPE_EISA)
17673 /* Disable interrupts at the ESIC */
17675 @@ -1755,6 +1855,13 @@ static void dfx_interrupt(int irq, void
17676 tmp |= PI_CONFIG_STAT_0_M_INT_ENB;
17677 dfx_port_write_byte(bp, PI_ESIC_K_IO_CONFIG_STAT_0, tmp);
17680 + /* TC doesn't share interrupts so no need to disable them */
17682 + /* Call interrupt service routine for this adapter */
17684 + dfx_int_common(dev);
17687 spin_unlock(&bp->lock);
17689 @@ -2663,12 +2770,12 @@ static int dfx_hw_dma_uninit(DFX_board_t
17691 static void my_skb_align(struct sk_buff *skb, int n)
17693 - u32 x=(u32)skb->data; /* We only want the low bits .. */
17695 + unsigned long x = (unsigned long)skb->data;
17698 - v=(x+n-1)&~(n-1); /* Where we want to be */
17699 + v = ALIGN(x, n); /* Where we want to be */
17701 - skb_reserve(skb, v-x);
17702 + skb_reserve(skb, v - x);
17706 @@ -2745,7 +2852,10 @@ static int dfx_rcv_init(DFX_board_t *bp,
17709 my_skb_align(newskb, 128);
17710 - bp->descr_block_virt->rcv_data[i+j].long_1 = virt_to_bus(newskb->data);
17711 + bp->descr_block_virt->rcv_data[i + j].long_1 =
17712 + (u32)pci_map_single(bp->pci_dev, newskb->data,
17714 + PCI_DMA_FROMDEVICE);
17716 * p_rcv_buff_va is only used inside the
17717 * kernel so we put the skb pointer here.
17718 @@ -2859,9 +2969,17 @@ static void dfx_rcv_queue_process(
17720 my_skb_align(newskb, 128);
17721 skb = (struct sk_buff *)bp->p_rcv_buff_va[entry];
17722 + pci_unmap_single(bp->pci_dev,
17723 + bp->descr_block_virt->rcv_data[entry].long_1,
17725 + PCI_DMA_FROMDEVICE);
17726 skb_reserve(skb, RCV_BUFF_K_PADDING);
17727 bp->p_rcv_buff_va[entry] = (char *)newskb;
17728 - bp->descr_block_virt->rcv_data[entry].long_1 = virt_to_bus(newskb->data);
17729 + bp->descr_block_virt->rcv_data[entry].long_1 =
17730 + (u32)pci_map_single(bp->pci_dev,
17733 + PCI_DMA_FROMDEVICE);
17737 @@ -2934,7 +3052,7 @@ static void dfx_rcv_queue_process(
17738 * is contained in a single physically contiguous buffer
17739 * in which the virtual address of the start of packet
17740 * (skb->data) can be converted to a physical address
17741 - * by using virt_to_bus().
17742 + * by using pci_map_single().
17744 * Since the adapter architecture requires a three byte
17745 * packet request header to prepend the start of packet,
17746 @@ -3082,12 +3200,13 @@ static int dfx_xmt_queue_pkt(
17748 * 6. The physical address of the start of packet
17749 * can be determined from the virtual address
17750 - * by using virt_to_bus() and is only 32-bits
17751 + * by using pci_map_single() and is only 32-bits
17755 p_xmt_descr->long_0 = (u32) (PI_XMT_DESCR_M_SOP | PI_XMT_DESCR_M_EOP | ((skb->len) << PI_XMT_DESCR_V_SEG_LEN));
17756 - p_xmt_descr->long_1 = (u32) virt_to_bus(skb->data);
17757 + p_xmt_descr->long_1 = (u32)pci_map_single(bp->pci_dev, skb->data,
17758 + skb->len, PCI_DMA_TODEVICE);
17761 * Verify that descriptor is actually available
17762 @@ -3171,6 +3290,7 @@ static int dfx_xmt_done(DFX_board_t *bp)
17764 XMT_DRIVER_DESCR *p_xmt_drv_descr; /* ptr to transmit driver descriptor */
17765 PI_TYPE_2_CONSUMER *p_type_2_cons; /* ptr to rcv/xmt consumer block register */
17766 + u8 comp; /* local transmit completion index */
17767 int freed = 0; /* buffers freed */
17769 /* Service all consumed transmit frames */
17770 @@ -3188,7 +3308,11 @@ static int dfx_xmt_done(DFX_board_t *bp)
17771 bp->xmt_total_bytes += p_xmt_drv_descr->p_skb->len;
17773 /* Return skb to operating system */
17775 + comp = bp->rcv_xmt_reg.index.xmt_comp;
17776 + pci_unmap_single(bp->pci_dev,
17777 + bp->descr_block_virt->xmt_data[comp].long_1,
17778 + p_xmt_drv_descr->p_skb->len,
17779 + PCI_DMA_TODEVICE);
17780 dev_kfree_skb_irq(p_xmt_drv_descr->p_skb);
17783 @@ -3297,6 +3421,7 @@ static void dfx_xmt_flush( DFX_board_t *
17785 u32 prod_cons; /* rcv/xmt consumer block longword */
17786 XMT_DRIVER_DESCR *p_xmt_drv_descr; /* ptr to transmit driver descriptor */
17787 + u8 comp; /* local transmit completion index */
17789 /* Flush all outstanding transmit frames */
17791 @@ -3307,7 +3432,11 @@ static void dfx_xmt_flush( DFX_board_t *
17792 p_xmt_drv_descr = &(bp->xmt_drv_descr_blk[bp->rcv_xmt_reg.index.xmt_comp]);
17794 /* Return skb to operating system */
17796 + comp = bp->rcv_xmt_reg.index.xmt_comp;
17797 + pci_unmap_single(bp->pci_dev,
17798 + bp->descr_block_virt->xmt_data[comp].long_1,
17799 + p_xmt_drv_descr->p_skb->len,
17800 + PCI_DMA_TODEVICE);
17801 dev_kfree_skb(p_xmt_drv_descr->p_skb);
17803 /* Increment transmit error counter */
17804 @@ -3337,12 +3466,36 @@ static void dfx_xmt_flush( DFX_board_t *
17806 static void __devexit dfx_remove_one_pci_or_eisa(struct pci_dev *pdev, struct net_device *dev)
17808 - DFX_board_t *bp = dev->priv;
17809 + DFX_board_t *bp = dev->priv;
17810 + unsigned long len; /* resource length */
17811 + int alloc_size; /* total buffer size used */
17813 + if (bp->bus_type == DFX_BUS_TYPE_TC) {
17814 + /* TURBOchannel board */
17815 + len = PI_TC_K_CSR_LEN;
17816 + } else if (bp->bus_type == DFX_BUS_TYPE_EISA) {
17818 + len = PI_ESIC_K_CSR_IO_LEN;
17820 + len = PFI_K_CSR_IO_LEN;
17822 unregister_netdev(dev);
17823 - release_region(dev->base_addr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN );
17824 - if (bp->kmalloced) kfree(bp->kmalloced);
17826 + release_region(dev->base_addr, len);
17828 + if (bp->bus_type == DFX_BUS_TYPE_TC)
17829 + release_tc_card(bp->slot);
17831 + alloc_size = sizeof(PI_DESCR_BLOCK) +
17832 + PI_CMD_REQ_K_SIZE_MAX + PI_CMD_RSP_K_SIZE_MAX +
17833 +#ifndef DYNAMIC_BUFFERS
17834 + (bp->rcv_bufs_to_post * PI_RCV_DATA_K_SIZE_MAX) +
17836 + sizeof(PI_CONSUMER_BLOCK) +
17837 + (PI_ALIGN_K_DESC_BLK - 1);
17838 + if (bp->kmalloced)
17839 + pci_free_consistent(pdev, alloc_size, bp->kmalloced,
17840 + bp->kmalloced_dma);
17841 + free_netdev(dev);
17844 static void __devexit dfx_remove_one (struct pci_dev *pdev)
17845 @@ -3353,21 +3506,22 @@ static void __devexit dfx_remove_one (st
17846 pci_set_drvdata(pdev, NULL);
17849 -static struct pci_device_id dfx_pci_tbl[] __devinitdata = {
17850 +static struct pci_device_id dfx_pci_tbl[] = {
17851 { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_FDDI, PCI_ANY_ID, PCI_ANY_ID, },
17854 MODULE_DEVICE_TABLE(pci, dfx_pci_tbl);
17856 static struct pci_driver dfx_driver = {
17858 - probe: dfx_init_one,
17859 - remove: __devexit_p(dfx_remove_one),
17860 - id_table: dfx_pci_tbl,
17862 + .probe = dfx_init_one,
17863 + .remove = __devexit_p(dfx_remove_one),
17864 + .id_table = dfx_pci_tbl,
17867 static int dfx_have_pci;
17868 static int dfx_have_eisa;
17869 +static int dfx_have_tc;
17872 static void __exit dfx_eisa_cleanup(void)
17873 @@ -3388,12 +3542,7 @@ static void __exit dfx_eisa_cleanup(void
17875 static int __init dfx_init(void)
17877 - int rc_pci, rc_eisa;
17879 -/* when a module, this is printed whether or not devices are found in probe */
17883 + int rc_pci, rc_eisa, rc_tc;
17885 rc_pci = pci_module_init(&dfx_driver);
17886 if (rc_pci >= 0) dfx_have_pci = 1;
17887 @@ -3401,20 +3550,27 @@ static int __init dfx_init(void)
17888 rc_eisa = dfx_eisa_init();
17889 if (rc_eisa >= 0) dfx_have_eisa = 1;
17891 - return ((rc_eisa < 0) ? 0 : rc_eisa) + ((rc_pci < 0) ? 0 : rc_pci);
17892 + rc_tc = dfx_tc_init();
17893 + if (rc_tc >= 0) dfx_have_tc = 1;
17895 + return ((rc_tc < 0) ? 0 : rc_tc) +
17896 + ((rc_eisa < 0) ? 0 : rc_eisa) +
17897 + ((rc_pci < 0) ? 0 : rc_pci);
17900 static void __exit dfx_cleanup(void)
17903 pci_unregister_driver(&dfx_driver);
17904 - if (dfx_have_eisa)
17905 + if (dfx_have_eisa || dfx_have_tc)
17906 dfx_eisa_cleanup();
17910 module_init(dfx_init);
17911 module_exit(dfx_cleanup);
17912 +MODULE_AUTHOR("Lawrence V. Stefani");
17913 +MODULE_DESCRIPTION("DEC FDDIcontroller EISA/PCI (DEFEA/DEFPA) driver "
17914 + DRV_VERSION " " DRV_RELDATE);
17915 MODULE_LICENSE("GPL");
17918 --- a/drivers/net/defxx.h
17919 +++ b/drivers/net/defxx.h
17920 @@ -12,17 +12,11 @@
17921 * Contains all definitions specified by port specification and required
17922 * by the defxx.c driver.
17925 - * LVS Lawrence V. Stefani
17928 - * The author may be reached at:
17929 + * The original author:
17930 + * LVS Lawrence V. Stefani <lstefani@yahoo.com>
17932 - * Inet: stefani@lkg.dec.com
17933 - * Mail: Digital Equipment Corporation
17934 - * 550 King Street
17935 - * M/S: LKG1-3/M07
17936 - * Littleton, MA 01460
17938 + * macro Maciej W. Rozycki <macro@linux-mips.org>
17940 * Modification History:
17941 * Date Name Description
17943 * 09-Sep-96 LVS Added group_prom field. Moved read/write I/O
17944 * macros to DEFXX.C.
17945 * 12-Sep-96 LVS Removed packet request header pointers.
17946 + * 04 Aug 2003 macro Converted to the DMA API.
17950 @@ -1467,6 +1462,11 @@ typedef union
17952 #endif /* #ifndef BIG_ENDIAN */
17954 +/* Define TC PDQ CSR offset and length */
17956 +#define PI_TC_K_CSR_OFFSET 0x100000
17957 +#define PI_TC_K_CSR_LEN 0x80 /* 128 bytes */
17959 /* Define EISA controller register offsets */
17961 #define PI_ESIC_K_BURST_HOLDOFF 0x040
17962 @@ -1634,6 +1634,7 @@ typedef union
17964 #define DFX_BUS_TYPE_PCI 0 /* type code for DEC FDDIcontroller/PCI */
17965 #define DFX_BUS_TYPE_EISA 1 /* type code for DEC FDDIcontroller/EISA */
17966 +#define DFX_BUS_TYPE_TC 2 /* type code for DEC FDDIcontroller/TURBOchannel */
17968 #define DFX_FC_PRH2_PRH1_PRH0 0x54003820 /* Packet Request Header bytes + FC */
17969 #define DFX_PRH0_BYTE 0x20 /* Packet Request Header byte 0 */
17970 @@ -1704,17 +1705,19 @@ typedef struct DFX_board_tag
17972 /* Keep virtual and physical pointers to locked, physically contiguous memory */
17974 - char *kmalloced; /* kfree this on unload */
17975 + char *kmalloced; /* pci_free_consistent this on unload */
17976 + dma_addr_t kmalloced_dma;
17977 + /* DMA handle for the above */
17978 PI_DESCR_BLOCK *descr_block_virt; /* PDQ descriptor block virt address */
17979 - u32 descr_block_phys; /* PDQ descriptor block phys address */
17980 + dma_addr_t descr_block_phys; /* PDQ descriptor block phys address */
17981 PI_DMA_CMD_REQ *cmd_req_virt; /* Command request buffer virt address */
17982 - u32 cmd_req_phys; /* Command request buffer phys address */
17983 + dma_addr_t cmd_req_phys; /* Command request buffer phys address */
17984 PI_DMA_CMD_RSP *cmd_rsp_virt; /* Command response buffer virt address */
17985 - u32 cmd_rsp_phys; /* Command response buffer phys address */
17986 + dma_addr_t cmd_rsp_phys; /* Command response buffer phys address */
17987 char *rcv_block_virt; /* LLC host receive queue buf blk virt */
17988 - u32 rcv_block_phys; /* LLC host receive queue buf blk phys */
17989 + dma_addr_t rcv_block_phys; /* LLC host receive queue buf blk phys */
17990 PI_CONSUMER_BLOCK *cons_block_virt; /* PDQ consumer block virt address */
17991 - u32 cons_block_phys; /* PDQ consumer block phys address */
17992 + dma_addr_t cons_block_phys; /* PDQ consumer block phys address */
17994 /* Keep local copies of Type 1 and Type 2 register data */
17996 @@ -1758,8 +1761,9 @@ typedef struct DFX_board_tag
17998 struct net_device *dev; /* pointer to device structure */
17999 struct net_device *next;
18000 - u32 bus_type; /* bus type (0 == PCI, 1 == EISA) */
18001 - u16 base_addr; /* base I/O address (same as dev->base_addr) */
18002 + u32 bus_type; /* bus type (0 == PCI, 1 == EISA, 2 == TC) */
18003 + long base_addr; /* base I/O address (same as dev->base_addr) */
18004 + int slot; /* TC slot number */
18005 struct pci_dev * pci_dev;
18006 u32 full_duplex_enb; /* FDDI Full Duplex enable (1 == on, 2 == off) */
18007 u32 req_ttrt; /* requested TTRT value (in 80ns units) */
18008 --- a/drivers/net/hamradio/hdlcdrv.c
18009 +++ b/drivers/net/hamradio/hdlcdrv.c
18010 @@ -587,6 +587,8 @@ static int hdlcdrv_close(struct net_devi
18012 s = (struct hdlcdrv_state *)dev->priv;
18014 + netif_stop_queue(dev);
18016 if (s->ops && s->ops->close)
18017 i = s->ops->close(dev);
18019 --- a/drivers/net/irda/au1k_ir.c
18020 +++ b/drivers/net/irda/au1k_ir.c
18021 @@ -81,10 +81,6 @@ static char version[] __devinitdata =
18023 #define RUN_AT(x) (jiffies + (x))
18025 -#if defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100)
18026 -static BCSR * const bcsr = (BCSR *)0xAE000000;
18029 static spinlock_t ir_lock = SPIN_LOCK_UNLOCKED;
18032 --- a/drivers/net/sgiseeq.c
18033 +++ b/drivers/net/sgiseeq.c
18034 @@ -24,16 +24,16 @@
18035 #include <asm/io.h>
18036 #include <asm/system.h>
18037 #include <asm/bitops.h>
18038 +#include <asm/paccess.h>
18039 #include <asm/page.h>
18040 #include <asm/pgtable.h>
18041 +#include <asm/sgi/mc.h>
18042 #include <asm/sgi/hpc3.h>
18043 #include <asm/sgi/ip22.h>
18044 #include <asm/sgialib.h>
18046 #include "sgiseeq.h"
18048 -static char *version = "sgiseeq.c: David S. Miller (dm@engr.sgi.com)\n";
18050 static char *sgiseeqstr = "SGI Seeq8003";
18053 @@ -113,9 +113,9 @@ static struct net_device *root_sgiseeq_d
18055 static inline void hpc3_eth_reset(struct hpc3_ethregs *hregs)
18057 - hregs->rx_reset = HPC3_ERXRST_CRESET | HPC3_ERXRST_CLRIRQ;
18058 + hregs->reset = HPC3_ERST_CRESET | HPC3_ERST_CLRIRQ;
18060 - hregs->rx_reset = 0;
18061 + hregs->reset = 0;
18064 static inline void reset_hpc3_and_seeq(struct hpc3_ethregs *hregs,
18065 @@ -238,7 +238,6 @@ void sgiseeq_dump_rings(void)
18067 #define TSTAT_INIT_SEEQ (SEEQ_TCMD_IPT|SEEQ_TCMD_I16|SEEQ_TCMD_IC|SEEQ_TCMD_IUF)
18068 #define TSTAT_INIT_EDLC ((TSTAT_INIT_SEEQ) | SEEQ_TCMD_RB2)
18069 -#define RDMACFG_INIT (HPC3_ERXDCFG_FRXDC | HPC3_ERXDCFG_FEOP | HPC3_ERXDCFG_FIRQ)
18071 static int init_seeq(struct net_device *dev, struct sgiseeq_private *sp,
18072 struct sgiseeq_regs *sregs)
18073 @@ -260,8 +259,6 @@ static int init_seeq(struct net_device *
18074 sregs->tstat = TSTAT_INIT_SEEQ;
18077 - hregs->rx_dconfig |= RDMACFG_INIT;
18079 hregs->rx_ndptr = PHYSADDR(&sp->srings.rx_desc[0]);
18080 hregs->tx_ndptr = PHYSADDR(&sp->srings.tx_desc[0]);
18082 @@ -432,7 +429,7 @@ static void sgiseeq_interrupt(int irq, v
18083 spin_lock(&sp->tx_lock);
18085 /* Ack the IRQ and set software state. */
18086 - hregs->rx_reset = HPC3_ERXRST_CLRIRQ;
18087 + hregs->reset = HPC3_ERST_CLRIRQ;
18089 /* Always check for received packets. */
18090 sgiseeq_rx(dev, sp, hregs, sregs);
18091 @@ -616,7 +613,7 @@ static inline void setup_rx_ring(struct
18093 #define ALIGNED(x) ((((unsigned long)(x)) + 0xf) & ~(0xf))
18095 -int sgiseeq_init(struct hpc3_regs* regs, int irq)
18096 +int sgiseeq_init(struct hpc3_regs* hpcregs, int irq, int has_eeprom)
18098 struct net_device *dev;
18099 struct sgiseeq_private *sp;
18100 @@ -629,7 +626,7 @@ int sgiseeq_init(struct hpc3_regs* regs,
18103 /* Make private data page aligned */
18104 - sp = (struct sgiseeq_private *) get_zeroed_page(GFP_KERNEL);
18105 + sp = (struct sgiseeq_private *) get_zeroed_page(GFP_KERNEL);
18107 printk(KERN_ERR "Sgiseeq: Page alloc failed, aborting.\n");
18109 @@ -644,7 +641,9 @@ int sgiseeq_init(struct hpc3_regs* regs,
18111 #define EADDR_NVOFS 250
18112 for (i = 0; i < 3; i++) {
18113 - unsigned short tmp = ip22_nvram_read(EADDR_NVOFS / 2 + i);
18114 + unsigned short tmp = has_eeprom ?
18115 + ip22_eeprom_read(&hpcregs->eeprom, EADDR_NVOFS / 2+i) :
18116 + ip22_nvram_read(EADDR_NVOFS / 2+i);
18118 dev->dev_addr[2 * i] = tmp >> 8;
18119 dev->dev_addr[2 * i + 1] = tmp & 0xff;
18120 @@ -654,8 +653,8 @@ int sgiseeq_init(struct hpc3_regs* regs,
18124 - sp->sregs = (struct sgiseeq_regs *) &hpc3c0->eth_ext[0];
18125 - sp->hregs = &hpc3c0->ethregs;
18126 + sp->sregs = (struct sgiseeq_regs *) &hpcregs->eth_ext[0];
18127 + sp->hregs = &hpcregs->ethregs;
18128 sp->name = sgiseeqstr;
18129 sp->mode = SEEQ_RCMD_RBCAST;
18131 @@ -672,6 +671,11 @@ int sgiseeq_init(struct hpc3_regs* regs,
18132 setup_rx_ring(sp->srings.rx_desc, SEEQ_RX_BUFFERS);
18133 setup_tx_ring(sp->srings.tx_desc, SEEQ_TX_BUFFERS);
18135 + /* Setup PIO and DMA transfer timing */
18136 + sp->hregs->pconfig = 0x161;
18137 + sp->hregs->dconfig = HPC3_EDCFG_FIRQ | HPC3_EDCFG_FEOP |
18138 + HPC3_EDCFG_FRXDC | HPC3_EDCFG_PTO | 0x026;
18140 /* Reset the chip. */
18141 hpc3_eth_reset(sp->hregs);
18143 @@ -699,7 +703,7 @@ int sgiseeq_init(struct hpc3_regs* regs,
18144 goto err_out_free_irq;
18147 - printk(KERN_INFO "%s: SGI Seeq8003 ", dev->name);
18148 + printk(KERN_INFO "%s: %s ", dev->name, sgiseeqstr);
18149 for (i = 0; i < 6; i++)
18150 printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
18152 @@ -721,10 +725,22 @@ err_out:
18154 static int __init sgiseeq_probe(void)
18157 + unsigned int tmp, ret1, ret2 = 0;
18159 /* On board adapter on 1st HPC is always present */
18160 - return sgiseeq_init(hpc3c0, SGI_ENET_IRQ);
18161 + ret1 = sgiseeq_init(hpc3c0, SGI_ENET_IRQ, 0);
18162 + /* Let's see if second HPC is there */
18163 + if (!(ip22_is_fullhouse()) &&
18164 + get_dbe(tmp, (unsigned int *)&hpc3c1->pbdma[1]) == 0) {
18165 + sgimc->giopar |= SGIMC_GIOPAR_MASTEREXP1 |
18166 + SGIMC_GIOPAR_EXP164 |
18167 + SGIMC_GIOPAR_HPC264;
18168 + hpc3c1->pbus_piocfg[0][0] = 0x3ffff;
18169 + /* interrupt/config register on Challenge S Mezz board */
18170 + hpc3c1->pbus_extregs[0][0] = 0x30;
18171 + ret2 = sgiseeq_init(hpc3c1, SGI_GIO_0_IRQ, 1);
18173 + return (ret1 & ret2) ? ret1 : 0;
18176 static void __exit sgiseeq_exit(void)
18177 @@ -747,4 +763,6 @@ static void __exit sgiseeq_exit(void)
18178 module_init(sgiseeq_probe);
18179 module_exit(sgiseeq_exit);
18181 +MODULE_DESCRIPTION("SGI Seeq 8003 driver");
18182 +MODULE_AUTHOR("David S. Miller");
18183 MODULE_LICENSE("GPL");
18184 --- a/drivers/pci/pci.c
18185 +++ b/drivers/pci/pci.c
18186 @@ -1281,11 +1281,17 @@ static int __devinit pci_scan_bridge(str
18188 unsigned int buses;
18190 + unsigned short bctl;
18191 struct pci_bus *child;
18192 int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS);
18194 pci_read_config_dword(dev, PCI_PRIMARY_BUS, &buses);
18195 DBG("Scanning behind PCI bridge %s, config %06x, pass %d\n", dev->slot_name, buses & 0xffffff, pass);
18196 + /* Disable MasterAbortMode during probing to avoid reporting
18197 + of bus errors (in some architectures) */
18198 + pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &bctl);
18199 + pci_write_config_word(dev, PCI_BRIDGE_CONTROL,
18200 + bctl & ~PCI_BRIDGE_CTL_MASTER_ABORT);
18201 if ((buses & 0xffff00) && !pcibios_assign_all_busses()) {
18203 * Bus already configured by firmware, process it in the first
18204 @@ -1351,6 +1357,7 @@ static int __devinit pci_scan_bridge(str
18205 pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max);
18206 pci_write_config_word(dev, PCI_COMMAND, cr);
18208 + pci_write_config_word(dev, PCI_BRIDGE_CONTROL, bctl);
18209 sprintf(child->name, (is_cardbus ? "PCI CardBus #%02x" : "PCI Bus #%02x"), child->number);
18212 --- a/drivers/pcmcia/au1000_db1x00.c
18213 +++ b/drivers/pcmcia/au1000_db1x00.c
18217 - * Alchemy Semi Db1x00 boards specific pcmcia routines.
18218 + * AMD Alchemy DUAL-SLOT Db1x00 boards' specific pcmcia routines.
18220 * Copyright 2002 MontaVista Software Inc.
18221 * Author: MontaVista Software, Inc.
18223 #include <asm/au1000.h>
18224 #include <asm/au1000_pcmcia.h>
18226 +#if defined(CONFIG_MIPS_PB1200)
18227 +#include <asm/pb1200.h>
18228 +#elif defined(CONFIG_MIPS_DB1200)
18229 +#include <asm/db1200.h>
18231 #include <asm/db1x00.h>
18234 -static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
18235 +#define PCMCIA_MAX_SOCK 1
18236 +#define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1)
18239 +#define SET_VCC_VPP(VCC, VPP, SLOT)\
18240 + ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
18242 static int db1x00_pcmcia_init(struct pcmcia_init *init)
18244 @@ -76,7 +87,7 @@ static int
18245 db1x00_pcmcia_socket_state(unsigned sock, struct pcmcia_state *state)
18248 - unsigned char vs;
18251 if(sock > PCMCIA_MAX_SOCK) return -1;
18253 @@ -87,11 +98,11 @@ db1x00_pcmcia_socket_state(unsigned sock
18256 vs = bcsr->status & 0x3;
18257 - inserted = !(bcsr->status & (1<<4));
18258 + inserted = BOARD_CARD_INSERTED(0);
18261 vs = (bcsr->status & 0xC)>>2;
18262 - inserted = !(bcsr->status & (1<<5));
18263 + inserted = BOARD_CARD_INSERTED(1);
18266 DEBUG(KERN_DEBUG "db1x00 socket %d: inserted %d, vs %d\n",
18267 @@ -144,16 +155,9 @@ static int db1x00_pcmcia_get_irq_info(st
18268 if(info->sock > PCMCIA_MAX_SOCK) return -1;
18270 if(info->sock == 0)
18271 -#ifdef CONFIG_MIPS_DB1550
18272 - info->irq = AU1000_GPIO_3;
18273 + info->irq = BOARD_PC0_INT;
18275 - info->irq = AU1000_GPIO_5;
18277 - info->irq = AU1000_GPIO_2;
18279 - info->irq = AU1000_GPIO_5;
18282 + info->irq = BOARD_PC1_INT;
18286 --- a/drivers/pcmcia/Config.in
18287 +++ b/drivers/pcmcia/Config.in
18288 @@ -30,16 +30,14 @@ if [ "$CONFIG_PCMCIA" != "n" ]; then
18289 dep_tristate ' M8xx support' CONFIG_PCMCIA_M8XX $CONFIG_PCMCIA
18291 if [ "$CONFIG_SOC_AU1X00" = "y" ]; then
18292 - dep_tristate ' Au1x00 PCMCIA support' CONFIG_PCMCIA_AU1X00 $CONFIG_PCMCIA
18293 - if [ "$CONFIG_PCMCIA_AU1X00" != "n" ]; then
18294 - bool ' Pb1x00 board support' CONFIG_PCMCIA_PB1X00
18295 - bool ' Db1x00 board support' CONFIG_PCMCIA_DB1X00
18296 - bool ' XXS1500 board support' CONFIG_PCMCIA_XXS1500
18298 + dep_tristate ' Au1x00 PCMCIA support' CONFIG_PCMCIA_AU1X00 $CONFIG_PCMCIA
18300 if [ "$CONFIG_SIBYTE_SB1xxx_SOC" = "y" ]; then
18301 dep_bool ' SiByte PCMCIA support' CONFIG_PCMCIA_SIBYTE $CONFIG_PCMCIA $CONFIG_BLK_DEV_IDE_SIBYTE
18303 + if [ "$CONFIG_VRC4171" = "y" -o "$CONFIG_VRC4171" = "m" ]; then
18304 + dep_tristate ' NEC VRC4171 Card Controllers support' CONFIG_PCMCIA_VRC4171 $CONFIG_PCMCIA
18306 if [ "$CONFIG_VRC4173" = "y" -o "$CONFIG_VRC4173" = "m" ]; then
18307 dep_tristate ' NEC VRC4173 CARDU support' CONFIG_PCMCIA_VRC4173 $CONFIG_PCMCIA
18309 --- a/drivers/pcmcia/Makefile
18310 +++ b/drivers/pcmcia/Makefile
18311 @@ -61,9 +61,18 @@ endif
18313 obj-$(CONFIG_PCMCIA_AU1X00) += au1x00_ss.o
18314 au1000_ss-objs-y := au1000_generic.o
18315 -au1000_ss-objs-$(CONFIG_PCMCIA_PB1X00) += au1000_pb1x00.o
18316 -au1000_ss-objs-$(CONFIG_PCMCIA_DB1X00) += au1000_db1x00.o
18317 -au1000_ss-objs-$(CONFIG_PCMCIA_XXS1500) += au1000_xxs1500.o
18318 +au1000_ss-objs-$(CONFIG_MIPS_PB1000) += au1000_pb1x00.o
18319 +au1000_ss-objs-$(CONFIG_MIPS_PB1100) += au1000_pb1x00.o
18320 +au1000_ss-objs-$(CONFIG_MIPS_PB1500) += au1000_pb1x00.o
18321 +au1000_ss-objs-$(CONFIG_MIPS_PB1550) += au1000_pb1550.o
18322 +au1000_ss-objs-$(CONFIG_MIPS_PB1200) += au1000_db1x00.o
18323 +au1000_ss-objs-$(CONFIG_MIPS_DB1000) += au1000_db1x00.o
18324 +au1000_ss-objs-$(CONFIG_MIPS_DB1100) += au1000_db1x00.o
18325 +au1000_ss-objs-$(CONFIG_MIPS_DB1500) += au1000_db1x00.o
18326 +au1000_ss-objs-$(CONFIG_MIPS_DB1550) += au1000_db1x00.o
18327 +au1000_ss-objs-$(CONFIG_MIPS_DB1200) += au1000_db1x00.o
18328 +au1000_ss-objs-$(CONFIG_MIPS_HYDROGEN3) += au1000_hydrogen3.o
18329 +au1000_ss-objs-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o
18331 obj-$(CONFIG_PCMCIA_SA1100) += sa1100_cs.o
18332 obj-$(CONFIG_PCMCIA_M8XX) += m8xx_pcmcia.o
18333 @@ -89,6 +98,7 @@ sa1100_cs-objs-$(CONFIG_SA1100_STORK) +
18334 sa1100_cs-objs-$(CONFIG_SA1100_XP860) += sa1100_xp860.o sa1111_generic.o
18335 sa1100_cs-objs-$(CONFIG_SA1100_YOPY) += sa1100_yopy.o
18337 +obj-$(CONFIG_PCMCIA_VRC4171) += vrc4171_card.o
18338 obj-$(CONFIG_PCMCIA_VRC4173) += vrc4173_cardu.o
18340 include $(TOPDIR)/Rules.make
18342 +++ b/drivers/pcmcia/vrc4171_card.c
18345 + * vrc4171_card.c, NEC VRC4171 Card Controller driver for Socket Services.
18347 + * Copyright (C) 2003 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
18349 + * This program is free software; you can redistribute it and/or modify
18350 + * it under the terms of the GNU General Public License as published by
18351 + * the Free Software Foundation; either version 2 of the License, or
18352 + * (at your option) any later version.
18354 + * This program is distributed in the hope that it will be useful,
18355 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
18356 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18357 + * GNU General Public License for more details.
18359 + * You should have received a copy of the GNU General Public License
18360 + * along with this program; if not, write to the Free Software
18361 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18363 +#include <linux/init.h>
18364 +#include <linux/ioport.h>
18365 +#include <linux/irq.h>
18366 +#include <linux/module.h>
18367 +#include <linux/spinlock.h>
18368 +#include <linux/sched.h>
18369 +#include <linux/types.h>
18371 +#include <asm/io.h>
18372 +#include <asm/vr41xx/vrc4171.h>
18374 +#include <pcmcia/ss.h>
18376 +#include "i82365.h"
18378 +MODULE_DESCRIPTION("NEC VRC4171 Card Controllers driver for Socket Services");
18379 +MODULE_AUTHOR("Yoichi Yuasa <yuasa@hh.iij4u.or.jp>");
18380 +MODULE_LICENSE("GPL");
18382 +#define CARD_MAX_SLOTS 2
18383 +#define CARD_SLOTA 0
18384 +#define CARD_SLOTB 1
18385 +#define CARD_SLOTB_OFFSET 0x40
18387 +#define CARD_MEM_START 0x10000000
18388 +#define CARD_MEM_END 0x13ffffff
18389 +#define CARD_MAX_MEM_OFFSET 0x3ffffff
18390 +#define CARD_MAX_MEM_SPEED 1000
18392 +#define CARD_CONTROLLER_INDEX 0x03e0
18393 +#define CARD_CONTROLLER_DATA 0x03e1
18394 +#define CARD_CONTROLLER_SIZE 2
18395 + /* Power register */
18396 + #define VPP_GET_VCC 0x01
18397 + #define POWER_ENABLE 0x10
18398 + #define CARD_VOLTAGE_SENSE 0x1f
18399 + #define VCC_3VORXV_CAPABLE 0x00
18400 + #define VCC_XV_ONLY 0x01
18401 + #define VCC_3V_CAPABLE 0x02
18402 + #define VCC_5V_ONLY 0x03
18403 + #define CARD_VOLTAGE_SELECT 0x2f
18404 + #define VCC_3V 0x01
18405 + #define VCC_5V 0x00
18406 + #define VCC_XV 0x02
18407 + #define VCC_STATUS_3V 0x02
18408 + #define VCC_STATUS_5V 0x01
18409 + #define VCC_STATUS_XV 0x03
18410 + #define GLOBAL_CONTROL 0x1e
18411 + #define EXWRBK 0x04
18412 + #define IRQPM_EN 0x08
18413 + #define CLRPMIRQ 0x10
18415 +#define IO_MAX_MAPS 2
18416 +#define MEM_MAX_MAPS 5
18420 + SLOTB_NOPROBE_IO,
18421 + SLOTB_NOPROBE_MEM,
18422 + SLOTB_NOPROBE_ALL
18425 +typedef struct vrc4171_socket {
18427 + void (*handler)(void *, unsigned int);
18429 + socket_cap_t cap;
18430 + spinlock_t event_lock;
18432 + struct socket_info_t *pcmcia_socket;
18433 + struct tq_struct tq_task;
18437 +} vrc4171_socket_t;
18439 +static vrc4171_socket_t vrc4171_sockets[CARD_MAX_SLOTS];
18440 +static int vrc4171_slotb = SLOTB_IS_NONE;
18441 +static unsigned int vrc4171_irq;
18442 +static uint16_t vrc4171_irq_mask = 0xdeb8;
18444 +extern struct socket_info_t *pcmcia_register_socket(int slot,
18445 + struct pccard_operations *vtable,
18447 +extern void pcmcia_unregister_socket(struct socket_info_t *s);
18449 +static inline uint8_t exca_read_byte(int slot, uint8_t index)
18451 + if (slot == CARD_SLOTB)
18452 + index += CARD_SLOTB_OFFSET;
18454 + outb(index, CARD_CONTROLLER_INDEX);
18455 + return inb(CARD_CONTROLLER_DATA);
18458 +static inline uint16_t exca_read_word(int slot, uint8_t index)
18462 + if (slot == CARD_SLOTB)
18463 + index += CARD_SLOTB_OFFSET;
18465 + outb(index++, CARD_CONTROLLER_INDEX);
18466 + data = inb(CARD_CONTROLLER_DATA);
18468 + outb(index, CARD_CONTROLLER_INDEX);
18469 + data |= ((uint16_t)inb(CARD_CONTROLLER_DATA)) << 8;
18474 +static inline uint8_t exca_write_byte(int slot, uint8_t index, uint8_t data)
18476 + if (slot == CARD_SLOTB)
18477 + index += CARD_SLOTB_OFFSET;
18479 + outb(index, CARD_CONTROLLER_INDEX);
18480 + outb(data, CARD_CONTROLLER_DATA);
18485 +static inline uint16_t exca_write_word(int slot, uint8_t index, uint16_t data)
18487 + if (slot == CARD_SLOTB)
18488 + index += CARD_SLOTB_OFFSET;
18490 + outb(index++, CARD_CONTROLLER_INDEX);
18491 + outb(data, CARD_CONTROLLER_DATA);
18493 + outb(index, CARD_CONTROLLER_INDEX);
18494 + outb((uint8_t)(data >> 8), CARD_CONTROLLER_DATA);
18499 +static inline int search_nonuse_irq(void)
18503 + for (i = 0; i < 16; i++) {
18504 + if (vrc4171_irq_mask & (1 << i)) {
18505 + vrc4171_irq_mask &= ~(1 << i);
18513 +static int pccard_init(unsigned int slot)
18515 + vrc4171_socket_t *socket = &vrc4171_sockets[slot];
18517 + socket->cap.features |= SS_CAP_PCCARD | SS_CAP_PAGE_REGS;
18518 + socket->cap.irq_mask = 0;
18519 + socket->cap.pci_irq = vrc4171_irq;
18520 + socket->cap.map_size = 0x1000;
18521 + socket->events = 0;
18522 + spin_lock_init(socket->event_lock);
18523 + socket->csc_irq = search_nonuse_irq();
18524 + socket->io_irq = search_nonuse_irq();
18529 +static int pccard_suspend(unsigned int slot)
18534 +static int pccard_register_callback(unsigned int slot,
18535 + void (*handler)(void *, unsigned int),
18538 + vrc4171_socket_t *socket;
18540 + if (slot >= CARD_MAX_SLOTS)
18543 + socket = &vrc4171_sockets[slot];
18545 + socket->handler = handler;
18546 + socket->info = info;
18549 + MOD_INC_USE_COUNT;
18551 + MOD_DEC_USE_COUNT;
18556 +static int pccard_inquire_socket(unsigned int slot, socket_cap_t *cap)
18558 + vrc4171_socket_t *socket;
18560 + if (slot >= CARD_MAX_SLOTS || cap == NULL)
18563 + socket = &vrc4171_sockets[slot];
18565 + *cap = socket->cap;
18570 +static int pccard_get_status(unsigned int slot, u_int *value)
18572 + uint8_t status, sense;
18575 + if (slot >= CARD_MAX_SLOTS || value == NULL)
18578 + status = exca_read_byte(slot, I365_STATUS);
18579 + if (exca_read_byte(slot, I365_INTCTL) & I365_PC_IOCARD) {
18580 + if (status & I365_CS_STSCHG)
18581 + val |= SS_STSCHG;
18583 + if (!(status & I365_CS_BVD1))
18584 + val |= SS_BATDEAD;
18585 + else if ((status & (I365_CS_BVD1 | I365_CS_BVD2)) == I365_CS_BVD1)
18586 + val |= SS_BATWARN;
18588 + if ((status & I365_CS_DETECT) == I365_CS_DETECT)
18589 + val |= SS_DETECT;
18590 + if (status & I365_CS_WRPROT)
18591 + val |= SS_WRPROT;
18592 + if (status & I365_CS_READY)
18594 + if (status & I365_CS_POWERON)
18595 + val |= SS_POWERON;
18597 + sense = exca_read_byte(slot, CARD_VOLTAGE_SENSE);
18599 + case VCC_3VORXV_CAPABLE:
18600 + val |= SS_3VCARD | SS_XVCARD;
18602 + case VCC_XV_ONLY:
18603 + val |= SS_XVCARD;
18605 + case VCC_3V_CAPABLE:
18606 + val |= SS_3VCARD;
18618 +static inline u_char get_Vcc_value(uint8_t voltage)
18620 + switch (voltage) {
18621 + case VCC_STATUS_3V:
18623 + case VCC_STATUS_5V:
18632 +static inline u_char get_Vpp_value(uint8_t power, u_char Vcc)
18634 + if ((power & 0x03) == 0x01 || (power & 0x03) == 0x02)
18640 +static int pccard_get_socket(unsigned int slot, socket_state_t *state)
18642 + vrc4171_socket_t *socket;
18643 + uint8_t power, voltage, control, cscint;
18645 + if (slot >= CARD_MAX_SLOTS || state == NULL)
18648 + socket = &vrc4171_sockets[slot];
18650 + power = exca_read_byte(slot, I365_POWER);
18651 + voltage = exca_read_byte(slot, CARD_VOLTAGE_SELECT);
18653 + state->Vcc = get_Vcc_value(voltage);
18654 + state->Vpp = get_Vpp_value(power, state->Vcc);
18656 + state->flags = 0;
18657 + if (power & POWER_ENABLE)
18658 + state->flags |= SS_PWR_AUTO;
18659 + if (power & I365_PWR_OUT)
18660 + state->flags |= SS_OUTPUT_ENA;
18662 + control = exca_read_byte(slot, I365_INTCTL);
18663 + if (control & I365_PC_IOCARD)
18664 + state->flags |= SS_IOCARD;
18665 + if (!(control & I365_PC_RESET))
18666 + state->flags |= SS_RESET;
18668 + cscint = exca_read_byte(slot, I365_CSCINT);
18669 + state->csc_mask = 0;
18670 + if (state->flags & SS_IOCARD) {
18671 + if (cscint & I365_CSC_STSCHG)
18672 + state->flags |= SS_STSCHG;
18674 + if (cscint & I365_CSC_BVD1)
18675 + state->csc_mask |= SS_BATDEAD;
18676 + if (cscint & I365_CSC_BVD2)
18677 + state->csc_mask |= SS_BATWARN;
18679 + if (cscint & I365_CSC_READY)
18680 + state->csc_mask |= SS_READY;
18681 + if (cscint & I365_CSC_DETECT)
18682 + state->csc_mask |= SS_DETECT;
18687 +static inline uint8_t set_Vcc_value(u_char Vcc)
18696 + /* Small voltage is chosen for safety. */
18700 +static int pccard_set_socket(unsigned int slot, socket_state_t *state)
18702 + vrc4171_socket_t *socket;
18703 + uint8_t voltage, power, control, cscint;
18705 + if (slot >= CARD_MAX_SLOTS ||
18706 + (state->Vpp != state->Vcc && state->Vpp != 0) ||
18707 + (state->Vcc != 50 && state->Vcc != 33 && state->Vcc != 0))
18710 + socket = &vrc4171_sockets[slot];
18712 + spin_lock_irq(&socket->event_lock);
18714 + voltage = set_Vcc_value(state->Vcc);
18715 + exca_write_byte(slot, CARD_VOLTAGE_SELECT, voltage);
18717 + power = POWER_ENABLE;
18718 + if (state->Vpp == state->Vcc)
18719 + power |= VPP_GET_VCC;
18720 + if (state->flags & SS_OUTPUT_ENA)
18721 + power |= I365_PWR_OUT;
18722 + exca_write_byte(slot, I365_POWER, power);
18725 + if (state->io_irq != 0)
18726 + control |= socket->io_irq;
18727 + if (state->flags & SS_IOCARD)
18728 + control |= I365_PC_IOCARD;
18729 + if (state->flags & SS_RESET)
18730 + control &= ~I365_PC_RESET;
18732 + control |= I365_PC_RESET;
18733 + exca_write_byte(slot, I365_INTCTL, control);
18736 + exca_write_byte(slot, I365_CSCINT, cscint);
18737 + exca_read_byte(slot, I365_CSC); /* clear CardStatus change */
18738 + if (state->csc_mask != 0)
18739 + cscint |= socket->csc_irq << 8;
18740 + if (state->flags & SS_IOCARD) {
18741 + if (state->csc_mask & SS_STSCHG)
18742 + cscint |= I365_CSC_STSCHG;
18744 + if (state->csc_mask & SS_BATDEAD)
18745 + cscint |= I365_CSC_BVD1;
18746 + if (state->csc_mask & SS_BATWARN)
18747 + cscint |= I365_CSC_BVD2;
18749 + if (state->csc_mask & SS_READY)
18750 + cscint |= I365_CSC_READY;
18751 + if (state->csc_mask & SS_DETECT)
18752 + cscint |= I365_CSC_DETECT;
18753 + exca_write_byte(slot, I365_CSCINT, cscint);
18755 + spin_unlock_irq(&socket->event_lock);
18760 +static int pccard_get_io_map(unsigned int slot, struct pccard_io_map *io)
18762 + vrc4171_socket_t *socket;
18763 + uint8_t ioctl, addrwin;
18766 + if (slot >= CARD_MAX_SLOTS || io == NULL ||
18767 + io->map >= IO_MAX_MAPS)
18770 + socket = &vrc4171_sockets[slot];
18773 + io->start = exca_read_word(slot, I365_IO(map)+I365_W_START);
18774 + io->stop = exca_read_word(slot, I365_IO(map)+I365_W_STOP);
18776 + ioctl = exca_read_byte(slot, I365_IOCTL);
18777 + if (io->flags & I365_IOCTL_WAIT(map))
18783 + if (ioctl & I365_IOCTL_16BIT(map))
18784 + io->flags |= MAP_16BIT;
18785 + if (ioctl & I365_IOCTL_IOCS16(map))
18786 + io->flags |= MAP_AUTOSZ;
18787 + if (ioctl & I365_IOCTL_0WS(map))
18788 + io->flags |= MAP_0WS;
18790 + addrwin = exca_read_byte(slot, I365_ADDRWIN);
18791 + if (addrwin & I365_ENA_IO(map))
18792 + io->flags |= MAP_ACTIVE;
18797 +static int pccard_set_io_map(unsigned int slot, struct pccard_io_map *io)
18799 + vrc4171_socket_t *socket;
18800 + uint8_t ioctl, addrwin;
18803 + if (slot >= CARD_MAX_SLOTS ||
18804 + io == NULL || io->map >= IO_MAX_MAPS ||
18805 + io->start > 0xffff || io->stop > 0xffff || io->start > io->stop)
18808 + socket = &vrc4171_sockets[slot];
18811 + addrwin = exca_read_byte(slot, I365_ADDRWIN);
18812 + if (addrwin & I365_ENA_IO(map)) {
18813 + addrwin &= ~I365_ENA_IO(map);
18814 + exca_write_byte(slot, I365_ADDRWIN, addrwin);
18817 + exca_write_word(slot, I365_IO(map)+I365_W_START, io->start);
18818 + exca_write_word(slot, I365_IO(map)+I365_W_STOP, io->stop);
18821 + if (io->speed > 0)
18822 + ioctl |= I365_IOCTL_WAIT(map);
18823 + if (io->flags & MAP_16BIT)
18824 + ioctl |= I365_IOCTL_16BIT(map);
18825 + if (io->flags & MAP_AUTOSZ)
18826 + ioctl |= I365_IOCTL_IOCS16(map);
18827 + if (io->flags & MAP_0WS)
18828 + ioctl |= I365_IOCTL_0WS(map);
18829 + exca_write_byte(slot, I365_IOCTL, ioctl);
18831 + if (io->flags & MAP_ACTIVE) {
18832 + addrwin |= I365_ENA_IO(map);
18833 + exca_write_byte(slot, I365_ADDRWIN, addrwin);
18839 +static int pccard_get_mem_map(unsigned int slot, struct pccard_mem_map *mem)
18841 + vrc4171_socket_t *socket;
18843 + u_long start, stop;
18847 + if (slot >= CARD_MAX_SLOTS || mem == NULL || mem->map >= MEM_MAX_MAPS)
18850 + socket = &vrc4171_sockets[slot];
18856 + addrwin = exca_read_byte(slot, I365_ADDRWIN);
18857 + if (addrwin & I365_ENA_MEM(map))
18858 + mem->flags |= MAP_ACTIVE;
18860 + start = exca_read_word(slot, I365_MEM(map)+I365_W_START);
18861 + if (start & I365_MEM_16BIT)
18862 + mem->flags |= MAP_16BIT;
18863 + mem->sys_start = (start & 0x3fffUL) << 12;
18865 + stop = exca_read_word(slot, I365_MEM(map)+I365_W_STOP);
18866 + if (start & I365_MEM_WS0)
18868 + if (start & I365_MEM_WS1)
18870 + mem->sys_stop = ((stop & 0x3fffUL) << 12) + 0xfffUL;
18872 + offset = exca_read_word(slot, I365_MEM(map)+I365_W_OFF);
18873 + if (offset & I365_MEM_REG)
18874 + mem->flags |= MAP_ATTRIB;
18875 + if (offset & I365_MEM_WRPROT)
18876 + mem->flags |= MAP_WRPROT;
18877 + mem->card_start = (offset & 0x3fffUL) << 12;
18879 + mem->sys_start += CARD_MEM_START;
18880 + mem->sys_stop += CARD_MEM_START;
18885 +static int pccard_set_mem_map(unsigned int slot, struct pccard_mem_map *mem)
18887 + vrc4171_socket_t *socket;
18888 + uint16_t start, stop, offset;
18892 + if (slot >= CARD_MAX_SLOTS ||
18893 + mem == NULL || mem->map >= MEM_MAX_MAPS ||
18894 + mem->sys_start < CARD_MEM_START || mem->sys_start > CARD_MEM_END ||
18895 + mem->sys_stop < CARD_MEM_START || mem->sys_stop > CARD_MEM_END ||
18896 + mem->sys_start > mem->sys_stop ||
18897 + mem->card_start > CARD_MAX_MEM_OFFSET ||
18898 + mem->speed > CARD_MAX_MEM_SPEED)
18901 + socket = &vrc4171_sockets[slot];
18904 + addrwin = exca_read_byte(slot, I365_ADDRWIN);
18905 + if (addrwin & I365_ENA_MEM(map)) {
18906 + addrwin &= ~I365_ENA_MEM(map);
18907 + exca_write_byte(slot, I365_ADDRWIN, addrwin);
18910 + start = (mem->sys_start >> 12) & 0x3fff;
18911 + if (mem->flags & MAP_16BIT)
18912 + start |= I365_MEM_16BIT;
18913 + exca_write_word(slot, I365_MEM(map)+I365_W_START, start);
18915 + stop = (mem->sys_stop >> 12) & 0x3fff;
18916 + switch (mem->speed) {
18920 + stop |= I365_MEM_WS0;
18923 + stop |= I365_MEM_WS1;
18926 + stop |= I365_MEM_WS0 | I365_MEM_WS1;
18929 + exca_write_word(slot, I365_MEM(map)+I365_W_STOP, stop);
18931 + offset = (mem->card_start >> 12) & 0x3fff;
18932 + if (mem->flags & MAP_ATTRIB)
18933 + offset |= I365_MEM_REG;
18934 + if (mem->flags & MAP_WRPROT)
18935 + offset |= I365_MEM_WRPROT;
18936 + exca_write_word(slot, I365_MEM(map)+I365_W_OFF, offset);
18938 + if (mem->flags & MAP_ACTIVE) {
18939 + addrwin |= I365_ENA_MEM(map);
18940 + exca_write_byte(slot, I365_ADDRWIN, addrwin);
18946 +static void pccard_proc_setup(unsigned int slot, struct proc_dir_entry *base)
18950 +static struct pccard_operations vrc4171_pccard_operations = {
18951 + .init = pccard_init,
18952 + .suspend = pccard_suspend,
18953 + .register_callback = pccard_register_callback,
18954 + .inquire_socket = pccard_inquire_socket,
18955 + .get_status = pccard_get_status,
18956 + .get_socket = pccard_get_socket,
18957 + .set_socket = pccard_set_socket,
18958 + .get_io_map = pccard_get_io_map,
18959 + .set_io_map = pccard_set_io_map,
18960 + .get_mem_map = pccard_get_mem_map,
18961 + .set_mem_map = pccard_set_mem_map,
18962 + .proc_setup = pccard_proc_setup,
18965 +static void pccard_bh(void *data)
18967 + vrc4171_socket_t *socket = (vrc4171_socket_t *)data;
18970 + spin_lock_irq(&socket->event_lock);
18971 + events = socket->events;
18972 + socket->events = 0;
18973 + spin_unlock_irq(&socket->event_lock);
18975 + if (socket->handler)
18976 + socket->handler(socket->info, events);
18979 +static inline uint16_t get_events(int slot)
18981 + uint16_t events = 0;
18982 + uint8_t status, csc;
18984 + status = exca_read_byte(slot, I365_STATUS);
18985 + csc = exca_read_byte(slot, I365_CSC);
18987 + if (exca_read_byte(slot, I365_INTCTL) & I365_PC_IOCARD) {
18988 + if ((csc & I365_CSC_STSCHG) && (status & I365_CS_STSCHG))
18989 + events |= SS_STSCHG;
18991 + if (csc & (I365_CSC_BVD1 | I365_CSC_BVD2)) {
18992 + if (!(status & I365_CS_BVD1))
18993 + events |= SS_BATDEAD;
18994 + else if ((status & (I365_CS_BVD1 | I365_CS_BVD2)) == I365_CS_BVD1)
18995 + events |= SS_BATWARN;
18998 + if ((csc & I365_CSC_READY) && (status & I365_CS_READY))
18999 + events |= SS_READY;
19000 + if ((csc & I365_CSC_DETECT) && ((status & I365_CS_DETECT) == I365_CS_DETECT))
19001 + events |= SS_DETECT;
19006 +static void pccard_status_change(int slot, vrc4171_socket_t *socket)
19010 + socket->tq_task.routine = pccard_bh;
19011 + socket->tq_task.data = socket;
19013 + events = get_events(slot);
19015 + spin_lock(&socket->event_lock);
19016 + socket->events |= events;
19017 + spin_unlock(&socket->event_lock);
19018 + schedule_task(&socket->tq_task);
19022 +static void pccard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
19024 + vrc4171_socket_t *socket;
19027 + status = vrc4171_get_irq_status();
19028 + if (status & IRQ_A) {
19029 + socket = &vrc4171_sockets[CARD_SLOTA];
19030 + if (socket->noprobe == SLOTB_PROBE) {
19031 + if (status & (1 << socket->csc_irq))
19032 + pccard_status_change(CARD_SLOTA, socket);
19036 + if (status & IRQ_B) {
19037 + socket = &vrc4171_sockets[CARD_SLOTB];
19038 + if (socket->noprobe == SLOTB_PROBE) {
19039 + if (status & (1 << socket->csc_irq))
19040 + pccard_status_change(CARD_SLOTB, socket);
19045 +static inline void reserve_using_irq(int slot)
19047 + unsigned int irq;
19049 + irq = exca_read_byte(slot, I365_INTCTL);
19051 + vrc4171_irq_mask &= ~(1 << irq);
19053 + irq = exca_read_byte(slot, I365_CSCINT);
19054 + irq = (irq & 0xf0) >> 4;
19055 + vrc4171_irq_mask &= ~(1 << irq);
19058 +static int __devinit vrc4171_add_socket(int slot)
19060 + vrc4171_socket_t *socket;
19062 + if (slot >= CARD_MAX_SLOTS)
19065 + socket = &vrc4171_sockets[slot];
19066 + if (socket->noprobe != SLOTB_PROBE) {
19069 + switch (socket->noprobe) {
19070 + case SLOTB_NOPROBE_MEM:
19071 + addrwin = exca_read_byte(slot, I365_ADDRWIN);
19073 + exca_write_byte(slot, I365_ADDRWIN, addrwin);
19075 + case SLOTB_NOPROBE_IO:
19076 + addrwin = exca_read_byte(slot, I365_ADDRWIN);
19078 + exca_write_byte(slot, I365_ADDRWIN, addrwin);
19084 + reserve_using_irq(slot);
19089 + sprintf(socket->name, "NEC VRC4171 Card Slot %1c", 'A' + slot);
19091 + socket->pcmcia_socket = pcmcia_register_socket(slot, &vrc4171_pccard_operations, 1);
19092 + if (socket->pcmcia_socket == NULL)
19095 + exca_write_byte(slot, I365_ADDRWIN, 0);
19097 + exca_write_byte(slot, GLOBAL_CONTROL, 0);
19102 +static void vrc4171_remove_socket(int slot)
19104 + vrc4171_socket_t *socket;
19106 + if (slot >= CARD_MAX_SLOTS)
19109 + socket = &vrc4171_sockets[slot];
19111 + if (socket->pcmcia_socket != NULL) {
19112 + pcmcia_unregister_socket(socket->pcmcia_socket);
19113 + socket->pcmcia_socket = NULL;
19117 +static int __devinit vrc4171_card_setup(char *options)
19119 + if (options == NULL || *options == '\0')
19122 + if (strncmp(options, "irq:", 4) == 0) {
19125 + irq = simple_strtoul(options, &options, 0);
19126 + if (irq >= 0 && irq < NR_IRQS)
19127 + vrc4171_irq = irq;
19129 + if (*options != ',')
19134 + if (strncmp(options, "slota:", 6) == 0) {
19136 + if (*options != '\0') {
19137 + if (strncmp(options, "noprobe", 7) == 0) {
19138 + vrc4171_sockets[CARD_SLOTA].noprobe = 1;
19142 + if (*options != ',')
19150 + if (strncmp(options, "slotb:", 6) == 0) {
19152 + if (*options != '\0') {
19153 + if (strncmp(options, "pccard", 6) == 0) {
19154 + vrc4171_slotb = SLOTB_IS_PCCARD;
19156 + } else if (strncmp(options, "cf", 2) == 0) {
19157 + vrc4171_slotb = SLOTB_IS_CF;
19159 + } else if (strncmp(options, "flashrom", 8) == 0) {
19160 + vrc4171_slotb = SLOTB_IS_FLASHROM;
19162 + } else if (strncmp(options, "none", 4) == 0) {
19163 + vrc4171_slotb = SLOTB_IS_NONE;
19167 + if (*options != ',')
19171 + if ( strncmp(options, "memnoprobe", 10) == 0)
19172 + vrc4171_sockets[CARD_SLOTB].noprobe = SLOTB_NOPROBE_MEM;
19173 + if ( strncmp(options, "ionoprobe", 9) == 0)
19174 + vrc4171_sockets[CARD_SLOTB].noprobe = SLOTB_NOPROBE_IO;
19175 + if ( strncmp(options, "noprobe", 7) == 0)
19176 + vrc4171_sockets[CARD_SLOTB].noprobe = SLOTB_NOPROBE_ALL;
19183 +__setup("vrc4171_card=", vrc4171_card_setup);
19185 +static int __devinit vrc4171_card_init(void)
19187 + int retval, slot;
19189 + vrc4171_set_multifunction_pin(vrc4171_slotb);
19191 + if (request_region(CARD_CONTROLLER_INDEX, CARD_CONTROLLER_SIZE,
19192 + "NEC VRC4171 Card Controller") == NULL)
19195 + for (slot = 0; slot < CARD_MAX_SLOTS; slot++) {
19196 + if (slot == CARD_SLOTB && vrc4171_slotb == SLOTB_IS_NONE)
19199 + retval = vrc4171_add_socket(slot);
19204 + retval = request_irq(vrc4171_irq, pccard_interrupt, SA_SHIRQ,
19205 + "NEC VRC4171 Card Controller", vrc4171_sockets);
19206 + if (retval < 0) {
19207 + for (slot = 0; slot < CARD_MAX_SLOTS; slot++)
19208 + vrc4171_remove_socket(slot);
19213 + printk(KERN_INFO "NEC VRC4171 Card Controller, connected to IRQ %d\n", vrc4171_irq);
19218 +static void __devexit vrc4171_card_exit(void)
19222 + for (slot = 0; slot < CARD_MAX_SLOTS; slot++)
19223 + vrc4171_remove_socket(slot);
19225 + release_region(CARD_CONTROLLER_INDEX, CARD_CONTROLLER_SIZE);
19228 +module_init(vrc4171_card_init);
19229 +module_exit(vrc4171_card_exit);
19230 --- a/drivers/scsi/NCR53C9x.h
19231 +++ b/drivers/scsi/NCR53C9x.h
19232 @@ -144,12 +144,7 @@
19234 #ifndef MULTIPLE_PAD_SIZES
19236 -#ifdef CONFIG_CPU_HAS_WB
19237 -#include <asm/wbflush.h>
19238 -#define esp_write(__reg, __val) do{(__reg) = (__val); wbflush();} while(0)
19240 -#define esp_write(__reg, __val) ((__reg) = (__val))
19242 +#define esp_write(__reg, __val) do{(__reg) = (__val); iob();} while(0)
19243 #define esp_read(__reg) (__reg)
19246 --- a/drivers/sound/au1550_i2s.c
19247 +++ b/drivers/sound/au1550_i2s.c
19249 * 675 Mass Ave, Cambridge, MA 02139, USA.
19253 #include <linux/version.h>
19254 #include <linux/module.h>
19255 #include <linux/string.h>
19257 #include <asm/uaccess.h>
19258 #include <asm/hardirq.h>
19259 #include <asm/au1000.h>
19261 +#if defined(CONFIG_SOC_AU1550)
19262 #include <asm/pb1550.h>
19265 +#if defined(CONFIG_MIPS_PB1200)
19267 +#define WM_MODE_USB
19268 +#include <asm/pb1200.h>
19271 +#if defined(CONFIG_MIPS_FICMMP)
19273 +#define WM_MODE_NORMAL
19274 +#include <asm/ficmmp.h>
19278 +#define WM_VOLUME_MIN 47
19279 +#define WM_VOLUME_SCALE 80
19281 +#if defined(WM8731)
19282 + /* OSS interface to the wm i2s.. */
19283 + #define CODEC_NAME "Wolfson WM8731 I2S"
19284 + #define WM_I2S_STEREO_MASK (SOUND_MASK_PCM | SOUND_MASK_LINE)
19285 + #define WM_I2S_SUPPORTED_MASK (WM_I2S_STEREO_MASK | SOUND_MASK_MIC)
19286 + #define WM_I2S_RECORD_MASK (SOUND_MASK_MIC | SOUND_MASK_LINE1 | SOUND_MASK_LINE)
19287 +#elif defined(WM8721)
19288 + #define CODEC_NAME "Wolfson WM8721 I2S"
19289 + #define WM_I2S_STEREO_MASK (SOUND_MASK_PCM)
19290 + #define WM_I2S_SUPPORTED_MASK (WM_I2S_STEREO_MASK)
19291 + #define WM_I2S_RECORD_MASK (0)
19295 +#define supported_mixer(FOO) ((FOO >= 0) && \
19296 + (FOO < SOUND_MIXER_NRDEVICES) && \
19297 + WM_I2S_SUPPORTED_MASK & (1<<FOO) )
19299 #include <asm/au1xxx_psc.h>
19300 #include <asm/au1xxx_dbdma.h>
19302 @@ -98,13 +137,51 @@
19303 * 0 = no VRA, 1 = use VRA if codec supports it
19304 * The framework is here, but we currently force no VRA.
19306 +#if defined(CONFIG_MIPS_PB1200) | defined(CONFIG_MIPS_PB1550)
19307 static int vra = 0;
19308 +#elif defined(CONFIG_MIPS_FICMMP)
19309 +static int vra = 1;
19312 +#define WM_REG_L_HEADPHONE_OUT 0x02
19313 +#define WM_REG_R_HEADPHONE_OUT 0x03
19314 +#define WM_REG_ANALOGUE_AUDIO_PATH_CTRL 0x04
19315 +#define WM_REG_DIGITAL_AUDIO_PATH_CTRL 0x05
19316 +#define WM_REG_POWER_DOWN_CTRL 0x06
19317 +#define WM_REG_DIGITAL_AUDIO_IF 0x07
19318 +#define WM_REG_SAMPLING_CONTROL 0x08
19319 +#define WM_REG_ACTIVE_CTRL 0x09
19320 +#define WM_REG_RESET 0x0F
19321 +#define WM_SC_SR_96000 (0x7<<2)
19322 +#define WM_SC_SR_88200 (0xF<<2)
19323 +#define WM_SC_SR_48000 (0x0<<2)
19324 +#define WM_SC_SR_44100 (0x8<<2)
19325 +#define WM_SC_SR_32000 (0x6<<2)
19326 +#define WM_SC_SR_8018 (0x9<<2)
19327 +#define WM_SC_SR_8000 (0x1<<2)
19328 +#define WM_SC_MODE_USB 1
19329 +#define WM_SC_MODE_NORMAL 0
19330 +#define WM_SC_BOSR_250FS (0<<1)
19331 +#define WM_SC_BOSR_272FS (1<<1)
19332 +#define WM_SC_BOSR_256FS (0<<1)
19333 +#define WM_SC_BOSR_128FS (0<<1)
19334 +#define WM_SC_BOSR_384FS (1<<1)
19335 +#define WM_SC_BOSR_192FS (1<<1)
19337 +#define WS_64FS 31
19338 +#define WS_96FS 47
19339 +#define WS_128FS 63
19340 +#define WS_192FS 95
19342 +#define MIN_Q_COUNT 2
19344 MODULE_PARM(vra, "i");
19345 MODULE_PARM_DESC(vra, "if 1 use VRA if codec supports it");
19347 static struct au1550_state {
19348 /* soundcore stuff */
19353 struct semaphore open_sem;
19354 @@ -114,6 +191,11 @@ static struct au1550_state {
19356 volatile psc_i2s_t *psc_addr;
19365 unsigned sample_rate;
19366 @@ -195,60 +277,224 @@ au1550_delay(int msec)
19370 -/* Just a place holder. The Wolfson codec is a write only device,
19371 - * so we would have to keep a local copy of the data.
19377 - return 0 /* data */;
19383 -wrcodec(u8 ctlreg, u8 val)
19384 +wrcodec(u8 ctlreg, u16 val)
19387 extern int pb1550_wm_codec_write(u8 addr, u8 reg, u8 val);
19389 /* The codec is a write only device, with a 16-bit control/data
19390 * word. Although it is written as two bytes on the I2C, the
19391 * format is actually 7 bits of register and 9 bits of data.
19392 * The ls bit of the first byte is the ms bit of the data.
19395 - while ((pb1550_wm_codec_write((0x36 >> 1), ctlreg, val) != 1)
19396 - && (rcnt < 50)) {
19397 + while ((pb1550_wm_codec_write((0x36 >> 1),
19398 + (ctlreg << 1) | ((val >> 8) & 0x01),
19399 + (u8) (val & 0x00FF)) != 1) &&
19403 - printk("Codec write retry %02x %02x\n", ctlreg, val);
19407 + au1550_delay(10);
19411 +au1550_open_mixdev(struct inode *inode, struct file *file)
19413 + file->private_data = &au1550_state;
19418 +au1550_release_mixdev(struct inode *inode, struct file *file)
19423 +static int wm_i2s_read_mixer(struct au1550_state *s, int oss_channel)
19427 + if (WM_I2S_STEREO_MASK & (1 << oss_channel)) {
19428 + /* nice stereo mixers .. */
19430 + ret = s->level_left | (s->level_right << 8);
19431 + } else if (oss_channel == SOUND_MIXER_MIC) {
19433 + /* TODO: Implement read mixer for input/output codecs */
19439 +static void wm_i2s_write_mixer(struct au1550_state *s, int oss_channel, unsigned int left, unsigned int right)
19441 + if (WM_I2S_STEREO_MASK & (1 << oss_channel)) {
19442 + /* stereo mixers */
19443 + s->level_left = left;
19444 + s->level_right = right;
19446 + right = (right * WM_VOLUME_SCALE) / 100;
19447 + left = (left * WM_VOLUME_SCALE) / 100;
19448 + if (right > WM_VOLUME_SCALE)
19449 + right = WM_VOLUME_SCALE;
19450 + if (left > WM_VOLUME_SCALE)
19451 + left = WM_VOLUME_SCALE;
19453 + right += WM_VOLUME_MIN;
19454 + left += WM_VOLUME_MIN;
19456 + wrcodec(WM_REG_L_HEADPHONE_OUT, left);
19457 + wrcodec(WM_REG_R_HEADPHONE_OUT, right);
19459 + }else if (oss_channel == SOUND_MIXER_MIC) {
19460 + /* TODO: implement write mixer for input/output codecs */
19464 +/* a thin wrapper for write_mixer */
19465 +static void wm_i2s_set_mixer(struct au1550_state *s, unsigned int oss_mixer, unsigned int val )
19467 + unsigned int left,right;
19469 + /* cleanse input a little */
19470 + right = ((val >> 8) & 0xff) ;
19471 + left = (val & 0xff) ;
19473 + if (right > 100) right = 100;
19474 + if (left > 100) left = 100;
19476 + wm_i2s_write_mixer(s, oss_mixer, left, right);
19480 +au1550_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
19482 + struct au1550_state *s = (struct au1550_state *)file->private_data;
19486 + if (cmd == SOUND_MIXER_INFO) {
19488 + strncpy(info.id, CODEC_NAME, sizeof(info.id));
19489 + strncpy(info.name, CODEC_NAME, sizeof(info.name));
19490 + info.modify_counter = 0;
19491 + if (copy_to_user((void *)arg, &info, sizeof(info)))
19495 + if (cmd == SOUND_OLD_MIXER_INFO) {
19496 + _old_mixer_info info;
19497 + strncpy(info.id, CODEC_NAME, sizeof(info.id));
19498 + strncpy(info.name, CODEC_NAME, sizeof(info.name));
19499 + if (copy_to_user((void *)arg, &info, sizeof(info)))
19504 + if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
19507 + if (cmd == OSS_GETVERSION)
19508 + return put_user(SOUND_VERSION, (int *)arg);
19510 + if (_SIOC_DIR(cmd) == _SIOC_READ) {
19511 + switch (_IOC_NR(cmd)) {
19512 + case SOUND_MIXER_RECSRC: /* give them the current record src */
19515 + if (!codec->recmask_io) {
19518 + val = codec->recmask_io(codec, 1, 0);
19522 + case SOUND_MIXER_DEVMASK: /* give them the supported mixers */
19523 + val = WM_I2S_SUPPORTED_MASK;
19526 + case SOUND_MIXER_RECMASK:
19527 + /* Arg contains a bit for each supported recording
19529 + val = WM_I2S_RECORD_MASK;
19532 + case SOUND_MIXER_STEREODEVS:
19533 + /* Mixer channels supporting stereo */
19534 + val = WM_I2S_STEREO_MASK;
19537 + case SOUND_MIXER_CAPS:
19538 + val = SOUND_CAP_EXCL_INPUT;
19541 + default: /* read a specific mixer */
19542 + i = _IOC_NR(cmd);
19544 + if (!supported_mixer(i))
19547 + val = wm_i2s_read_mixer(s, i);
19550 + return put_user(val, (int *)arg);
19553 + if (_SIOC_DIR(cmd) == (_SIOC_WRITE|_SIOC_READ)) {
19554 + if (get_user(val, (int *)arg))
19557 + switch (_IOC_NR(cmd)) {
19558 + case SOUND_MIXER_RECSRC:
19559 + /* Arg contains a bit for each recording source */
19560 + if (!WM_I2S_RECORD_MASK)
19564 + if (!(val &= WM_I2S_RECORD_MASK))
19568 + default: /* write a specific mixer */
19569 + i = _IOC_NR(cmd);
19571 + if (!supported_mixer(i))
19574 + wm_i2s_set_mixer(s, i, val);
19583 +au1550_llseek(struct file *file, loff_t offset, int origin)
19588 +static /*const */ struct file_operations au1550_mixer_fops = {
19589 + owner:THIS_MODULE,
19590 + llseek:au1550_llseek,
19591 + ioctl:au1550_ioctl_mixdev,
19592 + open:au1550_open_mixdev,
19593 + release:au1550_release_mixdev,
19598 +codec_init(struct au1550_state *s)
19600 - wrcodec(0x1e, 0x00); /* Reset */
19601 - au1550_delay(200);
19602 - wrcodec(0x0c, 0x00); /* Power up everything */
19603 - au1550_delay(10);
19604 - wrcodec(0x12, 0x00); /* Deactivate codec */
19605 - au1550_delay(10);
19606 - wrcodec(0x08, 0x10); /* Select DAC outputs to line out */
19607 - au1550_delay(10);
19608 - wrcodec(0x0a, 0x00); /* Disable output mute */
19609 - au1550_delay(10);
19610 - wrcodec(0x05, 0x70); /* lower output volume on headphone */
19611 - au1550_delay(10);
19612 - wrcodec(0x0e, 0x02); /* Set slave, 16-bit, I2S modes */
19613 - au1550_delay(10);
19614 - wrcodec(0x10, 0x01); /* 12MHz (USB), 250fs */
19615 - au1550_delay(10);
19616 - wrcodec(0x12, 0x01); /* Activate codec */
19617 - au1550_delay(10);
19618 + wrcodec(WM_REG_RESET, 0x00); /* Reset */
19619 + wrcodec(WM_REG_POWER_DOWN_CTRL, 0x00); /* Power up everything */
19620 + wrcodec(WM_REG_ACTIVE_CTRL, 0x00); /* Deactivate codec */
19621 + wrcodec(WM_REG_ANALOGUE_AUDIO_PATH_CTRL, 0x10); /* Select DAC outputs to line out */
19622 + wrcodec(WM_REG_DIGITAL_AUDIO_PATH_CTRL, 0x00); /* Disable output mute */
19623 + wm_i2s_write_mixer(s, SOUND_MIXER_PCM, 74, 74);
19624 + wrcodec(WM_REG_DIGITAL_AUDIO_IF, 0x02); /* Set slave, 16-bit, I2S modes */
19625 + wrcodec(WM_REG_ACTIVE_CTRL, 0x01); /* Activate codec */
19628 /* stop the ADC before calling */
19629 @@ -256,27 +502,16 @@ static void
19630 set_adc_rate(struct au1550_state *s, unsigned rate)
19632 struct dmabuf *adc = &s->dma_adc;
19633 - struct dmabuf *dac = &s->dma_dac;
19636 - /* calc SRC factor
19638 + #if defined(WM_MODE_USB)
19639 adc->src_factor = (((SAMP_RATE*2) / rate) + 1) >> 1;
19640 adc->sample_rate = SAMP_RATE / adc->src_factor;
19644 + //TODO: Need code for normal mode
19647 adc->src_factor = 1;
19651 - rate = rate > SAMP_RATE ? SAMP_RATE : rate;
19653 - wrcodec(0, 0); /* I don't yet know what to write here if we vra */
19655 - adc->sample_rate = rate;
19656 - dac->sample_rate = rate;
19660 /* stop the DAC before calling */
19661 @@ -284,26 +519,89 @@ static void
19662 set_dac_rate(struct au1550_state *s, unsigned rate)
19664 struct dmabuf *dac = &s->dma_dac;
19665 - struct dmabuf *adc = &s->dma_adc;
19668 - /* calc SRC factor
19670 - dac->src_factor = (((SAMP_RATE*2) / rate) + 1) >> 1;
19671 - dac->sample_rate = SAMP_RATE / dac->src_factor;
19673 + u16 sr, ws, div, bosr, mode;
19674 + volatile psc_i2s_t* ip = (volatile psc_i2s_t *)I2S_PSC_BASE;
19677 + #if defined(CONFIG_MIPS_FICMMP)
19678 + rate = ficmmp_set_i2s_sample_rate(rate);
19684 + sr = WM_SC_SR_96000;
19686 + div = PSC_I2SCFG_DIV2;
19689 + sr = WM_SC_SR_88200;
19691 + div = PSC_I2SCFG_DIV2;
19694 + sr = WM_SC_SR_44100;
19696 + div = PSC_I2SCFG_DIV2;
19699 + sr = WM_SC_SR_48000;
19701 + div = PSC_I2SCFG_DIV2;
19704 + sr = WM_SC_SR_32000;
19706 + div = PSC_I2SCFG_DIV4;
19709 + sr = WM_SC_SR_8018;
19711 + div = PSC_I2SCFG_DIV2;
19715 + sr = WM_SC_SR_8000;
19717 + div = PSC_I2SCFG_DIV16;
19721 + #if defined(WM_MODE_USB)
19722 + mode = WM_SC_MODE_USB;
19724 + mode = WM_SC_MODE_NORMAL;
19729 dac->src_factor = 1;
19730 + dac->sample_rate = rate;
19733 - rate = rate > SAMP_RATE ? SAMP_RATE : rate;
19734 + /* Deactivate codec */
19735 + wrcodec(WM_REG_ACTIVE_CTRL, 0x00);
19737 - wrcodec(0, 0); /* I don't yet know what to write here if we vra */
19738 + /* Disable I2S controller */
19739 + ip->psc_i2scfg &= ~PSC_I2SCFG_DE_ENABLE;
19740 + /* Wait for device disabled */
19741 + while ((ip->psc_i2sstat & PSC_I2SSTAT_DR) == 1);
19743 + cfg = ip->psc_i2scfg;
19744 + /* Clear WS and DIVIDER values */
19745 + cfg &= ~(PSC_I2SCFG_WS_MASK | PSC_I2SCFG_DIV_MASK);
19746 + cfg |= PSC_I2SCFG_WS(ws) | div;
19747 + /* Reconfigure and enable */
19748 + ip->psc_i2scfg = cfg | PSC_I2SCFG_DE_ENABLE;
19750 - adc->sample_rate = rate;
19751 - dac->sample_rate = rate;
19753 + /* Wait for device enabled */
19754 + while ((ip->psc_i2sstat & PSC_I2SSTAT_DR) == 0);
19756 + /* Set appropriate sampling rate */
19757 + wrcodec(WM_REG_SAMPLING_CONTROL, bosr | mode | sr);
19759 + /* Activate codec */
19760 + wrcodec(WM_REG_ACTIVE_CTRL, 0x01);
19764 @@ -354,8 +652,7 @@ stop_adc(struct au1550_state *s)
19765 ip->psc_i2spcr = PSC_I2SPCR_RP;
19768 - /* Wait for Receive Busy to show disabled.
19770 + /* Wait for Receive Busy to show disabled. */
19772 stat = ip->psc_i2sstat;
19774 @@ -463,7 +760,6 @@ prog_dmabuf(struct au1550_state *s, stru
19775 if (db->num_channels == 1)
19776 db->cnt_factor *= 2;
19777 db->cnt_factor *= db->src_factor;
19780 db->dma_qcount = 0;
19781 db->nextIn = db->nextOut = db->rawbuf;
19782 @@ -546,12 +842,13 @@ dac_dma_interrupt(int irq, void *dev_id,
19783 if (i2s_stat & (PSC_I2SSTAT_TF | PSC_I2SSTAT_TR | PSC_I2SSTAT_TF))
19784 dbg("I2S status = 0x%08x", i2s_stat);
19789 if (db->count >= db->fragsize) {
19790 - if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut,
19791 - db->fragsize) == 0) {
19792 - err("qcount < 2 and no ring room!");
19793 + if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut, db->fragsize) == 0)
19795 + err("qcount < MIN_Q_COUNT and no ring room!");
19797 db->nextOut += db->fragsize;
19798 if (db->nextOut >= db->rawbuf + db->dmasize)
19799 @@ -606,65 +903,43 @@ adc_dma_interrupt(int irq, void *dev_id,
19804 -au1550_llseek(struct file *file, loff_t offset, int origin)
19812 -au1550_open_mixdev(struct inode *inode, struct file *file)
19814 - file->private_data = &au1550_state;
19819 -au1550_release_mixdev(struct inode *inode, struct file *file)
19825 -mixdev_ioctl(struct ac97_codec *codec, unsigned int cmd,
19826 - unsigned long arg)
19828 - return codec->mixer_ioctl(codec, cmd, arg);
19832 -au1550_ioctl_mixdev(struct inode *inode, struct file *file,
19833 - unsigned int cmd, unsigned long arg)
19835 - struct au1550_state *s = (struct au1550_state *)file->private_data;
19836 - struct ac97_codec *codec = s->codec;
19838 - return mixdev_ioctl(codec, cmd, arg);
19841 -static /*const */ struct file_operations au1550_mixer_fops = {
19842 - owner:THIS_MODULE,
19843 - llseek:au1550_llseek,
19844 - ioctl:au1550_ioctl_mixdev,
19845 - open:au1550_open_mixdev,
19846 - release:au1550_release_mixdev,
19851 drain_dac(struct au1550_state *s, int nonblock)
19853 unsigned long flags;
19856 + struct dmabuf *db = &s->dma_dac;
19859 if (s->dma_dac.mapped || !s->dma_dac.ready || s->dma_dac.stopped)
19863 spin_lock_irqsave(&s->lock, flags);
19864 - count = s->dma_dac.count;
19865 + count = db->count;
19867 + /* Pad the ddma buffer with zeros if the amount remaining
19868 + * is not a multiple of fragsize */
19869 + if(count % db->fragsize != 0)
19871 + int pad = db->fragsize - (count % db->fragsize);
19872 + char* bufptr = db->nextIn;
19873 + char* bufend = db->rawbuf + db->dmasize;
19875 + if((bufend - bufptr) < pad)
19876 + printk("Error! ddma padding is bigger than available ring space!\n");
19879 + memset((void*)bufptr, 0, pad);
19881 + db->nextIn += pad;
19882 + db->count += pad;
19883 + if (db->dma_qcount == 0)
19885 + db->dma_qcount++;
19888 spin_unlock_irqrestore(&s->lock, flags);
19891 @@ -672,9 +947,9 @@ drain_dac(struct au1550_state *s, int no
19895 - tmo = 1000 * count / (s->no_vra ?
19896 - SAMP_RATE : s->dma_dac.sample_rate);
19897 + tmo = 1000 * count / s->dma_dac.sample_rate;
19898 tmo /= s->dma_dac.dma_bytes_per_sample;
19902 if (signal_pending(current))
19903 @@ -698,8 +973,7 @@ static inline s16 U8_TO_S16(u8 ch)
19904 * If interpolating (no VRA), duplicate every audio frame src_factor times.
19907 -translate_from_user(struct dmabuf *db, char* dmabuf, char* userbuf,
19909 +translate_from_user(struct dmabuf *db, char* dmabuf, char* userbuf, int dmacount)
19912 int interp_bytes_per_sample;
19913 @@ -737,11 +1011,12 @@ translate_from_user(struct dmabuf *db, c
19915 /* duplicate every audio frame src_factor times
19917 - for (i = 0; i < db->src_factor; i++)
19918 + for (i = 0; i < db->src_factor; i++) {
19919 memcpy(dmabuf, dmasample, db->dma_bytes_per_sample);
19920 + dmabuf += interp_bytes_per_sample;
19923 userbuf += db->user_bytes_per_sample;
19924 - dmabuf += interp_bytes_per_sample;
19927 return num_samples * interp_bytes_per_sample;
19928 @@ -996,15 +1271,14 @@ au1550_write(struct file *file, const ch
19929 * on the dma queue. If the queue count reaches zero,
19930 * we know the dma has stopped.
19932 - while ((db->dma_qcount < 2) && (db->count >= db->fragsize)) {
19933 + while ((db->dma_qcount < MIN_Q_COUNT) && (db->count >= db->fragsize)) {
19934 if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut,
19935 db->fragsize) == 0) {
19936 - err("qcount < 2 and no ring room!");
19937 + err("qcount < MIN_Q_COUNT and no ring room!");
19939 db->nextOut += db->fragsize;
19940 if (db->nextOut >= db->rawbuf + db->dmasize)
19941 db->nextOut -= db->dmasize;
19942 - db->count -= db->fragsize;
19943 db->total_bytes += db->dma_fragsize;
19944 if (db->dma_qcount == 0)
19946 @@ -1017,7 +1291,6 @@ au1550_write(struct file *file, const ch
19949 } /* while (count > 0) */
19954 @@ -1371,9 +1644,6 @@ au1550_ioctl(struct inode *inode, struct
19955 s->dma_dac.cnt_factor;
19956 abinfo.fragstotal = s->dma_dac.numfrag;
19957 abinfo.fragments = abinfo.bytes >> s->dma_dac.fragshift;
19958 -#ifdef AU1000_VERBOSE_DEBUG
19959 - dbg("bytes=%d, fragments=%d", abinfo.bytes, abinfo.fragments);
19961 return copy_to_user((void *) arg, &abinfo,
19962 sizeof(abinfo)) ? -EFAULT : 0;
19964 @@ -1536,13 +1806,9 @@ au1550_ioctl(struct inode *inode, struct
19965 case SNDCTL_DSP_SETSYNCRO:
19966 case SOUND_PCM_READ_FILTER:
19972 - return mixdev_ioctl(s->codec, cmd, arg);
19979 @@ -1664,15 +1930,15 @@ static /*const */ struct file_operations
19980 MODULE_AUTHOR("Advanced Micro Devices (AMD), dan@embeddededge.com");
19981 MODULE_DESCRIPTION("Au1550 Audio Driver");
19983 +#if defined(WM_MODE_USB)
19984 /* Set up an internal clock for the PSC3. This will then get
19985 * driven out of the Au1550 as the master.
19990 - uint clk, rate, stat;
19992 - /* Wire up Freq4 as a clock for the PSC3.
19994 + /* Wire up Freq4 as a clock for the PSC.
19995 * We know SMBus uses Freq3.
19996 * By making changes to this rate, plus the word strobe
19997 * size, we can make fine adjustments to the actual data rate.
19998 @@ -1700,11 +1966,17 @@ intclk_setup(void)
20000 clk = au_readl(SYS_CLKSRC);
20002 +#if defined(CONFIG_SOC_AU1550)
20003 clk &= ~0x01f00000;
20005 +#elif defined(CONFIG_SOC_AU1200)
20006 + clk &= ~0x3e000000;
20007 + clk |= (6 << 27);
20009 au_writel(clk, SYS_CLKSRC);
20014 static int __devinit
20016 @@ -1724,6 +1996,11 @@ au1550_probe(void)
20017 init_MUTEX(&s->open_sem);
20018 spin_lock_init(&s->lock);
20020 + /* CPLD Mux for I2s */
20022 +#if defined(CONFIG_MIPS_PB1200)
20023 + bcsr->resets |= BCSR_RESETS_PCS1MUX;
20026 s->psc_addr = (volatile psc_i2s_t *)I2S_PSC_BASE;
20028 @@ -1765,9 +2042,8 @@ au1550_probe(void)
20030 if ((s->dev_audio = register_sound_dsp(&au1550_audio_fops, -1)) < 0)
20033 - if ((s->codec->dev_mixer =
20034 - register_sound_mixer(&au1550_mixer_fops, -1)) < 0)
20036 + if ((s->dev_mixer = register_sound_mixer(&au1550_mixer_fops, -1)) < 0)
20040 @@ -1777,7 +2053,6 @@ au1550_probe(void)
20041 proc_au1550_dump, NULL);
20042 #endif /* AU1550_DEBUG */
20046 /* The GPIO for the appropriate PSC was configured by the
20047 * board specific start up.
20048 @@ -1786,7 +2061,12 @@ au1550_probe(void)
20050 ip->psc_ctrl = PSC_CTRL_DISABLE; /* Disable PSC */
20052 +#if defined(WM_MODE_USB)
20054 ip->psc_sel = (PSC_SEL_CLK_INTCLK | PSC_SEL_PS_I2SMODE);
20056 + ip->psc_sel = (PSC_SEL_CLK_EXTCLK | PSC_SEL_PS_I2SMODE);
20061 @@ -1806,42 +2086,18 @@ au1550_probe(void)
20062 * Actual I2S mode (first bit delayed by one clock).
20063 * Master mode (We provide the clock from the PSC).
20065 - val = PSC_I2SCFG_SET_LEN(16);
20067 - /* This really should be 250, but it appears that all of the
20068 - * PLLs, dividers and so on in the chain shift it. That's the
20069 - * problem with sourceing the clock instead of letting the very
20070 - * stable codec provide it. But, the PSC doesn't appear to want
20071 - * to work in slave mode, so this is what we get. It's not
20072 - * studio quality timing, but it's good enough for listening
20075 - val |= PSC_I2SCFG_SET_WS(252);
20077 - val |= PSC_I2SCFG_SET_WS(250);
20079 - val |= PSC_I2SCFG_RT_FIFO8 | PSC_I2SCFG_TT_FIFO8 | \
20081 + val = PSC_I2SCFG_SET_LEN(16) | PSC_I2SCFG_WS(WS_128FS) | PSC_I2SCFG_RT_FIFO8 | PSC_I2SCFG_TT_FIFO8 | \
20082 PSC_I2SCFG_BI | PSC_I2SCFG_XM;
20084 - ip->psc_i2scfg = val;
20086 - val |= PSC_I2SCFG_DE_ENABLE;
20087 - ip->psc_i2scfg = val;
20089 + ip->psc_i2scfg = val | PSC_I2SCFG_DE_ENABLE;
20091 - /* Wait for Device ready.
20094 - val = ip->psc_i2sstat;
20096 - } while ((val & PSC_I2SSTAT_DR) == 0);
20097 + set_dac_rate(s, 8000); //Set default rate
20099 - val = ip->psc_i2scfg;
20104 + s->no_vra = vra ? 0 : 1;
20108 info("no VRA, interpolating and decimating");
20110 @@ -1866,6 +2122,8 @@ au1550_probe(void)
20112 unregister_sound_dsp(s->dev_audio);
20115 + unregister_sound_dsp(s->dev_audio);
20117 au1xxx_dbdma_chan_free(s->dma_adc.dmanr);
20119 --- a/drivers/sound/au1550_psc.c
20120 +++ b/drivers/sound/au1550_psc.c
20122 * 675 Mass Ave, Cambridge, MA 02139, USA.
20126 #include <linux/version.h>
20127 #include <linux/module.h>
20128 #include <linux/string.h>
20130 #include <asm/db1x00.h>
20133 +#ifdef CONFIG_MIPS_PB1200
20134 +#include <asm/pb1200.h>
20137 +#ifdef CONFIG_MIPS_DB1200
20138 +#include <asm/db1200.h>
20141 #undef OSS_DOCUMENTED_MIXER_SEMANTICS
20143 #define AU1550_MODULE_NAME "Au1550 psc audio"
20144 @@ -521,7 +530,14 @@ stop_adc(struct au1550_state *s)
20145 spin_unlock_irqrestore(&s->lock, flags);
20150 + NOTE: The xmit slots cannot be changed on the fly when in full-duplex
20151 + because the AC'97 block must be stopped/started. When using this driver
20152 + in full-duplex (in & out at the same time), the DMA engine will stop if
20153 + you disable the block.
20154 + TODO: change implementation to properly restart adc/dac after setting
20158 set_xmit_slots(int num_channels)
20160 @@ -565,6 +581,14 @@ set_xmit_slots(int num_channels)
20161 } while ((stat & PSC_AC97STAT_DR) == 0);
20165 + NOTE: The recv slots cannot be changed on the fly when in full-duplex
20166 + because the AC'97 block must be stopped/started. When using this driver
20167 + in full-duplex (in & out at the same time), the DMA engine will stop if
20168 + you disable the block.
20169 + TODO: change implementation to properly restart adc/dac after setting
20173 set_recv_slots(int num_channels)
20175 @@ -608,7 +632,6 @@ start_dac(struct au1550_state *s)
20177 spin_lock_irqsave(&s->lock, flags);
20179 - set_xmit_slots(db->num_channels);
20180 au_writel(PSC_AC97PCR_TC, PSC_AC97PCR);
20182 au_writel(PSC_AC97PCR_TS, PSC_AC97PCR);
20183 @@ -640,7 +663,6 @@ start_adc(struct au1550_state *s)
20184 db->nextIn -= db->dmasize;
20187 - set_recv_slots(db->num_channels);
20188 au1xxx_dbdma_start(db->dmanr);
20189 au_writel(PSC_AC97PCR_RC, PSC_AC97PCR);
20191 @@ -752,12 +774,16 @@ dac_dma_interrupt(int irq, void *dev_id,
20192 if (ac97c_stat & (AC97C_XU | AC97C_XO | AC97C_TE))
20193 dbg("AC97C status = 0x%08x", ac97c_stat);
20195 + /* There is a possiblity that we are getting 1 interrupt for
20196 + multiple descriptors. Use ddma api to find out how many
20201 if (db->count >= db->fragsize) {
20202 if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut,
20203 db->fragsize) == 0) {
20204 - err("qcount < 2 and no ring room!");
20205 + err("qcount < 2 and no ring room1!");
20207 db->nextOut += db->fragsize;
20208 if (db->nextOut >= db->rawbuf + db->dmasize)
20209 @@ -941,11 +967,12 @@ translate_from_user(struct dmabuf *db, c
20211 /* duplicate every audio frame src_factor times
20213 - for (i = 0; i < db->src_factor; i++)
20214 + for (i = 0; i < db->src_factor; i++) {
20215 memcpy(dmabuf, dmasample, db->dma_bytes_per_sample);
20216 + dmabuf += interp_bytes_per_sample;
20219 userbuf += db->user_bytes_per_sample;
20220 - dmabuf += interp_bytes_per_sample;
20223 return num_samples * interp_bytes_per_sample;
20224 @@ -1203,7 +1230,7 @@ au1550_write(struct file *file, const ch
20225 while ((db->dma_qcount < 2) && (db->count >= db->fragsize)) {
20226 if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut,
20227 db->fragsize) == 0) {
20228 - err("qcount < 2 and no ring room!");
20229 + err("qcount < 2 and no ring room!0");
20231 db->nextOut += db->fragsize;
20232 if (db->nextOut >= db->rawbuf + db->dmasize)
20233 @@ -1481,6 +1508,7 @@ au1550_ioctl(struct inode *inode, struct
20236 s->dma_adc.num_channels = val;
20237 + set_recv_slots(val);
20238 if ((ret = prog_dmabuf_adc(s)))
20241 @@ -1538,6 +1566,7 @@ au1550_ioctl(struct inode *inode, struct
20244 s->dma_dac.num_channels = val;
20245 + set_xmit_slots(val);
20246 if ((ret = prog_dmabuf_dac(s)))
20249 @@ -1832,10 +1861,8 @@ au1550_open(struct inode *inode, struct
20250 down(&s->open_sem);
20256 if (file->f_mode & FMODE_READ) {
20258 s->dma_adc.ossfragshift = s->dma_adc.ossmaxfrags =
20259 s->dma_adc.subdivision = s->dma_adc.total_bytes = 0;
20260 s->dma_adc.num_channels = 1;
20261 @@ -1846,6 +1873,7 @@ au1550_open(struct inode *inode, struct
20264 if (file->f_mode & FMODE_WRITE) {
20266 s->dma_dac.ossfragshift = s->dma_dac.ossmaxfrags =
20267 s->dma_dac.subdivision = s->dma_dac.total_bytes = 0;
20268 s->dma_dac.num_channels = 1;
20269 @@ -2091,6 +2119,9 @@ au1550_probe(void)
20270 ac97_read_proc, &s->codec);
20273 + set_xmit_slots(1);
20274 + set_recv_slots(1);
20279 --- a/drivers/sound/Config.in
20280 +++ b/drivers/sound/Config.in
20281 @@ -72,10 +72,15 @@ fi
20282 if [ "$CONFIG_DDB5477" = "y" ]; then
20283 dep_tristate ' NEC Vrc5477 AC97 sound' CONFIG_SOUND_VRC5477 $CONFIG_SOUND
20285 -if [ "$CONFIG_SOC_AU1X00" = "y" -o "$CONFIG_SOC_AU1500" = "y" ]; then
20286 - dep_tristate ' Au1x00 Sound' CONFIG_SOUND_AU1X00 $CONFIG_SOUND
20287 - dep_tristate ' Au1550 PSC Sound' CONFIG_SOUND_AU1550_PSC $CONFIG_SOUND
20288 - dep_tristate ' Au1550 I2S Sound' CONFIG_SOUND_AU1550_I2S $CONFIG_SOUND
20289 +if [ "$CONFIG_SOC_AU1000" = "y" -o \
20290 + "$CONFIG_SOC_AU1500" = "y" -o \
20291 + "$CONFIG_SOC_AU1100" = "y" ]; then
20292 + dep_tristate ' Au1x00 AC97 Sound' CONFIG_SOUND_AU1X00 $CONFIG_SOUND
20294 +if [ "$CONFIG_SOC_AU1550" = "y" -o \
20295 + "$CONFIG_SOC_AU1200" = "y" ]; then
20296 + dep_tristate ' Au1550/Au1200 PSC AC97 Sound' CONFIG_SOUND_AU1550_PSC $CONFIG_SOUND
20297 + dep_tristate ' Au1550/Au1200 PSC I2S Sound' CONFIG_SOUND_AU1550_I2S $CONFIG_SOUND
20300 dep_tristate ' Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core' CONFIG_SOUND_TRIDENT $CONFIG_SOUND $CONFIG_PCI
20301 --- a/drivers/tc/lk201.c
20302 +++ b/drivers/tc/lk201.c
20304 * for more details.
20306 * Copyright (C) 1999-2002 Harald Koerfgen <hkoerfg@web.de>
20307 - * Copyright (C) 2001, 2002, 2003 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
20308 + * Copyright (C) 2001, 2002, 2003, 2004 Maciej W. Rozycki
20311 #include <linux/config.h>
20313 #include <asm/keyboard.h>
20314 #include <asm/dec/tc.h>
20315 #include <asm/dec/machtype.h>
20316 +#include <asm/dec/serial.h>
20322 @@ -55,19 +55,20 @@ unsigned char *kbd_sysrq_xlate = lk201_s
20323 unsigned char kbd_sysrq_key = -1;
20326 -#define KEYB_LINE 3
20327 +#define KEYB_LINE_ZS 3
20328 +#define KEYB_LINE_DZ 0
20330 -static int __init lk201_init(struct dec_serial *);
20331 -static void __init lk201_info(struct dec_serial *);
20332 -static void lk201_kbd_rx_char(unsigned char, unsigned char);
20333 +static int __init lk201_init(void *);
20334 +static void __init lk201_info(void *);
20335 +static void lk201_rx_char(unsigned char, unsigned char);
20337 -struct zs_hook lk201_kbdhook = {
20338 +static struct dec_serial_hook lk201_hook = {
20339 .init_channel = lk201_init,
20340 .init_info = lk201_info,
20342 .poll_rx_char = NULL,
20343 .poll_tx_char = NULL,
20344 - .cflags = B4800 | CS8 | CSTOPB | CLOCAL
20345 + .cflags = B4800 | CS8 | CSTOPB | CLOCAL,
20349 @@ -93,28 +94,28 @@ static unsigned char lk201_reset_string[
20350 LK_CMD_ENB_BELL, LK_PARAM_VOLUME(4),
20353 -static struct dec_serial* lk201kbd_info;
20354 +static void *lk201_handle;
20356 -static int lk201_send(struct dec_serial *info, unsigned char ch)
20357 +static int lk201_send(unsigned char ch)
20359 - if (info->hook->poll_tx_char(info, ch)) {
20360 + if (lk201_hook.poll_tx_char(lk201_handle, ch)) {
20361 printk(KERN_ERR "lk201: transmit timeout\n");
20367 -static inline int lk201_get_id(struct dec_serial *info)
20368 +static inline int lk201_get_id(void)
20370 - return lk201_send(info, LK_CMD_REQ_ID);
20371 + return lk201_send(LK_CMD_REQ_ID);
20374 -static int lk201_reset(struct dec_serial *info)
20375 +static int lk201_reset(void)
20379 for (i = 0; i < sizeof(lk201_reset_string); i++) {
20380 - r = lk201_send(info, lk201_reset_string[i]);
20381 + r = lk201_send(lk201_reset_string[i]);
20385 @@ -203,24 +204,26 @@ static void parse_kbd_rate(struct kbd_re
20387 static int write_kbd_rate(struct kbd_repeat *rep)
20389 - struct dec_serial* info = lk201kbd_info;
20393 delay = rep->delay / 5;
20395 for (i = 0; i < 4; i++) {
20396 - if (info->hook->poll_tx_char(info, LK_CMD_RPT_RATE(i)))
20397 + if (lk201_hook.poll_tx_char(lk201_handle,
20398 + LK_CMD_RPT_RATE(i)))
20400 - if (info->hook->poll_tx_char(info, LK_PARAM_DELAY(delay)))
20401 + if (lk201_hook.poll_tx_char(lk201_handle,
20402 + LK_PARAM_DELAY(delay)))
20404 - if (info->hook->poll_tx_char(info, LK_PARAM_RATE(rate)))
20405 + if (lk201_hook.poll_tx_char(lk201_handle,
20406 + LK_PARAM_RATE(rate)))
20412 -static int lk201kbd_rate(struct kbd_repeat *rep)
20413 +static int lk201_kbd_rate(struct kbd_repeat *rep)
20417 @@ -237,10 +240,8 @@ static int lk201kbd_rate(struct kbd_repe
20421 -static void lk201kd_mksound(unsigned int hz, unsigned int ticks)
20422 +static void lk201_kd_mksound(unsigned int hz, unsigned int ticks)
20424 - struct dec_serial* info = lk201kbd_info;
20429 @@ -253,20 +254,19 @@ static void lk201kd_mksound(unsigned int
20433 - if (info->hook->poll_tx_char(info, LK_CMD_ENB_BELL))
20434 + if (lk201_hook.poll_tx_char(lk201_handle, LK_CMD_ENB_BELL))
20436 - if (info->hook->poll_tx_char(info, LK_PARAM_VOLUME(ticks)))
20437 + if (lk201_hook.poll_tx_char(lk201_handle, LK_PARAM_VOLUME(ticks)))
20439 - if (info->hook->poll_tx_char(info, LK_CMD_BELL))
20440 + if (lk201_hook.poll_tx_char(lk201_handle, LK_CMD_BELL))
20444 void kbd_leds(unsigned char leds)
20446 - struct dec_serial* info = lk201kbd_info;
20447 unsigned char l = 0;
20449 - if (!info) /* FIXME */
20450 + if (!lk201_handle) /* FIXME */
20453 /* FIXME -- Only Hold and Lock LEDs for now. --macro */
20454 @@ -275,13 +275,13 @@ void kbd_leds(unsigned char leds)
20455 if (leds & LED_CAP)
20458 - if (info->hook->poll_tx_char(info, LK_CMD_LEDS_ON))
20459 + if (lk201_hook.poll_tx_char(lk201_handle, LK_CMD_LEDS_ON))
20461 - if (info->hook->poll_tx_char(info, LK_PARAM_LED_MASK(l)))
20462 + if (lk201_hook.poll_tx_char(lk201_handle, LK_PARAM_LED_MASK(l)))
20464 - if (info->hook->poll_tx_char(info, LK_CMD_LEDS_OFF))
20465 + if (lk201_hook.poll_tx_char(lk201_handle, LK_CMD_LEDS_OFF))
20467 - if (info->hook->poll_tx_char(info, LK_PARAM_LED_MASK(~l)))
20468 + if (lk201_hook.poll_tx_char(lk201_handle, LK_PARAM_LED_MASK(~l)))
20472 @@ -307,7 +307,7 @@ char kbd_unexpected_up(unsigned char key
20476 -static void lk201_kbd_rx_char(unsigned char ch, unsigned char stat)
20477 +static void lk201_rx_char(unsigned char ch, unsigned char fl)
20479 static unsigned char id[6];
20481 @@ -316,9 +316,8 @@ static void lk201_kbd_rx_char(unsigned c
20482 static int prev_scancode;
20483 unsigned char c = scancodeRemap[ch];
20485 - if (stat && stat != TTY_OVERRUN) {
20486 - printk(KERN_ERR "lk201: keyboard receive error: 0x%02x\n",
20488 + if (fl != TTY_NORMAL && fl != TTY_OVERRUN) {
20489 + printk(KERN_ERR "lk201: keyboard receive error: 0x%02x\n", fl);
20493 @@ -335,7 +334,7 @@ static void lk201_kbd_rx_char(unsigned c
20494 /* OK, the power-up concluded. */
20496 if (id[2] == LK_STAT_PWRUP_OK)
20497 - lk201_get_id(lk201kbd_info);
20501 printk(KERN_ERR "lk201: keyboard power-up "
20502 @@ -345,7 +344,7 @@ static void lk201_kbd_rx_char(unsigned c
20503 /* We got the ID; report it and start operation. */
20506 - lk201_reset(lk201kbd_info);
20511 @@ -398,29 +397,28 @@ static void lk201_kbd_rx_char(unsigned c
20512 tasklet_schedule(&keyboard_tasklet);
20515 -static void __init lk201_info(struct dec_serial *info)
20516 +static void __init lk201_info(void *handle)
20520 -static int __init lk201_init(struct dec_serial *info)
20521 +static int __init lk201_init(void *handle)
20523 /* First install handlers. */
20524 - lk201kbd_info = info;
20525 - kbd_rate = lk201kbd_rate;
20526 - kd_mksound = lk201kd_mksound;
20527 + lk201_handle = handle;
20528 + kbd_rate = lk201_kbd_rate;
20529 + kd_mksound = lk201_kd_mksound;
20531 - info->hook->rx_char = lk201_kbd_rx_char;
20532 + lk201_hook.rx_char = lk201_rx_char;
20534 /* Then just issue a reset -- the handlers will do the rest. */
20535 - lk201_send(info, LK_CMD_POWER_UP);
20536 + lk201_send(LK_CMD_POWER_UP);
20541 void __init kbd_init_hw(void)
20543 - extern int register_zs_hook(unsigned int, struct zs_hook *);
20544 - extern int unregister_zs_hook(unsigned int);
20547 /* Maxine uses LK501 at the Access.Bus. */
20549 @@ -428,19 +426,15 @@ void __init kbd_init_hw(void)
20551 printk(KERN_INFO "lk201: DECstation LK keyboard driver v0.05.\n");
20553 - if (LK_IFACE_ZS) {
20555 - * kbd_init_hw() is being called before
20556 - * rs_init() so just register the kbd hook
20557 - * and let zs_init do the rest :-)
20559 - if(!register_zs_hook(KEYB_LINE, &lk201_kbdhook))
20560 - unregister_zs_hook(KEYB_LINE);
20563 - * TODO: modify dz.c to allow similar hooks
20564 - * for LK201 handling on DS2100, DS3100, and DS5000/200
20566 - printk(KERN_ERR "lk201: support for DZ11 not yet ready.\n");
20569 + * kbd_init_hw() is being called before
20570 + * rs_init() so just register the kbd hook
20571 + * and let zs_init do the rest :-)
20574 + keyb_line = KEYB_LINE_ZS;
20576 + keyb_line = KEYB_LINE_DZ;
20577 + if (!register_dec_serial_hook(keyb_line, &lk201_hook))
20578 + unregister_dec_serial_hook(keyb_line);
20580 --- a/drivers/tc/zs.c
20581 +++ b/drivers/tc/zs.c
20583 #include <asm/bitops.h>
20584 #include <asm/uaccess.h>
20585 #include <asm/bootinfo.h>
20586 +#include <asm/dec/serial.h>
20588 #ifdef CONFIG_DECSTATION
20589 #include <asm/dec/interrupts.h>
20590 #include <asm/dec/machtype.h>
20591 @@ -160,8 +162,8 @@ struct tty_struct zs_ttys[NUM_CHANNELS];
20592 #ifdef CONFIG_SERIAL_DEC_CONSOLE
20593 static struct console sercons;
20595 -#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) \
20596 - && !defined(MODULE)
20597 +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
20599 static unsigned long break_pressed; /* break, really ... */
20602 @@ -196,7 +198,6 @@ static int serial_refcount;
20606 -#undef SERIAL_DEBUG_INTR
20607 #undef SERIAL_DEBUG_OPEN
20608 #undef SERIAL_DEBUG_FLOW
20609 #undef SERIAL_DEBUG_THROTTLE
20610 @@ -221,10 +222,6 @@ static struct tty_struct *serial_table[N
20611 static struct termios *serial_termios[NUM_CHANNELS];
20612 static struct termios *serial_termios_locked[NUM_CHANNELS];
20615 -#define MIN(a,b) ((a) < (b) ? (a) : (b))
20619 * tmp_buf is used as a temporary buffer by serial_write. We need to
20620 * lock it in case the copy_from_user blocks while swapping in a page,
20621 @@ -386,8 +383,6 @@ static inline void rs_recv_clear(struct
20622 * -----------------------------------------------------------------------
20625 -static int tty_break; /* Set whenever BREAK condition is detected. */
20628 * This routine is used by the interrupt handler to schedule
20629 * processing in the software interrupt portion of the driver.
20630 @@ -414,20 +409,15 @@ static _INLINE_ void receive_chars(struc
20631 if (!tty && (!info->hook || !info->hook->rx_char))
20636 -#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && !defined(MODULE)
20637 - if (info->line == sercons.index) {
20638 - if (!break_pressed) {
20639 - break_pressed = jiffies;
20640 - goto ignore_char;
20642 - break_pressed = 0;
20645 + flag = TTY_NORMAL;
20646 + if (info->tty_break) {
20647 + info->tty_break = 0;
20649 if (info->flags & ZILOG_SAK)
20651 + /* Ignore the null char got when BREAK is removed. */
20655 if (stat & Rx_OVR) {
20656 flag = TTY_OVERRUN;
20657 @@ -435,20 +425,22 @@ static _INLINE_ void receive_chars(struc
20659 } else if (stat & PAR_ERR) {
20665 + if (flag != TTY_NORMAL)
20666 /* reset the error indication */
20667 write_zsreg(info->zs_channel, R0, ERR_RES);
20670 -#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && !defined(MODULE)
20671 +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
20673 if (break_pressed && info->line == sercons.index) {
20675 - time_before(jiffies, break_pressed + HZ*5)) {
20676 + /* Ignore the null char got when BREAK is removed. */
20679 + if (time_before(jiffies, break_pressed + HZ * 5)) {
20680 handle_sysrq(ch, regs, NULL, NULL);
20682 - goto ignore_char;
20687 @@ -459,23 +451,7 @@ static _INLINE_ void receive_chars(struc
20691 - if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
20692 - static int flip_buf_ovf;
20696 - tty->flip.count++;
20698 - static int flip_max_cnt;
20699 - if (flip_max_cnt < tty->flip.count)
20700 - flip_max_cnt = tty->flip.count;
20703 - *tty->flip.flag_buf_ptr++ = flag;
20704 - *tty->flip.char_buf_ptr++ = ch;
20705 -#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && !defined(MODULE)
20708 + tty_insert_flip_char(tty, ch, flag);
20711 tty_flip_buffer_push(tty);
20712 @@ -517,11 +493,15 @@ static _INLINE_ void status_handle(struc
20713 /* Get status from Read Register 0 */
20714 stat = read_zsreg(info->zs_channel, R0);
20716 - if (stat & BRK_ABRT) {
20717 -#ifdef SERIAL_DEBUG_INTR
20718 - printk("handling break....");
20719 + if ((stat & BRK_ABRT) && !(info->read_reg_zero & BRK_ABRT)) {
20720 +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
20722 + if (info->line == sercons.index) {
20723 + if (!break_pressed)
20724 + break_pressed = jiffies;
20728 + info->tty_break = 1;
20731 if (info->zs_channel != info->zs_chan_a) {
20732 @@ -957,7 +937,7 @@ static int rs_write(struct tty_struct *
20736 - c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
20737 + c = min(count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
20738 SERIAL_XMIT_SIZE - info->xmit_head));
20741 @@ -965,7 +945,7 @@ static int rs_write(struct tty_struct *
20743 down(&tmp_buf_sem);
20744 copy_from_user(tmp_buf, buf, c);
20745 - c = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
20746 + c = min(c, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
20747 SERIAL_XMIT_SIZE - info->xmit_head));
20748 memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c);
20750 @@ -1282,46 +1262,48 @@ static int rs_ioctl(struct tty_struct *t
20755 - error = verify_area(VERIFY_WRITE, (void *) arg,
20756 - sizeof(unsigned int));
20759 - return get_modem_info(info, (unsigned int *) arg);
20763 - return set_modem_info(info, cmd, (unsigned int *) arg);
20764 - case TIOCGSERIAL:
20765 - error = verify_area(VERIFY_WRITE, (void *) arg,
20766 - sizeof(struct serial_struct));
20769 - return get_serial_info(info,
20770 - (struct serial_struct *) arg);
20771 - case TIOCSSERIAL:
20772 - return set_serial_info(info,
20773 - (struct serial_struct *) arg);
20774 - case TIOCSERGETLSR: /* Get line status register */
20775 - error = verify_area(VERIFY_WRITE, (void *) arg,
20776 - sizeof(unsigned int));
20780 - return get_lsr_info(info, (unsigned int *) arg);
20782 + error = verify_area(VERIFY_WRITE, (void *)arg,
20783 + sizeof(unsigned int));
20786 + return get_modem_info(info, (unsigned int *)arg);
20788 - case TIOCSERGSTRUCT:
20789 - error = verify_area(VERIFY_WRITE, (void *) arg,
20790 - sizeof(struct dec_serial));
20793 - copy_from_user((struct dec_serial *) arg,
20794 - info, sizeof(struct dec_serial));
20799 + return set_modem_info(info, cmd, (unsigned int *)arg);
20802 - return -ENOIOCTLCMD;
20804 + case TIOCGSERIAL:
20805 + error = verify_area(VERIFY_WRITE, (void *)arg,
20806 + sizeof(struct serial_struct));
20809 + return get_serial_info(info, (struct serial_struct *)arg);
20811 + case TIOCSSERIAL:
20812 + return set_serial_info(info, (struct serial_struct *)arg);
20814 + case TIOCSERGETLSR: /* Get line status register */
20815 + error = verify_area(VERIFY_WRITE, (void *)arg,
20816 + sizeof(unsigned int));
20820 + return get_lsr_info(info, (unsigned int *)arg);
20822 + case TIOCSERGSTRUCT:
20823 + error = verify_area(VERIFY_WRITE, (void *)arg,
20824 + sizeof(struct dec_serial));
20827 + copy_from_user((struct dec_serial *)arg, info,
20828 + sizeof(struct dec_serial));
20832 + return -ENOIOCTLCMD;
20837 @@ -1446,7 +1428,8 @@ static void rs_close(struct tty_struct *
20838 static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
20840 struct dec_serial *info = (struct dec_serial *) tty->driver_data;
20841 - unsigned long orig_jiffies, char_time;
20842 + unsigned long orig_jiffies;
20845 if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent"))
20847 @@ -1462,7 +1445,7 @@ static void rs_wait_until_sent(struct tt
20848 if (char_time == 0)
20851 - char_time = MIN(char_time, timeout);
20852 + char_time = min(char_time, timeout);
20853 while ((read_zsreg(info->zs_channel, 1) & Tx_BUF_EMP) == 0) {
20854 current->state = TASK_INTERRUPTIBLE;
20855 schedule_timeout(char_time);
20856 @@ -1714,7 +1697,7 @@ int rs_open(struct tty_struct *tty, stru
20858 static void __init show_serial_version(void)
20860 - printk("DECstation Z8530 serial driver version 0.08\n");
20861 + printk("DECstation Z8530 serial driver version 0.09\n");
20864 /* Initialize Z8530s zs_channels
20865 @@ -1994,8 +1977,9 @@ int __init zs_init(void)
20866 * polling I/O routines
20869 -zs_poll_tx_char(struct dec_serial *info, unsigned char ch)
20870 +zs_poll_tx_char(void *handle, unsigned char ch)
20872 + struct dec_serial *info = handle;
20873 struct dec_zschannel *chan = info->zs_channel;
20876 @@ -2017,8 +2001,9 @@ zs_poll_tx_char(struct dec_serial *info,
20880 -zs_poll_rx_char(struct dec_serial *info)
20881 +zs_poll_rx_char(void *handle)
20883 + struct dec_serial *info = handle;
20884 struct dec_zschannel *chan = info->zs_channel;
20887 @@ -2038,12 +2023,13 @@ zs_poll_rx_char(struct dec_serial *info)
20891 -unsigned int register_zs_hook(unsigned int channel, struct zs_hook *hook)
20892 +int register_zs_hook(unsigned int channel, struct dec_serial_hook *hook)
20894 struct dec_serial *info = &zs_soft[channel];
20897 - printk(__FUNCTION__": line %d has already a hook registered\n", channel);
20898 + printk("%s: line %d has already a hook registered\n",
20899 + __FUNCTION__, channel);
20903 @@ -2055,7 +2041,7 @@ unsigned int register_zs_hook(unsigned i
20907 -unsigned int unregister_zs_hook(unsigned int channel)
20908 +int unregister_zs_hook(unsigned int channel)
20910 struct dec_serial *info = &zs_soft[channel];
20912 @@ -2063,8 +2049,8 @@ unsigned int unregister_zs_hook(unsigned
20916 - printk(__FUNCTION__": trying to unregister hook on line %d,"
20917 - " but none is registered\n", channel);
20918 + printk("%s: trying to unregister hook on line %d,"
20919 + " but none is registered\n", __FUNCTION__, channel);
20923 @@ -2319,22 +2305,23 @@ void kgdb_interruptible(int yes)
20924 write_zsreg(chan, 9, nine);
20927 -static int kgdbhook_init_channel(struct dec_serial* info)
20928 +static int kgdbhook_init_channel(void *handle)
20933 -static void kgdbhook_init_info(struct dec_serial* info)
20934 +static void kgdbhook_init_info(void *handle)
20938 -static void kgdbhook_rx_char(struct dec_serial* info,
20939 - unsigned char ch, unsigned char stat)
20940 +static void kgdbhook_rx_char(void *handle, unsigned char ch, unsigned char fl)
20942 + struct dec_serial *info = handle;
20944 + if (fl != TTY_NORMAL)
20946 if (ch == 0x03 || ch == '$')
20948 - if (stat & (Rx_OVR|FRM_ERR|PAR_ERR))
20949 - write_zsreg(info->zs_channel, 0, ERR_RES);
20952 /* This sets up the serial port we're using, and turns on
20953 @@ -2360,11 +2347,11 @@ static inline void kgdb_chaninit(struct
20954 * for /dev/ttyb which is determined in setup_arch() from the
20955 * boot command line flags.
20957 -struct zs_hook zs_kgdbhook = {
20958 - init_channel : kgdbhook_init_channel,
20959 - init_info : kgdbhook_init_info,
20960 - cflags : B38400|CS8|CLOCAL,
20961 - rx_char : kgdbhook_rx_char,
20962 +struct dec_serial_hook zs_kgdbhook = {
20963 + .init_channel = kgdbhook_init_channel,
20964 + .init_info = kgdbhook_init_info,
20965 + .rx_char = kgdbhook_rx_char,
20966 + .cflags = B38400 | CS8 | CLOCAL,
20969 void __init zs_kgdb_hook(int tty_num)
20970 --- a/drivers/tc/zs.h
20971 +++ b/drivers/tc/zs.h
20974 - * macserial.h: Definitions for the Macintosh Z8530 serial driver.
20975 + * drivers/tc/zs.h: Definitions for the DECstation Z85C30 serial driver.
20977 * Adapted from drivers/sbus/char/sunserial.h by Paul Mackerras.
20978 + * Adapted from drivers/macintosh/macserial.h by Harald Koerfgen.
20980 * Copyright (C) 1996 Paul Mackerras (Paul.Mackerras@cs.anu.edu.au)
20981 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
20982 + * Copyright (C) 2004 Maciej W. Rozycki
20984 #ifndef _DECSERIAL_H
20985 #define _DECSERIAL_H
20987 +#include <asm/dec/serial.h>
20989 #define NUM_ZSREGS 16
20991 struct serial_struct {
20992 @@ -89,63 +93,50 @@ struct dec_zschannel {
20993 unsigned char curregs[NUM_ZSREGS];
20996 -struct dec_serial;
20999 - int (*init_channel)(struct dec_serial* info);
21000 - void (*init_info)(struct dec_serial* info);
21001 - void (*rx_char)(unsigned char ch, unsigned char stat);
21002 - int (*poll_rx_char)(struct dec_serial* info);
21003 - int (*poll_tx_char)(struct dec_serial* info,
21004 - unsigned char ch);
21008 struct dec_serial {
21009 - struct dec_serial *zs_next; /* For IRQ servicing chain */
21010 - struct dec_zschannel *zs_channel; /* Channel registers */
21011 - struct dec_zschannel *zs_chan_a; /* A side registers */
21012 - unsigned char read_reg_zero;
21014 - char soft_carrier; /* Use soft carrier on this channel */
21015 - char break_abort; /* Is serial console in, so process brk/abrt */
21016 - struct zs_hook *hook; /* Hook on this channel */
21017 - char is_cons; /* Is this our console. */
21018 - unsigned char tx_active; /* character is being xmitted */
21019 - unsigned char tx_stopped; /* output is suspended */
21021 - /* We need to know the current clock divisor
21022 - * to read the bps rate the chip has currently
21024 + struct dec_serial *zs_next; /* For IRQ servicing chain. */
21025 + struct dec_zschannel *zs_channel; /* Channel registers. */
21026 + struct dec_zschannel *zs_chan_a; /* A side registers. */
21027 + unsigned char read_reg_zero;
21029 + struct dec_serial_hook *hook; /* Hook on this channel. */
21030 + int tty_break; /* Set on BREAK condition. */
21031 + int is_cons; /* Is this our console. */
21032 + int tx_active; /* Char is being xmitted. */
21033 + int tx_stopped; /* Output is suspended. */
21036 + * We need to know the current clock divisor
21037 + * to read the bps rate the chip has currently loaded.
21039 - unsigned char clk_divisor; /* May be 1, 16, 32, or 64 */
21041 + int clk_divisor; /* May be 1, 16, 32, or 64. */
21044 - char change_needed;
21045 + char change_needed;
21051 - int flags; /* defined in tty.h */
21052 - int type; /* UART type */
21053 + int flags; /* Defined in tty.h. */
21054 + int type; /* UART type. */
21055 struct tty_struct *tty;
21056 int read_status_mask;
21057 int ignore_status_mask;
21059 int xmit_fifo_size;
21060 int custom_divisor;
21061 - int x_char; /* xon/xoff character */
21062 + int x_char; /* XON/XOFF character. */
21064 unsigned short closing_wait;
21065 unsigned short closing_wait2;
21066 unsigned long event;
21067 unsigned long last_active;
21069 - int count; /* # of fd on device */
21070 - int blocked_open; /* # of blocked opens */
21071 - long session; /* Session of opening process */
21072 - long pgrp; /* pgrp of opening process */
21073 + int count; /* # of fds on device. */
21074 + int blocked_open; /* # of blocked opens. */
21075 + long session; /* Sess of opening process. */
21076 + long pgrp; /* Pgrp of opening process. */
21077 unsigned char *xmit_buf;
21081 +++ b/drivers/video/au1200fb.c
21084 + * BRIEF MODULE DESCRIPTION
21085 + * Au1200 LCD Driver.
21087 + * Copyright 2004 AMD
21091 + * linux/drivers/video/skeletonfb.c -- Skeleton for a frame buffer device
21092 + * Created 28 Dec 1997 by Geert Uytterhoeven
21094 + * This program is free software; you can redistribute it and/or modify it
21095 + * under the terms of the GNU General Public License as published by the
21096 + * Free Software Foundation; either version 2 of the License, or (at your
21097 + * option) any later version.
21099 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
21100 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21101 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
21102 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21103 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21104 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
21105 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21106 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21107 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21108 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21110 + * You should have received a copy of the GNU General Public License along
21111 + * with this program; if not, write to the Free Software Foundation, Inc.,
21112 + * 675 Mass Ave, Cambridge, MA 02139, USA.
21115 +#include <linux/module.h>
21116 +#include <linux/kernel.h>
21117 +#include <linux/errno.h>
21118 +#include <linux/string.h>
21119 +#include <linux/mm.h>
21120 +#include <linux/tty.h>
21121 +#include <linux/slab.h>
21122 +#include <linux/delay.h>
21123 +#include <linux/fb.h>
21124 +#include <linux/init.h>
21125 +#include <asm/uaccess.h>
21127 +#include <asm/au1000.h>
21128 +#include <asm/au1xxx_gpio.h>
21129 +#include "au1200fb.h"
21131 +#include <video/fbcon.h>
21132 +#include <video/fbcon-cfb16.h>
21133 +#include <video/fbcon-cfb32.h>
21134 +#define CMAPSIZE 16
21136 +#define AU1200_LCD_GET_WINENABLE 1
21137 +#define AU1200_LCD_SET_WINENABLE 2
21138 +#define AU1200_LCD_GET_WINLOCATION 3
21139 +#define AU1200_LCD_SET_WINLOCATION 4
21140 +#define AU1200_LCD_GET_WINSIZE 5
21141 +#define AU1200_LCD_SET_WINSIZE 6
21142 +#define AU1200_LCD_GET_BACKCOLOR 7
21143 +#define AU1200_LCD_SET_BACKCOLOR 8
21144 +#define AU1200_LCD_GET_COLORKEY 9
21145 +#define AU1200_LCD_SET_COLORKEY 10
21146 +#define AU1200_LCD_GET_PANEL 11
21147 +#define AU1200_LCD_SET_PANEL 12
21149 +typedef struct au1200_lcd_getset_t
21151 + unsigned int subcmd;
21163 + unsigned int color;
21166 + unsigned int key;
21167 + unsigned int mask;
21174 +} au1200_lcd_getset_t;
21176 +AU1200_LCD *lcd = (AU1200_LCD *)AU1200_LCD_ADDR;
21177 +static int window_index = 0; /* default is zero */
21178 +static int panel_index = -1; /* default is call board_au1200fb_panel */
21180 +struct window_settings
21182 + unsigned char name[64];
21183 + uint32 mode_backcolor;
21184 + uint32 mode_colorkey;
21185 + uint32 mode_colorkeymsk;
21192 + uint32 mode_winctrl1; /* winctrl1[FRM,CCO,PO,PIPE] */
21193 + uint32 mode_winenable;
21197 +struct panel_settings
21199 + unsigned char name[64];
21200 + /* panel physical dimensions */
21203 + /* panel timings */
21204 + uint32 mode_screen;
21205 + uint32 mode_horztiming;
21206 + uint32 mode_verttiming;
21207 + uint32 mode_clkcontrol;
21208 + uint32 mode_pwmdiv;
21209 + uint32 mode_pwmhi;
21210 + uint32 mode_outmask;
21211 + uint32 mode_fifoctrl;
21212 + uint32 mode_toyclksrc;
21213 + uint32 mode_backlight;
21214 + uint32 mode_auxpll;
21215 + int (*device_init)(void);
21216 + int (*device_shutdown)(void);
21219 +#if defined(__BIG_ENDIAN)
21220 +#define LCD_WINCTRL1_PO_16BPP LCD_WINCTRL1_PO_00
21222 +#define LCD_WINCTRL1_PO_16BPP LCD_WINCTRL1_PO_01
21225 +extern int board_au1200fb_panel (void);
21226 +extern int board_au1200fb_panel_init (void);
21227 +extern int board_au1200fb_panel_shutdown (void);
21229 +#if defined(CONFIG_FOCUS_ENHANCEMENTS)
21230 +extern int board_au1200fb_focus_init_hdtv(void);
21231 +extern int board_au1200fb_focus_init_component(void);
21232 +extern int board_au1200fb_focus_init_cvsv(void);
21233 +extern int board_au1200fb_focus_shutdown(void);
21237 + * Default window configurations
21239 +static struct window_settings windows[] =
21242 + "0-FS gfx, 1-video, 2-ovly gfx, 3-ovly gfx",
21243 + /* mode_backcolor */ 0x006600ff,
21244 + /* mode_colorkey,msk*/ 0, 0,
21247 + /* xres, yres, xpos, ypos */ 0, 0, 0, 0,
21248 + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP,
21249 + /* mode_winenable*/ LCD_WINENABLE_WEN0,
21252 + /* xres, yres, xpos, ypos */ 0, 0, 0, 0,
21253 + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP,
21254 + /* mode_winenable*/ 0,
21257 + /* xres, yres, xpos, ypos */ 0, 0, 0, 0,
21258 + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP|LCD_WINCTRL1_PIPE,
21259 + /* mode_winenable*/ 0,
21262 + /* xres, yres, xpos, ypos */ 0, 0, 0, 0,
21263 + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP|LCD_WINCTRL1_PIPE,
21264 + /* mode_winenable*/ 0,
21270 + "0-FS gfx, 1-video, 2-ovly gfx, 3-ovly gfx",
21271 + /* mode_backcolor */ 0x006600ff,
21272 + /* mode_colorkey,msk*/ 0, 0,
21275 + /* xres, yres, xpos, ypos */ 320, 240, 5, 5,
21277 + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP,
21279 + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_24BPP|LCD_WINCTRL1_PO_00,
21280 + /* mode_winenable*/ LCD_WINENABLE_WEN0,
21283 + /* xres, yres, xpos, ypos */ 0, 0, 0, 0,
21284 + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP,
21285 + /* mode_winenable*/ 0,
21288 + /* xres, yres, xpos, ypos */ 100, 100, 0, 0,
21289 + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP|LCD_WINCTRL1_PIPE,
21290 + /* mode_winenable*/ 0/*LCD_WINENABLE_WEN2*/,
21293 + /* xres, yres, xpos, ypos */ 200, 25, 0, 0,
21294 + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP|LCD_WINCTRL1_PIPE,
21295 + /* mode_winenable*/ 0,
21299 + /* Need VGA 640 @ 24bpp, @ 32bpp */
21300 + /* Need VGA 800 @ 24bpp, @ 32bpp */
21301 + /* Need VGA 1024 @ 24bpp, @ 32bpp */
21305 + * Controller configurations for various panels.
21307 +static struct panel_settings panels[] =
21309 + { /* Index 0: QVGA 320x240 H:33.3kHz V:110Hz */
21312 + /* mode_screen */ LCD_SCREEN_SX_N(320) | LCD_SCREEN_SY_N(240),
21313 + /* mode_horztiming */ 0x00c4623b,
21314 + /* mode_verttiming */ 0x00502814,
21315 + /* mode_clkcontrol */ 0x00020002, /* /4=24Mhz */
21316 + /* mode_pwmdiv */ 0x00000000,
21317 + /* mode_pwmhi */ 0x00000000,
21318 + /* mode_outmask */ 0x00FFFFFF,
21319 + /* mode_fifoctrl */ 0x2f2f2f2f,
21320 + /* mode_toyclksrc */ 0x00000004, /* 96MHz AUXPLL directly */
21321 + /* mode_backlight */ 0x00000000,
21322 + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
21323 + /* device_init */ NULL,
21324 + /* device_shutdown */ NULL,
21327 + { /* Index 1: VGA 640x480 H:30.3kHz V:58Hz */
21330 + /* mode_screen */ 0x13f9df80,
21331 + /* mode_horztiming */ 0x003c5859,
21332 + /* mode_verttiming */ 0x00741201,
21333 + /* mode_clkcontrol */ 0x00020001, /* /4=24Mhz */
21334 + /* mode_pwmdiv */ 0x00000000,
21335 + /* mode_pwmhi */ 0x00000000,
21336 + /* mode_outmask */ 0x00FFFFFF,
21337 + /* mode_fifoctrl */ 0x2f2f2f2f,
21338 + /* mode_toyclksrc */ 0x00000004, /* AUXPLL directly */
21339 + /* mode_backlight */ 0x00000000,
21340 + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
21341 + /* device_init */ NULL,
21342 + /* device_shutdown */ NULL,
21345 + { /* Index 2: SVGA 800x600 H:46.1kHz V:69Hz */
21348 + /* mode_screen */ 0x18fa5780,
21349 + /* mode_horztiming */ 0x00dc7e77,
21350 + /* mode_verttiming */ 0x00584805,
21351 + /* mode_clkcontrol */ 0x00020000, /* /2=48Mhz */
21352 + /* mode_pwmdiv */ 0x00000000,
21353 + /* mode_pwmhi */ 0x00000000,
21354 + /* mode_outmask */ 0x00FFFFFF,
21355 + /* mode_fifoctrl */ 0x2f2f2f2f,
21356 + /* mode_toyclksrc */ 0x00000004, /* AUXPLL directly */
21357 + /* mode_backlight */ 0x00000000,
21358 + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
21359 + /* device_init */ NULL,
21360 + /* device_shutdown */ NULL,
21363 + { /* Index 3: XVGA 1024x768 H:56.2kHz V:70Hz */
21366 + /* mode_screen */ 0x1ffaff80,
21367 + /* mode_horztiming */ 0x007d0e57,
21368 + /* mode_verttiming */ 0x00740a01,
21369 + /* mode_clkcontrol */ 0x000A0000, /* /1 */
21370 + /* mode_pwmdiv */ 0x00000000,
21371 + /* mode_pwmhi */ 0x00000000,
21372 + /* mode_outmask */ 0x00FFFFFF,
21373 + /* mode_fifoctrl */ 0x2f2f2f2f,
21374 + /* mode_toyclksrc */ 0x00000004, /* AUXPLL directly */
21375 + /* mode_backlight */ 0x00000000,
21376 + /* mode_auxpll */ 6, /* 72MHz AUXPLL */
21377 + /* device_init */ NULL,
21378 + /* device_shutdown */ NULL,
21381 + { /* Index 4: XVGA 1280x1024 H:68.5kHz V:65Hz */
21382 + "XVGA_1280x1024",
21384 + /* mode_screen */ 0x27fbff80,
21385 + /* mode_horztiming */ 0x00cdb2c7,
21386 + /* mode_verttiming */ 0x00600002,
21387 + /* mode_clkcontrol */ 0x000A0000, /* /1 */
21388 + /* mode_pwmdiv */ 0x00000000,
21389 + /* mode_pwmhi */ 0x00000000,
21390 + /* mode_outmask */ 0x00FFFFFF,
21391 + /* mode_fifoctrl */ 0x2f2f2f2f,
21392 + /* mode_toyclksrc */ 0x00000004, /* AUXPLL directly */
21393 + /* mode_backlight */ 0x00000000,
21394 + /* mode_auxpll */ 10, /* 120MHz AUXPLL */
21395 + /* device_init */ NULL,
21396 + /* device_shutdown */ NULL,
21399 + { /* Index 5: Samsung 1024x768 TFT */
21400 + "Samsung_1024x768_TFT",
21402 + /* mode_screen */ 0x1ffaff80,
21403 + /* mode_horztiming */ 0x018cc677,
21404 + /* mode_verttiming */ 0x00241217,
21405 + /* mode_clkcontrol */ 0x00000000, /* SCB 0x1 /4=24Mhz */
21406 + /* mode_pwmdiv */ 0x8000063f, /* SCB 0x0 */
21407 + /* mode_pwmhi */ 0x03400000, /* SCB 0x0 */
21408 + /* mode_outmask */ 0x00fcfcfc,
21409 + /* mode_fifoctrl */ 0x2f2f2f2f,
21410 + /* mode_toyclksrc */ 0x00000004, /* 96MHz AUXPLL directly */
21411 + /* mode_backlight */ 0x00000000,
21412 + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
21413 + /* device_init */ board_au1200fb_panel_init,
21414 + /* device_shutdown */ board_au1200fb_panel_shutdown,
21417 + { /* Index 6: Toshiba 640x480 TFT */
21418 + "Toshiba_640x480_TFT",
21420 + /* mode_screen */ LCD_SCREEN_SX_N(640) | LCD_SCREEN_SY_N(480),
21421 + /* mode_horztiming */ LCD_HORZTIMING_HPW_N(96) | LCD_HORZTIMING_HND1_N(13) | LCD_HORZTIMING_HND2_N(51),
21422 + /* mode_verttiming */ LCD_VERTTIMING_VPW_N(2) | LCD_VERTTIMING_VND1_N(11) | LCD_VERTTIMING_VND2_N(32) ,
21423 + /* mode_clkcontrol */ 0x00000000, /* /4=24Mhz */
21424 + /* mode_pwmdiv */ 0x8000063f,
21425 + /* mode_pwmhi */ 0x03400000,
21426 + /* mode_outmask */ 0x00fcfcfc,
21427 + /* mode_fifoctrl */ 0x2f2f2f2f,
21428 + /* mode_toyclksrc */ 0x00000004, /* 96MHz AUXPLL directly */
21429 + /* mode_backlight */ 0x00000000,
21430 + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
21431 + /* device_init */ board_au1200fb_panel_init,
21432 + /* device_shutdown */ board_au1200fb_panel_shutdown,
21435 + { /* Index 7: Sharp 320x240 TFT */
21436 + "Sharp_320x240_TFT",
21438 + /* mode_screen */ LCD_SCREEN_SX_N(320) | LCD_SCREEN_SY_N(240),
21439 + /* mode_horztiming */ LCD_HORZTIMING_HPW_N(60) | LCD_HORZTIMING_HND1_N(13) | LCD_HORZTIMING_HND2_N(2),
21440 + /* mode_verttiming */ LCD_VERTTIMING_VPW_N(2) | LCD_VERTTIMING_VND1_N(2) | LCD_VERTTIMING_VND2_N(5) ,
21441 + /* mode_clkcontrol */ LCD_CLKCONTROL_PCD_N(7), /* /16=6Mhz */
21442 + /* mode_pwmdiv */ 0x8000063f,
21443 + /* mode_pwmhi */ 0x03400000,
21444 + /* mode_outmask */ 0x00fcfcfc,
21445 + /* mode_fifoctrl */ 0x2f2f2f2f,
21446 + /* mode_toyclksrc */ 0x00000004, /* 96MHz AUXPLL directly */
21447 + /* mode_backlight */ 0x00000000,
21448 + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
21449 + /* device_init */ board_au1200fb_panel_init,
21450 + /* device_shutdown */ board_au1200fb_panel_shutdown,
21452 + { /* Index 8: Toppoly TD070WGCB2 7" 854x480 TFT */
21453 + "Toppoly_TD070WGCB2",
21455 + /* mode_screen */ LCD_SCREEN_SX_N(854) | LCD_SCREEN_SY_N(480),
21456 + /* mode_horztiming */ LCD_HORZTIMING_HND2_N(44) | LCD_HORZTIMING_HND1_N(44) | LCD_HORZTIMING_HPW_N(114),
21457 + /* mode_verttiming */ LCD_VERTTIMING_VND2_N(20) | LCD_VERTTIMING_VND1_N(21) | LCD_VERTTIMING_VPW_N(4),
21458 + /* mode_clkcontrol */ 0x00020001, /* /4=24Mhz */
21459 + /* mode_pwmdiv */ 0x8000063f,
21460 + /* mode_pwmhi */ 0x03400000,
21461 + /* mode_outmask */ 0x00FCFCFC,
21462 + /* mode_fifoctrl */ 0x2f2f2f2f,
21463 + /* mode_toyclksrc */ 0x00000004, /* AUXPLL directly */
21464 + /* mode_backlight */ 0x00000000,
21465 + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
21466 + /* device_init */ board_au1200fb_panel_init,
21467 + /* device_shutdown */ board_au1200fb_panel_shutdown,
21469 +#if defined(CONFIG_FOCUS_ENHANCEMENTS)
21470 + { /* Index 9: Focus FS453 TV-Out 640x480 */
21471 + "FS453_640x480 (Composite/S-Video)",
21473 + /* mode_screen */ LCD_SCREEN_SX_N(640) | LCD_SCREEN_SY_N(480),
21474 + /* mode_horztiming */ LCD_HORZTIMING_HND2_N(143) | LCD_HORZTIMING_HND1_N(143) | LCD_HORZTIMING_HPW_N(10),
21475 + /* mode_verttiming */ LCD_VERTTIMING_VND2_N(30) | LCD_VERTTIMING_VND1_N(30) | LCD_VERTTIMING_VPW_N(5),
21476 + /* mode_clkcontrol */ 0x00480000 | (1<<17) | (1<<18), /* External Clock, 1:1 clock ratio */
21477 + /* mode_pwmdiv */ 0x00000000,
21478 + /* mode_pwmhi */ 0x00000000,
21479 + /* mode_outmask */ 0x00FFFFFF,
21480 + /* mode_fifoctrl */ 0x2f2f2f2f,
21481 + /* mode_toyclksrc */ 0x00000000,
21482 + /* mode_backlight */ 0x00000000,
21483 + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
21484 + /* device_init */ board_au1200fb_focus_init_cvsv,
21485 + /* device_shutdown */ board_au1200fb_focus_shutdown,
21488 + { /* Index 10: Focus FS453 TV-Out 640x480 */
21489 + "FS453_640x480 (Component Video)",
21491 + /* mode_screen */ LCD_SCREEN_SX_N(640) | LCD_SCREEN_SY_N(480),
21492 + /* mode_horztiming */ LCD_HORZTIMING_HND2_N(143) | LCD_HORZTIMING_HND1_N(143) | LCD_HORZTIMING_HPW_N(10),
21493 + /* mode_verttiming */ LCD_VERTTIMING_VND2_N(30) | LCD_VERTTIMING_VND1_N(30) | LCD_VERTTIMING_VPW_N(5),
21494 + /* mode_clkcontrol */ 0x00480000 | (1<<17) | (1<<18), /* External Clock, 1:1 clock ratio */
21495 + /* mode_pwmdiv */ 0x00000000,
21496 + /* mode_pwmhi */ 0x00000000,
21497 + /* mode_outmask */ 0x00FFFFFF,
21498 + /* mode_fifoctrl */ 0x2f2f2f2f,
21499 + /* mode_toyclksrc */ 0x00000000,
21500 + /* mode_backlight */ 0x00000000,
21501 + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
21502 + /* device_init */ board_au1200fb_focus_init_component,
21503 + /* device_shutdown */ board_au1200fb_focus_shutdown,
21506 + { /* Index 11: Focus FS453 TV-Out 640x480 */
21507 + "FS453_640x480 (HDTV)",
21509 + /* mode_screen */ LCD_SCREEN_SX_N(720) | LCD_SCREEN_SY_N(480),
21510 + /* mode_horztiming */ LCD_HORZTIMING_HND2_N(28) | LCD_HORZTIMING_HND1_N(46) | LCD_HORZTIMING_HPW_N(64),
21511 + /* mode_verttiming */ LCD_VERTTIMING_VND2_N(7) | LCD_VERTTIMING_VND1_N(31) | LCD_VERTTIMING_VPW_N(7),
21512 + /* mode_clkcontrol */ 0x00480000 | (1<<17) | (1<<18), /* External Clock, 1:1 clock ratio */
21513 + /* mode_pwmdiv */ 0x00000000,
21514 + /* mode_pwmhi */ 0x00000000,
21515 + /* mode_outmask */ 0x00FFFFFF,
21516 + /* mode_fifoctrl */ 0x2f2f2f2f,
21517 + /* mode_toyclksrc */ 0x00000000,
21518 + /* mode_backlight */ 0x00000000,
21519 + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
21520 + /* device_init */ board_au1200fb_focus_init_hdtv,
21521 + /* device_shutdown */ board_au1200fb_focus_shutdown,
21526 +#define NUM_PANELS (sizeof(panels) / sizeof(struct panel_settings))
21528 +static struct window_settings *win;
21529 +static struct panel_settings *panel;
21531 +struct au1200fb_info {
21532 + struct fb_info_gen gen;
21533 + unsigned long fb_virt_start;
21534 + unsigned long fb_size;
21535 + unsigned long fb_phys;
21540 + struct { unsigned red, green, blue, pad; } palette[256];
21542 +#if defined(FBCON_HAS_CFB16)
21543 + u16 fbcon_cmap16[16];
21545 +#if defined(FBCON_HAS_CFB32)
21546 + u32 fbcon_cmap32[16];
21551 +struct au1200fb_par {
21552 + struct fb_var_screeninfo var;
21554 + int line_length; /* in bytes */
21555 + int cmap_len; /* color-map length */
21558 +#ifndef CONFIG_FB_AU1200_DEVS
21559 +#define CONFIG_FB_AU1200_DEVS 1
21562 +static struct au1200fb_info fb_infos[CONFIG_FB_AU1200_DEVS];
21563 +static struct au1200fb_par fb_pars[CONFIG_FB_AU1200_DEVS];
21564 +static struct display disps[CONFIG_FB_AU1200_DEVS];
21566 +int au1200fb_init(void);
21567 +void au1200fb_setup(char *options, int *ints);
21568 +static int au1200fb_mmap(struct fb_info *fb, struct file *file,
21569 + struct vm_area_struct *vma);
21570 +static int au1200_blank(int blank_mode, struct fb_info_gen *info);
21571 +static int au1200fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
21572 + u_long arg, int con, struct fb_info *info);
21574 +void au1200_nocursor(struct display *p, int mode, int xx, int yy){};
21576 +static int au1200_setlocation (int plane, int xpos, int ypos);
21577 +static int au1200_setsize (int plane, int xres, int yres);
21578 +static void au1200_setmode(int plane);
21579 +static void au1200_setpanel (struct panel_settings *newpanel);
21581 +static struct fb_ops au1200fb_ops = {
21582 + owner: THIS_MODULE,
21583 + fb_get_fix: fbgen_get_fix,
21584 + fb_get_var: fbgen_get_var,
21585 + fb_set_var: fbgen_set_var,
21586 + fb_get_cmap: fbgen_get_cmap,
21587 + fb_set_cmap: fbgen_set_cmap,
21588 + fb_pan_display: fbgen_pan_display,
21589 + fb_ioctl: au1200fb_ioctl,
21590 + fb_mmap: au1200fb_mmap,
21595 +winbpp (unsigned int winctrl1)
21597 + /* how many bytes of memory are needed for each pixel format */
21598 + switch (winctrl1 & LCD_WINCTRL1_FRM)
21600 + case LCD_WINCTRL1_FRM_1BPP: return 1; break;
21601 + case LCD_WINCTRL1_FRM_2BPP: return 2; break;
21602 + case LCD_WINCTRL1_FRM_4BPP: return 4; break;
21603 + case LCD_WINCTRL1_FRM_8BPP: return 8; break;
21604 + case LCD_WINCTRL1_FRM_12BPP: return 16; break;
21605 + case LCD_WINCTRL1_FRM_16BPP655: return 16; break;
21606 + case LCD_WINCTRL1_FRM_16BPP565: return 16; break;
21607 + case LCD_WINCTRL1_FRM_16BPP556: return 16; break;
21608 + case LCD_WINCTRL1_FRM_16BPPI1555: return 16; break;
21609 + case LCD_WINCTRL1_FRM_16BPPI5551: return 16; break;
21610 + case LCD_WINCTRL1_FRM_16BPPA1555: return 16; break;
21611 + case LCD_WINCTRL1_FRM_16BPPA5551: return 16; break;
21612 + case LCD_WINCTRL1_FRM_24BPP: return 32; break;
21613 + case LCD_WINCTRL1_FRM_32BPP: return 32; break;
21614 + default: return 0; break;
21619 +fbinfo2index (struct fb_info *fb_info)
21622 + for (i = 0; i < CONFIG_FB_AU1200_DEVS; ++i)
21624 + if (fb_info == (struct fb_info *)(&fb_infos[i]))
21627 + printk("au1200fb: ERROR: fbinfo2index failed!\n");
21631 +static void au1200_detect(void)
21634 + * This function should detect the current video mode settings
21635 + * and store it as the default video mode
21636 + * Yeh, well, we're not going to change any settings so we're
21637 + * always stuck with the default ...
21641 +static int au1200_encode_fix(struct fb_fix_screeninfo *fix,
21642 + const void *_par, struct fb_info_gen *_info)
21644 + struct au1200fb_info *info = (struct au1200fb_info *) _info;
21645 + struct au1200fb_par *par = (struct au1200fb_par *) _par;
21648 + plane = fbinfo2index(info);
21650 + memset(fix, 0, sizeof(struct fb_fix_screeninfo));
21652 + fix->smem_start = info->fb_phys;
21653 + fix->smem_len = info->fb_size;
21654 + fix->type = FB_TYPE_PACKED_PIXELS;
21655 + fix->type_aux = 0;
21656 + fix->visual = (par->var.bits_per_pixel == 8) ?
21657 + FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
21658 + fix->ywrapstep = 0;
21659 + fix->xpanstep = 1;
21660 + fix->ypanstep = 1;
21661 + /* FIX!!!! why doesn't par->line_length work???? it does for au1100 */
21662 + fix->line_length = fb_pars[plane].line_length; /*par->line_length;*/
21666 +static void set_color_bitfields(struct fb_var_screeninfo *var, int plane)
21668 + if (var->bits_per_pixel == 8)
21670 + var->red.offset = 0;
21671 + var->red.length = 8;
21672 + var->green.offset = 0;
21673 + var->green.length = 8;
21674 + var->blue.offset = 0;
21675 + var->blue.length = 8;
21676 + var->transp.offset = 0;
21677 + var->transp.length = 0;
21681 + if (var->bits_per_pixel == 16)
21683 + /* FIX!!! How does CCO affect this ? */
21684 + /* FIX!!! Not exactly sure how many of these work with FB */
21685 + switch (win->w[plane].mode_winctrl1 & LCD_WINCTRL1_FRM)
21687 + case LCD_WINCTRL1_FRM_16BPP655:
21688 + var->red.offset = 10;
21689 + var->red.length = 6;
21690 + var->green.offset = 5;
21691 + var->green.length = 5;
21692 + var->blue.offset = 0;
21693 + var->blue.length = 5;
21694 + var->transp.offset = 0;
21695 + var->transp.length = 0;
21698 + case LCD_WINCTRL1_FRM_16BPP565:
21699 + var->red.offset = 11;
21700 + var->red.length = 5;
21701 + var->green.offset = 5;
21702 + var->green.length = 6;
21703 + var->blue.offset = 0;
21704 + var->blue.length = 5;
21705 + var->transp.offset = 0;
21706 + var->transp.length = 0;
21709 + case LCD_WINCTRL1_FRM_16BPP556:
21710 + var->red.offset = 11;
21711 + var->red.length = 5;
21712 + var->green.offset = 6;
21713 + var->green.length = 5;
21714 + var->blue.offset = 0;
21715 + var->blue.length = 6;
21716 + var->transp.offset = 0;
21717 + var->transp.length = 0;
21720 + case LCD_WINCTRL1_FRM_16BPPI1555:
21721 + var->red.offset = 10;
21722 + var->red.length = 5;
21723 + var->green.offset = 5;
21724 + var->green.length = 5;
21725 + var->blue.offset = 0;
21726 + var->blue.length = 5;
21727 + var->transp.offset = 0;
21728 + var->transp.length = 0;
21731 + case LCD_WINCTRL1_FRM_16BPPI5551:
21732 + var->red.offset = 11;
21733 + var->red.length = 5;
21734 + var->green.offset = 6;
21735 + var->green.length = 5;
21736 + var->blue.offset = 1;
21737 + var->blue.length = 5;
21738 + var->transp.offset = 0;
21739 + var->transp.length = 0;
21742 + case LCD_WINCTRL1_FRM_16BPPA1555:
21743 + var->red.offset = 10;
21744 + var->red.length = 5;
21745 + var->green.offset = 5;
21746 + var->green.length = 5;
21747 + var->blue.offset = 0;
21748 + var->blue.length = 5;
21749 + var->transp.offset = 15;
21750 + var->transp.length = 1;
21753 + case LCD_WINCTRL1_FRM_16BPPA5551:
21754 + var->red.offset = 11;
21755 + var->red.length = 5;
21756 + var->green.offset = 6;
21757 + var->green.length = 5;
21758 + var->blue.offset = 1;
21759 + var->blue.length = 5;
21760 + var->transp.offset = 0;
21761 + var->transp.length = 1;
21765 + printk("ERROR: Invalid PIXEL FORMAT!!!\n"); break;
21770 + if (var->bits_per_pixel == 32)
21772 + switch (win->w[plane].mode_winctrl1 & LCD_WINCTRL1_FRM)
21774 + case LCD_WINCTRL1_FRM_24BPP:
21775 + var->red.offset = 16;
21776 + var->red.length = 8;
21777 + var->green.offset = 8;
21778 + var->green.length = 8;
21779 + var->blue.offset = 0;
21780 + var->blue.length = 8;
21781 + var->transp.offset = 0;
21782 + var->transp.length = 0;
21785 + case LCD_WINCTRL1_FRM_32BPP:
21786 + var->red.offset = 16;
21787 + var->red.length = 8;
21788 + var->green.offset = 8;
21789 + var->green.length = 8;
21790 + var->blue.offset = 0;
21791 + var->blue.length = 8;
21792 + var->transp.offset = 24;
21793 + var->transp.length = 8;
21797 + var->red.msb_right = 0;
21798 + var->green.msb_right = 0;
21799 + var->blue.msb_right = 0;
21800 + var->transp.msb_right = 0;
21802 +printk("set_color_bitfields(a=%d, r=%d..%d, g=%d..%d, b=%d..%d)\n",
21803 + var->transp.offset,
21804 + var->red.offset+var->red.length-1, var->red.offset,
21805 + var->green.offset+var->green.length-1, var->green.offset,
21806 + var->blue.offset+var->blue.length-1, var->blue.offset);
21810 +static int au1200_decode_var(const struct fb_var_screeninfo *var,
21811 + void *_par, struct fb_info_gen *_info)
21813 + struct au1200fb_par *par = (struct au1200fb_par *)_par;
21816 + plane = fbinfo2index((struct fb_info *)_info);
21819 + * Don't allow setting any of these yet: xres and yres don't
21820 + * make sense for LCD panels.
21822 + if (var->xres != win->w[plane].xres ||
21823 + var->yres != win->w[plane].yres ||
21824 + var->xres != win->w[plane].xres ||
21825 + var->yres != win->w[plane].yres) {
21829 + bpp = winbpp(win->w[plane].mode_winctrl1);
21830 + if(var->bits_per_pixel != bpp) {
21831 + /* on au1200, window pixel format is independent of panel pixel */
21832 + printk("WARNING: bits_per_pizel != panel->bpp\n");
21835 + memset(par, 0, sizeof(struct au1200fb_par));
21839 + switch (var->bits_per_pixel) {
21841 + par->var.bits_per_pixel = 8;
21844 + par->var.bits_per_pixel = 16;
21848 + par->var.bits_per_pixel = 32;
21851 + printk("color depth %d bpp not supported\n",
21852 + var->bits_per_pixel);
21856 + set_color_bitfields(&par->var, plane);
21857 + /* FIX!!! what is this for 24/32bpp? */
21858 + par->cmap_len = (par->var.bits_per_pixel == 8) ? 256 : 16;
21862 +static int au1200_encode_var(struct fb_var_screeninfo *var,
21863 + const void *par, struct fb_info_gen *_info)
21865 + *var = ((struct au1200fb_par *)par)->var;
21870 +au1200_get_par(void *_par, struct fb_info_gen *_info)
21874 + index = fbinfo2index((struct fb_info *)_info);
21875 + *(struct au1200fb_par *)_par = fb_pars[index];
21878 +static void au1200_set_par(const void *par, struct fb_info_gen *info)
21880 + /* nothing to do: we don't change any settings */
21883 +static int au1200_getcolreg(unsigned regno, unsigned *red, unsigned *green,
21884 + unsigned *blue, unsigned *transp,
21885 + struct fb_info *info)
21887 + struct au1200fb_info* i = (struct au1200fb_info*)info;
21892 + *red = i->palette[regno].red;
21893 + *green = i->palette[regno].green;
21894 + *blue = i->palette[regno].blue;
21900 +static int au1200_setcolreg(unsigned regno, unsigned red, unsigned green,
21901 + unsigned blue, unsigned transp,
21902 + struct fb_info *info)
21904 + struct au1200fb_info* i = (struct au1200fb_info *)info;
21908 + plane = fbinfo2index((struct fb_info *)info);
21909 + bpp = winbpp(win->w[plane].mode_winctrl1);
21914 + i->palette[regno].red = red;
21915 + i->palette[regno].green = green;
21916 + i->palette[regno].blue = blue;
21919 +#ifdef FBCON_HAS_CFB8
21924 + panel_reg->lcd_pallettebase[regno] = (blue&0x1f) |
21925 + ((green&0x3f)<<5) | ((red&0x1f)<<11);
21928 +#ifdef FBCON_HAS_CFB16
21929 +/* FIX!!!! depends upon pixel format */
21931 + i->fbcon_cmap16[regno] =
21932 + ((red & 0xf800) >> 0) |
21933 + ((green & 0xfc00) >> 5) |
21934 + ((blue & 0xf800) >> 11);
21937 +#ifdef FBCON_HAS_CFB32
21939 + i->fbcon_cmap32[regno] =
21940 + (((u32 )transp & 0xff00) << 16) |
21941 + (((u32 )red & 0xff00) << 8) |
21942 + (((u32 )green & 0xff00)) |
21943 + (((u32 )blue & 0xff00) >> 8);
21947 + printk("unsupported au1200_setcolreg(%d)\n", bpp);
21955 +static int au1200_blank(int blank_mode, struct fb_info_gen *_info)
21957 + struct au1200fb_info *fb_info = (struct au1200fb_info *)_info;
21960 + /* Short-circuit screen blanking */
21961 + if (fb_info->noblanking)
21964 + plane = fbinfo2index((struct fb_info *)_info);
21966 + switch (blank_mode) {
21967 + case VESA_NO_BLANKING:
21968 + /* printk("turn on panel\n"); */
21969 + au1200_setpanel(panel);
21972 + case VESA_VSYNC_SUSPEND:
21973 + case VESA_HSYNC_SUSPEND:
21974 + case VESA_POWERDOWN:
21975 + /* printk("turn off panel\n"); */
21976 + au1200_setpanel(NULL);
21985 +static void au1200_set_disp(const void *unused, struct display *disp,
21986 + struct fb_info_gen *info)
21988 + struct au1200fb_info *fb_info;
21991 + fb_info = (struct au1200fb_info *)info;
21993 + disp->screen_base = (char *)fb_info->fb_virt_start;
21995 + switch (disp->var.bits_per_pixel) {
21996 +#ifdef FBCON_HAS_CFB8
21998 + disp->dispsw = &fbcon_cfb8;
21999 + if (fb_info->nohwcursor)
22000 + fbcon_cfb8.cursor = au1200_nocursor;
22003 +#ifdef FBCON_HAS_CFB16
22005 + disp->dispsw = &fbcon_cfb16;
22006 + disp->dispsw_data = fb_info->fbcon_cmap16;
22007 + if (fb_info->nohwcursor)
22008 + fbcon_cfb16.cursor = au1200_nocursor;
22011 +#ifdef FBCON_HAS_CFB32
22013 + disp->dispsw = &fbcon_cfb32;
22014 + disp->dispsw_data = fb_info->fbcon_cmap32;
22015 + if (fb_info->nohwcursor)
22016 + fbcon_cfb32.cursor = au1200_nocursor;
22020 + disp->dispsw = &fbcon_dummy;
22021 + disp->dispsw_data = NULL;
22027 +au1200fb_mmap(struct fb_info *_fb,
22028 + struct file *file,
22029 + struct vm_area_struct *vma)
22031 + unsigned int len;
22032 + unsigned long start=0, off;
22034 + struct au1200fb_info *fb_info = (struct au1200fb_info *)_fb;
22036 + if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
22040 + start = fb_info->fb_phys & PAGE_MASK;
22041 + len = PAGE_ALIGN((start & ~PAGE_MASK) + fb_info->fb_size);
22043 + off = vma->vm_pgoff << PAGE_SHIFT;
22045 + if ((vma->vm_end - vma->vm_start + off) > len) {
22050 + vma->vm_pgoff = off >> PAGE_SHIFT;
22052 + pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK;
22053 + pgprot_val(vma->vm_page_prot) |= _CACHE_UNCACHED;
22055 + /* This is an IO map - tell maydump to skip this VMA */
22056 + vma->vm_flags |= VM_IO;
22058 + if (io_remap_page_range(vma->vm_start, off,
22059 + vma->vm_end - vma->vm_start,
22060 + vma->vm_page_prot)) {
22064 + fb_info->mmaped = 1;
22068 +int au1200_pan_display(const struct fb_var_screeninfo *var,
22069 + struct fb_info_gen *info)
22075 +static int au1200fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
22076 + u_long arg, int con, struct fb_info *info)
22080 + plane = fbinfo2index(info);
22082 + /* printk("au1200fb: ioctl %d on plane %d\n", cmd, plane); */
22084 + if (cmd == 0x46FF)
22086 + au1200_lcd_getset_t iodata;
22088 + if (copy_from_user(&iodata, (void *) arg, sizeof(au1200_lcd_getset_t)))
22091 + switch (iodata.subcmd)
22093 + case AU1200_LCD_GET_WINENABLE:
22094 + iodata.winenable.enable = (lcd->winenable & (1<<plane)) ? 1 : 0;
22096 + case AU1200_LCD_SET_WINENABLE:
22099 + winenable = lcd->winenable;
22100 + winenable &= ~(1<<plane);
22101 + winenable |= (iodata.winenable.enable) ? (1<<plane) : 0;
22102 + lcd->winenable = winenable;
22105 + case AU1200_LCD_GET_WINLOCATION:
22106 + iodata.winlocation.x =
22107 + (lcd->window[plane].winctrl0 & LCD_WINCTRL0_OX) >> 21;
22108 + iodata.winlocation.y =
22109 + (lcd->window[plane].winctrl0 & LCD_WINCTRL0_OY) >> 10;
22111 + case AU1200_LCD_SET_WINLOCATION:
22112 + au1200_setlocation(plane, iodata.winlocation.x, iodata.winlocation.y);
22114 + case AU1200_LCD_GET_WINSIZE:
22115 + iodata.winsize.hsz =
22116 + (lcd->window[plane].winctrl1 & LCD_WINCTRL1_SZX) >> 11;
22117 + iodata.winsize.vsz =
22118 + (lcd->window[plane].winctrl0 & LCD_WINCTRL1_SZY) >> 0;
22120 + case AU1200_LCD_SET_WINSIZE:
22121 + au1200_setsize(plane, iodata.winsize.hsz, iodata.winsize.vsz);
22123 + case AU1200_LCD_GET_BACKCOLOR:
22124 + iodata.backcolor.color = lcd->backcolor;
22126 + case AU1200_LCD_SET_BACKCOLOR:
22127 + lcd->backcolor = iodata.backcolor.color;
22129 + case AU1200_LCD_GET_COLORKEY:
22130 + iodata.colorkey.key = lcd->colorkey;
22131 + iodata.colorkey.mask = lcd->colorkeymsk;
22133 + case AU1200_LCD_SET_COLORKEY:
22134 + lcd->colorkey = iodata.colorkey.key;
22135 + lcd->colorkeymsk = iodata.colorkey.mask;
22137 + case AU1200_LCD_GET_PANEL:
22138 + iodata.panel.panel = panel_index;
22140 + case AU1200_LCD_SET_PANEL:
22141 + if ((iodata.panel.panel >= 0) && (iodata.panel.panel < NUM_PANELS))
22143 + struct panel_settings *newpanel;
22144 + panel_index = iodata.panel.panel;
22145 + newpanel = &panels[panel_index];
22146 + au1200_setpanel(newpanel);
22151 + return copy_to_user((void *) arg, &iodata, sizeof(au1200_lcd_getset_t)) ? -EFAULT : 0;
22157 +static struct fbgen_hwswitch au1200_switch = {
22159 + au1200_encode_fix,
22160 + au1200_decode_var,
22161 + au1200_encode_var,
22164 + au1200_getcolreg,
22165 + au1200_setcolreg,
22166 + au1200_pan_display,
22171 +static void au1200_setpanel (struct panel_settings *newpanel)
22174 + * Perform global setup/init of LCD controller
22176 + uint32 winenable;
22178 + /* Make sure all windows disabled */
22179 + winenable = lcd->winenable;
22180 + lcd->winenable = 0;
22183 + * Ensure everything is disabled before reconfiguring
22185 + if (lcd->screen & LCD_SCREEN_SEN)
22187 + /* Wait for vertical sync period */
22188 + lcd->intstatus = LCD_INT_SS;
22189 + while ((lcd->intstatus & LCD_INT_SS) == 0)
22192 + lcd->screen &= ~LCD_SCREEN_SEN; /*disable the controller*/
22196 + lcd->intstatus = lcd->intstatus; /*clear interrupts*/
22198 + /*wait for controller to shut down*/
22199 + while ((lcd->intstatus & LCD_INT_SD) == 0);
22201 + /* Call shutdown of current panel (if up) */
22202 + /* this must occur last, because if an external clock is driving
22203 + the controller, the clock cannot be turned off before first
22204 + shutting down the controller.
22206 + if (panel->device_shutdown != NULL) panel->device_shutdown();
22209 + /* Check if only needing to turn off panel */
22210 + if (panel == NULL) return;
22212 + panel = newpanel;
22214 + printk("Panel(%s), %dx%d\n", panel->name, panel->Xres, panel->Yres);
22217 + * Setup clocking if internal LCD clock source (assumes sys_auxpll valid)
22219 + if (!(panel->mode_clkcontrol & LCD_CLKCONTROL_EXT))
22221 + uint32 sys_clksrc;
22222 + /* WARNING! This should really be a check since other peripherals can
22223 + be affected by changins sys_auxpll */
22224 + au_writel(panel->mode_auxpll, SYS_AUXPLL);
22225 + sys_clksrc = au_readl(SYS_CLKSRC) & ~0x0000001f;
22226 + sys_clksrc |= panel->mode_toyclksrc;
22227 + au_writel(sys_clksrc, SYS_CLKSRC);
22231 + * Configure panel timings
22233 + lcd->screen = panel->mode_screen;
22234 + lcd->horztiming = panel->mode_horztiming;
22235 + lcd->verttiming = panel->mode_verttiming;
22236 + lcd->clkcontrol = panel->mode_clkcontrol;
22237 + lcd->pwmdiv = panel->mode_pwmdiv;
22238 + lcd->pwmhi = panel->mode_pwmhi;
22239 + lcd->outmask = panel->mode_outmask;
22240 + lcd->fifoctrl = panel->mode_fifoctrl;
22243 + /* FIX!!! Check window settings to make sure still valid for new geometry */
22244 + au1200_setlocation(0, win->w[0].xpos, win->w[0].ypos);
22245 + au1200_setlocation(1, win->w[1].xpos, win->w[1].ypos);
22246 + au1200_setlocation(2, win->w[2].xpos, win->w[2].ypos);
22247 + au1200_setlocation(3, win->w[3].xpos, win->w[3].ypos);
22248 + lcd->winenable = winenable;
22251 + * Re-enable screen now that it is configured
22253 + lcd->screen |= LCD_SCREEN_SEN;
22256 + /* Call init of panel */
22257 + if (panel->device_init != NULL) panel->device_init();
22260 +#define D(X) printk("%25s: %08X\n", #X, X)
22262 + D(lcd->horztiming);
22263 + D(lcd->verttiming);
22264 + D(lcd->clkcontrol);
22268 + D(lcd->fifoctrl);
22269 + D(lcd->window[0].winctrl0);
22270 + D(lcd->window[0].winctrl1);
22271 + D(lcd->window[0].winctrl2);
22272 + D(lcd->window[0].winbuf0);
22273 + D(lcd->window[0].winbuf1);
22274 + D(lcd->window[0].winbufctrl);
22275 + D(lcd->window[1].winctrl0);
22276 + D(lcd->window[1].winctrl1);
22277 + D(lcd->window[1].winctrl2);
22278 + D(lcd->window[1].winbuf0);
22279 + D(lcd->window[1].winbuf1);
22280 + D(lcd->window[1].winbufctrl);
22281 + D(lcd->window[2].winctrl0);
22282 + D(lcd->window[2].winctrl1);
22283 + D(lcd->window[2].winctrl2);
22284 + D(lcd->window[2].winbuf0);
22285 + D(lcd->window[2].winbuf1);
22286 + D(lcd->window[2].winbufctrl);
22287 + D(lcd->window[3].winctrl0);
22288 + D(lcd->window[3].winctrl1);
22289 + D(lcd->window[3].winctrl2);
22290 + D(lcd->window[3].winbuf0);
22291 + D(lcd->window[3].winbuf1);
22292 + D(lcd->window[3].winbufctrl);
22293 + D(lcd->winenable);
22294 + D(lcd->intenable);
22295 + D(lcd->intstatus);
22296 + D(lcd->backcolor);
22297 + D(lcd->winenable);
22298 + D(lcd->colorkey);
22299 + D(lcd->colorkeymsk);
22300 + D(lcd->hwc.cursorctrl);
22301 + D(lcd->hwc.cursorpos);
22302 + D(lcd->hwc.cursorcolor0);
22303 + D(lcd->hwc.cursorcolor1);
22304 + D(lcd->hwc.cursorcolor2);
22305 + D(lcd->hwc.cursorcolor3);
22309 +static int au1200_setsize (int plane, int xres, int yres)
22312 + uint32 winctrl0, winctrl1, winenable;
22315 + /* FIX!!! X*Y can not surpass allocated memory */
22317 + printk("setsize: x %d y %d\n", xres, yres);
22318 + winctrl1 = lcd->window[plane].winctrl1;
22319 + printk("org winctrl1 %08X\n", winctrl1);
22320 + winctrl1 &= ~(LCD_WINCTRL1_SZX | LCD_WINCTRL1_SZY);
22324 + winctrl1 |= (xres << 11);
22325 + winctrl1 |= (yres << 0);
22327 + printk("new winctrl1 %08X\n", winctrl1);
22329 + /*winenable = lcd->winenable & (1 << plane); */
22330 + /*lcd->winenable &= ~(1 << plane); */
22331 + lcd->window[plane].winctrl1 = winctrl1;
22332 + /*lcd->winenable |= winenable; */
22337 +static int au1200_setlocation (int plane, int xpos, int ypos)
22339 + uint32 winctrl0, winctrl1, winenable, fb_offset = 0;
22342 + /* FIX!!! NOT CHECKING FOR COMPLETE OFFSCREEN YET */
22344 + winctrl0 = lcd->window[plane].winctrl0;
22345 + winctrl1 = lcd->window[plane].winctrl1;
22346 + winctrl0 &= (LCD_WINCTRL0_A | LCD_WINCTRL0_AEN);
22347 + winctrl1 &= ~(LCD_WINCTRL1_SZX | LCD_WINCTRL1_SZY);
22349 + /* Check for off-screen adjustments */
22350 + xsz = win->w[plane].xres;
22351 + ysz = win->w[plane].yres;
22352 + if ((xpos + win->w[plane].xres) > panel->Xres)
22354 + /* Off-screen to the right */
22355 + xsz = panel->Xres - xpos; /* off by 1 ??? */
22356 + /*printk("off screen right\n");*/
22359 + if ((ypos + win->w[plane].yres) > panel->Yres)
22361 + /* Off-screen to the bottom */
22362 + ysz = panel->Yres - ypos; /* off by 1 ??? */
22363 + /*printk("off screen bottom\n");*/
22368 + /* Off-screen to the left */
22369 + xsz = win->w[plane].xres + xpos;
22370 + fb_offset += (((0 - xpos) * winbpp(lcd->window[plane].winctrl1))/8);
22372 + /*printk("off screen left\n");*/
22377 + /* Off-screen to the top */
22378 + ysz = win->w[plane].yres + ypos;
22379 + fb_offset += ((0 - ypos) * fb_pars[plane].line_length);
22381 + /*printk("off screen top\n");*/
22384 + /* record settings */
22385 + win->w[plane].xpos = xpos;
22386 + win->w[plane].ypos = ypos;
22390 + winctrl0 |= (xpos << 21);
22391 + winctrl0 |= (ypos << 10);
22392 + winctrl1 |= (xsz << 11);
22393 + winctrl1 |= (ysz << 0);
22395 + /* Disable the window while making changes, then restore WINEN */
22396 + winenable = lcd->winenable & (1 << plane);
22397 + lcd->winenable &= ~(1 << plane);
22398 + lcd->window[plane].winctrl0 = winctrl0;
22399 + lcd->window[plane].winctrl1 = winctrl1;
22400 + lcd->window[plane].winbuf0 =
22401 + lcd->window[plane].winbuf1 = fb_infos[plane].fb_phys + fb_offset;
22402 + lcd->window[plane].winbufctrl = 0; /* select winbuf0 */
22403 + lcd->winenable |= winenable;
22408 +static void au1200_setmode(int plane)
22410 + /* Window/plane setup */
22411 + lcd->window[plane].winctrl1 = ( 0
22412 + | LCD_WINCTRL1_PRI_N(plane)
22413 + | win->w[plane].mode_winctrl1 /* FRM,CCO,PO,PIPE */
22416 + au1200_setlocation(plane, win->w[plane].xpos, win->w[plane].ypos);
22418 + lcd->window[plane].winctrl2 = ( 0
22419 + | LCD_WINCTRL2_CKMODE_00
22420 + | LCD_WINCTRL2_DBM
22421 +/* | LCD_WINCTRL2_RAM */
22422 + | LCD_WINCTRL2_BX_N(fb_pars[plane].line_length)
22423 + | LCD_WINCTRL2_SCX_1
22424 + | LCD_WINCTRL2_SCY_1
22426 + lcd->winenable |= win->w[plane].mode_winenable;
22431 +static unsigned long
22432 +au1200fb_alloc_fbmem (unsigned long size)
22434 + /* __get_free_pages() fulfills a max request of 2MB */
22435 + /* do multiple requests to obtain large contigous mem */
22436 +#define MAX_GFP 0x00200000
22438 + unsigned long mem, amem, alloced = 0, allocsize;
22441 + allocsize = (size < MAX_GFP) ? size : MAX_GFP;
22443 + /* Get first chunk */
22444 + mem = (unsigned long )
22445 + __get_free_pages(GFP_ATOMIC | GFP_DMA, get_order(allocsize));
22446 + if (mem != 0) alloced = allocsize;
22448 + /* Get remaining, contiguous chunks */
22449 + while (alloced < size)
22451 + amem = (unsigned long )
22452 + __get_free_pages(GFP_ATOMIC | GFP_DMA, get_order(allocsize));
22454 + alloced += allocsize;
22456 + /* check for contiguous mem alloced */
22457 + if ((amem == 0) || (amem + allocsize) != mem)
22465 +int __init au1200fb_init(void)
22467 + int num_panels = sizeof(panels)/sizeof(struct panel_settings);
22468 + struct au1200fb_info *fb_info;
22469 + struct display *disp;
22470 + struct au1200fb_par *par;
22471 + unsigned long page;
22475 + * Get the panel information/display mode
22477 + if (panel_index < 0)
22478 + panel_index = board_au1200fb_panel();
22479 + if ((panel_index < 0) || (panel_index >= num_panels)) {
22480 + printk("ERROR: INVALID PANEL %d\n", panel_index);
22483 + panel = &panels[panel_index];
22484 + win = &windows[window_index];
22486 + printk("au1200fb: Panel %d %s\n", panel_index, panel->name);
22487 + printk("au1200fb: Win %d %s\n", window_index, win->name);
22489 + /* Global setup/init */
22490 + au1200_setpanel(panel);
22491 + lcd->intenable = 0;
22492 + lcd->intstatus = ~0;
22493 + lcd->backcolor = win->mode_backcolor;
22494 + lcd->winenable = 0;
22496 + /* Setup Color Key - FIX!!! */
22497 + lcd->colorkey = win->mode_colorkey;
22498 + lcd->colorkeymsk = win->mode_colorkeymsk;
22500 + /* Setup HWCursor - FIX!!! Need to support this eventually */
22501 + lcd->hwc.cursorctrl = 0;
22502 + lcd->hwc.cursorpos = 0;
22503 + lcd->hwc.cursorcolor0 = 0;
22504 + lcd->hwc.cursorcolor1 = 0;
22505 + lcd->hwc.cursorcolor2 = 0;
22506 + lcd->hwc.cursorcolor3 = 0;
22508 + /* Register each plane as a frame buffer device */
22509 + for (plane = 0; plane < CONFIG_FB_AU1200_DEVS; ++plane)
22511 + fb_info = &fb_infos[plane];
22512 + disp = &disps[plane];
22513 + par = &fb_pars[plane];
22515 + bpp = winbpp(win->w[plane].mode_winctrl1);
22516 + if (win->w[plane].xres == 0)
22517 + win->w[plane].xres = panel->Xres;
22518 + if (win->w[plane].yres == 0)
22519 + win->w[plane].yres = panel->Yres;
22522 + par->var.xres_virtual = win->w[plane].xres;
22524 + par->var.yres_virtual = win->w[plane].yres;
22525 + par->var.bits_per_pixel = bpp;
22526 + par->line_length = win->w[plane].xres * bpp / 8; /* in bytes */
22528 + * Allocate LCD framebuffer from system memory
22529 + * Set page reserved so that mmap will work. This is necessary
22530 + * since we'll be remapping normal memory.
22532 + fb_info->fb_size = (win->w[plane].xres * win->w[plane].yres * bpp) / 8;
22533 + fb_info->fb_virt_start = au1200fb_alloc_fbmem(fb_info->fb_size);
22534 + if (!fb_info->fb_virt_start) {
22535 + printk("Unable to allocate fb memory\n");
22538 + fb_info->fb_phys = virt_to_bus((void *)fb_info->fb_virt_start);
22539 + for (page = fb_info->fb_virt_start;
22540 + page < PAGE_ALIGN(fb_info->fb_virt_start + fb_info->fb_size);
22541 + page += PAGE_SIZE) {
22542 + SetPageReserved(virt_to_page(page));
22544 + /* Convert to kseg1 */
22545 + fb_info->fb_virt_start =
22546 + (void *)((u32)fb_info->fb_virt_start | 0xA0000000);
22547 + /* FIX!!! may wish to avoid this to save startup time??? */
22548 + memset((void *)fb_info->fb_virt_start, 0, fb_info->fb_size);
22550 + fb_info->gen.parsize = sizeof(struct au1200fb_par);
22551 + fb_info->gen.fbhw = &au1200_switch;
22552 + strcpy(fb_info->gen.info.modename, "Au1200 LCD");
22553 + fb_info->gen.info.changevar = NULL;
22554 + fb_info->gen.info.node = -1;
22556 + fb_info->gen.info.fbops = &au1200fb_ops;
22557 + fb_info->gen.info.disp = disp;
22558 + fb_info->gen.info.switch_con = &fbgen_switch;
22559 + fb_info->gen.info.updatevar = &fbgen_update_var;
22560 + fb_info->gen.info.blank = &fbgen_blank;
22561 + fb_info->gen.info.flags = FBINFO_FLAG_DEFAULT;
22563 + fb_info->nohwcursor = 1;
22564 + fb_info->noblanking = 1;
22566 + /* This should give a reasonable default video mode */
22567 + fbgen_get_var(&disp->var, -1, &fb_info->gen.info);
22568 + fbgen_do_set_var(&disp->var, 1, &fb_info->gen);
22569 + fbgen_set_disp(-1, &fb_info->gen);
22570 + fbgen_install_cmap(0, &fb_info->gen);
22572 + /* Turn on plane */
22573 + au1200_setmode(plane);
22575 + if (register_framebuffer(&fb_info->gen.info) < 0)
22578 + printk(KERN_INFO "fb%d: %s plane %d @ %08X (%d x %d x %d)\n",
22579 + GET_FB_IDX(fb_info->gen.info.node),
22580 + fb_info->gen.info.modename, plane, fb_info->fb_phys,
22581 + win->w[plane].xres, win->w[plane].yres, bpp);
22583 + /* uncomment this if your driver cannot be unloaded */
22584 + /* MOD_INC_USE_COUNT; */
22588 +void au1200fb_setup(char *options, int *ints)
22592 + int num_panels = sizeof(panels)/sizeof(struct panel_settings);
22594 + if (!options || !*options)
22597 + for(this_opt=strtok(options, ","); this_opt;
22598 + this_opt=strtok(NULL, ",")) {
22599 + if (!strncmp(this_opt, "panel:", 6)) {
22605 + /* Panel name can be name, "bs" for board-switch, or number/index */
22606 + li = simple_strtol(this_opt, &endptr, 0);
22607 + if (*endptr == '\0') {
22608 + panel_index = (int)li;
22610 + else if (strcmp(this_opt, "bs") == 0) {
22611 + panel_index = board_au1200fb_panel();
22614 + for (i=0; i<num_panels; i++) {
22615 + if (!strcmp(this_opt, panels[i].name)) {
22621 + else if (!strncmp(this_opt, "nohwcursor", 10)) {
22622 + printk("nohwcursor\n");
22623 + fb_infos[0].nohwcursor = 1;
22627 + printk("au1200fb: Panel %d %s\n", panel_index,
22628 + panels[panel_index].name);
22634 +MODULE_LICENSE("GPL");
22635 +MODULE_DESCRIPTION("Au1200 LCD framebuffer driver");
22637 +void au1200fb_cleanup(struct fb_info *info)
22639 + unregister_framebuffer(info);
22642 +module_init(au1200fb_init);
22643 +module_exit(au1200fb_cleanup);
22644 +#endif /* MODULE */
22648 +++ b/drivers/video/au1200fb.h
22651 + * BRIEF MODULE DESCRIPTION
22652 + * Hardware definitions for the Au1200 LCD controller
22654 + * Copyright 2004 AMD
22657 + * This program is free software; you can redistribute it and/or modify it
22658 + * under the terms of the GNU General Public License as published by the
22659 + * Free Software Foundation; either version 2 of the License, or (at your
22660 + * option) any later version.
22662 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
22663 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22664 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
22665 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22666 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22667 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
22668 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22669 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22670 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22671 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22673 + * You should have received a copy of the GNU General Public License along
22674 + * with this program; if not, write to the Free Software Foundation, Inc.,
22675 + * 675 Mass Ave, Cambridge, MA 02139, USA.
22678 +#ifndef _AU1200LCD_H
22679 +#define _AU1200LCD_H
22681 +/********************************************************************/
22682 +#define AU1200_LCD_ADDR 0xB5000000
22684 +#define uint8 unsigned char
22685 +#define uint32 unsigned int
22687 +typedef volatile struct
22689 + uint32 reserved0;
22691 + uint32 backcolor;
22692 + uint32 horztiming;
22693 + uint32 verttiming;
22694 + uint32 clkcontrol;
22697 + uint32 reserved1;
22698 + uint32 winenable;
22700 + uint32 colorkeymsk;
22703 + uint32 cursorctrl;
22704 + uint32 cursorpos;
22705 + uint32 cursorcolor0;
22706 + uint32 cursorcolor1;
22707 + uint32 cursorcolor2;
22708 + uint32 cursorcolor3;
22710 + uint32 intstatus;
22711 + uint32 intenable;
22714 + uint32 reserved2[(0x0100-0x0058)/4];
22722 + uint32 winbufctrl;
22723 + uint32 winreserved0;
22724 + uint32 winreserved1;
22727 + uint32 reserved3[(0x0400-0x0180)/4];
22729 + uint32 palette[(0x0800-0x0400)/4];
22731 + uint8 cursorpattern[256];
22736 +#define LCD_SCREEN_SEN (1<<31)
22737 +#define LCD_SCREEN_SX (0x07FF<<19)
22738 +#define LCD_SCREEN_SY (0x07FF<< 8)
22739 +#define LCD_SCREEN_SWP (1<<7)
22740 +#define LCD_SCREEN_SWD (1<<6)
22741 +#define LCD_SCREEN_ST (7<<0)
22742 +#define LCD_SCREEN_ST_TFT (0<<0)
22743 +#define LCD_SCREEN_SX_N(WIDTH) ((WIDTH-1)<<19)
22744 +#define LCD_SCREEN_SY_N(HEIGHT) ((HEIGHT-1)<<8)
22745 +#define LCD_SCREEN_ST_CSTN (1<<0)
22746 +#define LCD_SCREEN_ST_CDSTN (2<<0)
22747 +#define LCD_SCREEN_ST_M8STN (3<<0)
22748 +#define LCD_SCREEN_ST_M4STN (4<<0)
22750 +/* lcd_backcolor */
22751 +#define LCD_BACKCOLOR_SBGR (0xFF<<16)
22752 +#define LCD_BACKCOLOR_SBGG (0xFF<<8)
22753 +#define LCD_BACKCOLOR_SBGB (0xFF<<0)
22754 +#define LCD_BACKCOLOR_SBGR_N(N) ((N)<<16)
22755 +#define LCD_BACKCOLOR_SBGG_N(N) ((N)<<8)
22756 +#define LCD_BACKCOLOR_SBGB_N(N) ((N)<<0)
22758 +/* lcd_winenable */
22759 +#define LCD_WINENABLE_WEN3 (1<<3)
22760 +#define LCD_WINENABLE_WEN2 (1<<2)
22761 +#define LCD_WINENABLE_WEN1 (1<<1)
22762 +#define LCD_WINENABLE_WEN0 (1<<0)
22764 +/* lcd_colorkey */
22765 +#define LCD_COLORKEY_CKR (0xFF<<16)
22766 +#define LCD_COLORKEY_CKG (0xFF<<8)
22767 +#define LCD_COLORKEY_CKB (0xFF<<0)
22768 +#define LCD_COLORKEY_CKR_N(N) ((N)<<16)
22769 +#define LCD_COLORKEY_CKG_N(N) ((N)<<8)
22770 +#define LCD_COLORKEY_CKB_N(N) ((N)<<0)
22772 +/* lcd_colorkeymsk */
22773 +#define LCD_COLORKEYMSK_CKMR (0xFF<<16)
22774 +#define LCD_COLORKEYMSK_CKMG (0xFF<<8)
22775 +#define LCD_COLORKEYMSK_CKMB (0xFF<<0)
22776 +#define LCD_COLORKEYMSK_CKMR_N(N) ((N)<<16)
22777 +#define LCD_COLORKEYMSK_CKMG_N(N) ((N)<<8)
22778 +#define LCD_COLORKEYMSK_CKMB_N(N) ((N)<<0)
22780 +/* lcd windows control 0 */
22781 +#define LCD_WINCTRL0_OX (0x07FF<<21)
22782 +#define LCD_WINCTRL0_OY (0x07FF<<10)
22783 +#define LCD_WINCTRL0_A (0x00FF<<2)
22784 +#define LCD_WINCTRL0_AEN (1<<1)
22785 +#define LCD_WINCTRL0_OX_N(N) ((N)<<21)
22786 +#define LCD_WINCTRL0_OY_N(N) ((N)<<10)
22787 +#define LCD_WINCTRL0_A_N(N) ((N)<<2)
22789 +/* lcd windows control 1 */
22790 +#define LCD_WINCTRL1_PRI (3<<30)
22791 +#define LCD_WINCTRL1_PIPE (1<<29)
22792 +#define LCD_WINCTRL1_FRM (0xF<<25)
22793 +#define LCD_WINCTRL1_CCO (1<<24)
22794 +#define LCD_WINCTRL1_PO (3<<22)
22795 +#define LCD_WINCTRL1_SZX (0x07FF<<11)
22796 +#define LCD_WINCTRL1_SZY (0x07FF<<0)
22797 +#define LCD_WINCTRL1_FRM_1BPP (0<<25)
22798 +#define LCD_WINCTRL1_FRM_2BPP (1<<25)
22799 +#define LCD_WINCTRL1_FRM_4BPP (2<<25)
22800 +#define LCD_WINCTRL1_FRM_8BPP (3<<25)
22801 +#define LCD_WINCTRL1_FRM_12BPP (4<<25)
22802 +#define LCD_WINCTRL1_FRM_16BPP655 (5<<25)
22803 +#define LCD_WINCTRL1_FRM_16BPP565 (6<<25)
22804 +#define LCD_WINCTRL1_FRM_16BPP556 (7<<25)
22805 +#define LCD_WINCTRL1_FRM_16BPPI1555 (8<<25)
22806 +#define LCD_WINCTRL1_FRM_16BPPI5551 (9<<25)
22807 +#define LCD_WINCTRL1_FRM_16BPPA1555 (10<<25)
22808 +#define LCD_WINCTRL1_FRM_16BPPA5551 (11<<25)
22809 +#define LCD_WINCTRL1_FRM_24BPP (12<<25)
22810 +#define LCD_WINCTRL1_FRM_32BPP (13<<25)
22811 +#define LCD_WINCTRL1_PRI_N(N) ((N)<<30)
22812 +#define LCD_WINCTRL1_PO_00 (0<<22)
22813 +#define LCD_WINCTRL1_PO_01 (1<<22)
22814 +#define LCD_WINCTRL1_PO_10 (2<<22)
22815 +#define LCD_WINCTRL1_PO_11 (3<<22)
22816 +#define LCD_WINCTRL1_SZX_N(N) ((N-1)<<11)
22817 +#define LCD_WINCTRL1_SZY_N(N) ((N-1)<<0)
22819 +/* lcd windows control 2 */
22820 +#define LCD_WINCTRL2_CKMODE (3<<24)
22821 +#define LCD_WINCTRL2_DBM (1<<23)
22822 +#define LCD_WINCTRL2_RAM (3<<21)
22823 +#define LCD_WINCTRL2_BX (0x1FFF<<8)
22824 +#define LCD_WINCTRL2_SCX (0xF<<4)
22825 +#define LCD_WINCTRL2_SCY (0xF<<0)
22826 +#define LCD_WINCTRL2_CKMODE_00 (0<<24)
22827 +#define LCD_WINCTRL2_CKMODE_01 (1<<24)
22828 +#define LCD_WINCTRL2_CKMODE_10 (2<<24)
22829 +#define LCD_WINCTRL2_CKMODE_11 (3<<24)
22830 +#define LCD_WINCTRL2_RAM_NONE (0<<21)
22831 +#define LCD_WINCTRL2_RAM_PALETTE (1<<21)
22832 +#define LCD_WINCTRL2_RAM_GAMMA (2<<21)
22833 +#define LCD_WINCTRL2_RAM_BUFFER (3<<21)
22834 +#define LCD_WINCTRL2_BX_N(N) ((N)<<8)
22835 +#define LCD_WINCTRL2_SCX_1 (0<<4)
22836 +#define LCD_WINCTRL2_SCX_2 (1<<4)
22837 +#define LCD_WINCTRL2_SCX_4 (2<<4)
22838 +#define LCD_WINCTRL2_SCY_1 (0<<0)
22839 +#define LCD_WINCTRL2_SCY_2 (1<<0)
22840 +#define LCD_WINCTRL2_SCY_4 (2<<0)
22842 +/* lcd windows buffer control */
22843 +#define LCD_WINBUFCTRL_DB (1<<1)
22844 +#define LCD_WINBUFCTRL_DBN (1<<0)
22846 +/* lcd_intstatus, lcd_intenable */
22847 +#define LCD_INT_IFO (0xF<<14)
22848 +#define LCD_INT_IFU (0xF<<10)
22849 +#define LCD_INT_OFO (1<<9)
22850 +#define LCD_INT_OFU (1<<8)
22851 +#define LCD_INT_WAIT (1<<3)
22852 +#define LCD_INT_SD (1<<2)
22853 +#define LCD_INT_SA (1<<1)
22854 +#define LCD_INT_SS (1<<0)
22856 +/* lcd_horztiming */
22857 +#define LCD_HORZTIMING_HND2 (0x1FF<<18)
22858 +#define LCD_HORZTIMING_HND1 (0x1FF<<9)
22859 +#define LCD_HORZTIMING_HPW (0x1FF<<0)
22860 +#define LCD_HORZTIMING_HND2_N(N)(((N)-1)<<18)
22861 +#define LCD_HORZTIMING_HND1_N(N)(((N)-1)<<9)
22862 +#define LCD_HORZTIMING_HPW_N(N) (((N)-1)<<0)
22864 +/* lcd_verttiming */
22865 +#define LCD_VERTTIMING_VND2 (0x1FF<<18)
22866 +#define LCD_VERTTIMING_VND1 (0x1FF<<9)
22867 +#define LCD_VERTTIMING_VPW (0x1FF<<0)
22868 +#define LCD_VERTTIMING_VND2_N(N)(((N)-1)<<18)
22869 +#define LCD_VERTTIMING_VND1_N(N)(((N)-1)<<9)
22870 +#define LCD_VERTTIMING_VPW_N(N) (((N)-1)<<0)
22872 +/* lcd_clkcontrol */
22873 +#define LCD_CLKCONTROL_EXT (1<<22)
22874 +#define LCD_CLKCONTROL_DELAY (3<<20)
22875 +#define LCD_CLKCONTROL_CDD (1<<19)
22876 +#define LCD_CLKCONTROL_IB (1<<18)
22877 +#define LCD_CLKCONTROL_IC (1<<17)
22878 +#define LCD_CLKCONTROL_IH (1<<16)
22879 +#define LCD_CLKCONTROL_IV (1<<15)
22880 +#define LCD_CLKCONTROL_BF (0x1F<<10)
22881 +#define LCD_CLKCONTROL_PCD (0x3FF<<0)
22882 +#define LCD_CLKCONTROL_BF_N(N) (((N)-1)<<10)
22883 +#define LCD_CLKCONTROL_PCD_N(N) ((N)<<0)
22886 +#define LCD_PWMDIV_EN (1<<31)
22887 +#define LCD_PWMDIV_PWMDIV (0x1FFFF<<0)
22888 +#define LCD_PWMDIV_PWMDIV_N(N) ((N)<<0)
22891 +#define LCD_PWMHI_PWMHI1 (0xFFFF<<16)
22892 +#define LCD_PWMHI_PWMHI0 (0xFFFF<<0)
22893 +#define LCD_PWMHI_PWMHI1_N(N) ((N)<<16)
22894 +#define LCD_PWMHI_PWMHI0_N(N) ((N)<<0)
22897 +#define LCD_HWCCON_EN (1<<0)
22899 +/* lcd_cursorpos */
22900 +#define LCD_CURSORPOS_HWCXOFF (0x1F<<27)
22901 +#define LCD_CURSORPOS_HWCXPOS (0x07FF<<16)
22902 +#define LCD_CURSORPOS_HWCYOFF (0x1F<<11)
22903 +#define LCD_CURSORPOS_HWCYPOS (0x07FF<<0)
22904 +#define LCD_CURSORPOS_HWCXOFF_N(N) ((N)<<27)
22905 +#define LCD_CURSORPOS_HWCXPOS_N(N) ((N)<<16)
22906 +#define LCD_CURSORPOS_HWCYOFF_N(N) ((N)<<11)
22907 +#define LCD_CURSORPOS_HWCYPOS_N(N) ((N)<<0)
22909 +/* lcd_cursorcolor */
22910 +#define LCD_CURSORCOLOR_HWCA (0xFF<<24)
22911 +#define LCD_CURSORCOLOR_HWCR (0xFF<<16)
22912 +#define LCD_CURSORCOLOR_HWCG (0xFF<<8)
22913 +#define LCD_CURSORCOLOR_HWCB (0xFF<<0)
22914 +#define LCD_CURSORCOLOR_HWCA_N(N) ((N)<<24)
22915 +#define LCD_CURSORCOLOR_HWCR_N(N) ((N)<<16)
22916 +#define LCD_CURSORCOLOR_HWCG_N(N) ((N)<<8)
22917 +#define LCD_CURSORCOLOR_HWCB_N(N) ((N)<<0)
22919 +/* lcd_fifoctrl */
22920 +#define LCD_FIFOCTRL_F3IF (1<<29)
22921 +#define LCD_FIFOCTRL_F3REQ (0x1F<<24)
22922 +#define LCD_FIFOCTRL_F2IF (1<<29)
22923 +#define LCD_FIFOCTRL_F2REQ (0x1F<<16)
22924 +#define LCD_FIFOCTRL_F1IF (1<<29)
22925 +#define LCD_FIFOCTRL_F1REQ (0x1F<<8)
22926 +#define LCD_FIFOCTRL_F0IF (1<<29)
22927 +#define LCD_FIFOCTRL_F0REQ (0x1F<<0)
22928 +#define LCD_FIFOCTRL_F3REQ_N(N) ((N-1)<<24)
22929 +#define LCD_FIFOCTRL_F2REQ_N(N) ((N-1)<<16)
22930 +#define LCD_FIFOCTRL_F1REQ_N(N) ((N-1)<<8)
22931 +#define LCD_FIFOCTRL_F0REQ_N(N) ((N-1)<<0)
22934 +#define LCD_OUTMASK_MASK (0x00FFFFFF)
22936 +/********************************************************************/
22937 +#endif /* _AU1200LCD_H */
22938 --- a/drivers/video/Config.in
22939 +++ b/drivers/video/Config.in
22940 @@ -87,8 +87,8 @@ if [ "$CONFIG_FB" = "y" ]; then
22941 if [ "$CONFIG_HP300" = "y" ]; then
22942 define_bool CONFIG_FB_HP300 y
22944 - if [ "$ARCH" = "alpha" ]; then
22945 - tristate ' TGA framebuffer support' CONFIG_FB_TGA
22946 + if [ "$ARCH" = "alpha" -o "$CONFIG_TC" = "y" ]; then
22947 + tristate ' TGA/SFB+ framebuffer support' CONFIG_FB_TGA
22949 if [ "$CONFIG_X86" = "y" ]; then
22950 bool ' VESA VGA graphics console' CONFIG_FB_VESA
22951 @@ -121,6 +121,17 @@ if [ "$CONFIG_FB" = "y" ]; then
22952 hex ' Framebuffer Base Address' CONFIG_E1355_FB_BASE a8200000
22955 + if [ "$CONFIG_SOC_AU1100" = "y" ]; then
22956 + bool ' Au1100 LCD Driver' CONFIG_FB_AU1100
22959 + if [ "$CONFIG_SOC_AU1200" = "y" ]; then
22960 + bool ' Au1200 LCD Driver' CONFIG_FB_AU1200
22961 + if [ "$CONFIG_FB_AU1200" = "y" ]; then
22962 + int ' Number of planes (1 to 4)' CONFIG_FB_AU1200_DEVS 1
22966 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
22967 if [ "$CONFIG_PCI" != "n" ]; then
22968 tristate ' Matrox acceleration (EXPERIMENTAL)' CONFIG_FB_MATROX
22969 @@ -178,9 +189,6 @@ if [ "$CONFIG_FB" = "y" ]; then
22970 bool ' Use CRT on Pb1100 ' CONFIG_PB1500_CRT
22971 bool ' Use TFT Panel on Pb1100 ' CONFIG_PB1500_TFT
22973 - if [ "$CONFIG_SOC_AU1100" = "y" ]; then
22974 - bool ' Au1100 LCD Driver' CONFIG_FB_AU1100
22979 --- a/drivers/video/fbmem.c
22980 +++ b/drivers/video/fbmem.c
22981 @@ -139,6 +139,8 @@ extern int e1356fb_init(void);
22982 extern int e1356fb_setup(char*);
22983 extern int au1100fb_init(void);
22984 extern int au1100fb_setup(char*);
22985 +extern int au1200fb_init(void);
22986 +extern int au1200fb_setup(char*);
22987 extern int pvr2fb_init(void);
22988 extern int pvr2fb_setup(char*);
22989 extern int sstfb_init(void);
22990 @@ -331,6 +333,9 @@ static struct {
22991 #ifdef CONFIG_FB_AU1100
22992 { "au1100fb", au1100fb_init, au1100fb_setup },
22994 +#ifdef CONFIG_FB_AU1200
22995 + { "au1200fb", au1200fb_init, au1200fb_setup },
22997 #ifdef CONFIG_FB_IT8181
22998 { "it8181fb", it8181fb_init, it8181fb_setup },
23001 +++ b/drivers/video/ims332.h
23004 + * linux/drivers/video/ims332.h
23006 + * Copyright 2003 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
23008 + * This file is subject to the terms and conditions of the GNU General
23009 + * Public License. See the file COPYING in the main directory of this
23010 + * archive for more details.
23012 +#include <linux/types.h>
23015 + * IMS332 16-bit wide, 128-bit aligned registers.
23017 +struct _ims332_reg {
23022 +struct _ims332_regs {
23023 +#define IMS332_BOOT_PLL_MUTLIPLIER 0x00001f
23024 +#define IMS332_BOOT_CLOCK_SOURCE_SEL 0x000020
23025 +#define IMS332_BOOT_ADDRESS_ALIGNMENT 0x000040
23026 +#define IMS332_BOOT_WRITE_ZERO 0xffff80
23027 + struct _ims332_reg boot;
23028 + struct _ims332_reg pad0[0x020 - 0x000];
23029 + struct _ims332_reg half_sync;
23030 + struct _ims332_reg back_porch;
23031 + struct _ims332_reg display;
23032 + struct _ims332_reg short_display;
23033 + struct _ims332_reg broad_pulse;
23034 + struct _ims332_reg vsync;
23035 + struct _ims332_reg vpre_equalise;
23036 + struct _ims332_reg vpost_equalise;
23037 + struct _ims332_reg vblank;
23038 + struct _ims332_reg vdisplay;
23039 + struct _ims332_reg line_time;
23040 + struct _ims332_reg line_start;
23041 + struct _ims332_reg mem_init;
23042 + struct _ims332_reg transfer_delay;
23043 + struct _ims332_reg pad1[0x03f - 0x02e];
23044 + struct _ims332_reg pixel_address_mask;
23045 + struct _ims332_reg pad2[0x05f - 0x040];
23047 +#define IMS332_CTRL_A_BOOT_ENABLE_VTG 0x000001
23048 +#define IMS332_CTRL_A_SCREEN_FORMAT 0x000002
23049 +#define IMS332_CTRL_A_INTERLACED_STANDARD 0x000004
23050 +#define IMS332_CTRL_A_OPERATING_MODE 0x000008
23051 +#define IMS332_CTRL_A_FRAME_FLYBACK_PATTERN 0x000010
23052 +#define IMS332_CTRL_A_DIGITAL_SYNC_FORMAT 0x000020
23053 +#define IMS332_CTRL_A_ANALOGUE_VIDEO_FORMAT 0x000040
23054 +#define IMS332_CTRL_A_BLANK_LEVEL 0x000080
23055 +#define IMS332_CTRL_A_BLANK_IO 0x000100
23056 +#define IMS332_CTRL_A_BLANK_FUNCTION_SWITCH 0x000200
23057 +#define IMS332_CTRL_A_FORCE_BLANKING 0x000400
23058 +#define IMS332_CTRL_A_TURN_OFF_BLANKING 0x000800
23059 +#define IMS332_CTRL_A_VRAM_ADDRESS_INCREMENT 0x003000
23060 +#define IMS332_CTRL_A_TURN_OFF_DMA 0x004000
23061 +#define IMS332_CTRL_A_SYNC_DELAY 0x038000
23062 +#define IMS332_CTRL_A_PIXEL_PORT_INTERLEAVING 0x040000
23063 +#define IMS332_CTRL_A_DELAYED_SAMPLING 0x080000
23064 +#define IMS332_CTRL_A_BITS_PER_PIXEL 0x700000
23065 +#define IMS332_CTRL_A_CURSOR_DISABLE 0x800000
23066 + struct _ims332_reg config_control_a;
23067 + struct _ims332_reg pad3[0x06f - 0x060];
23069 +#define IMS332_CTRL_B_WRITE_ZERO 0xffffff
23070 + struct _ims332_reg config_control_b;
23071 + struct _ims332_reg pad4[0x07f - 0x070];
23072 + struct _ims332_reg screen_top;
23073 + struct _ims332_reg pad5[0x0a0 - 0x080];
23074 + /* cursor color palette, 3 entries, reg no. 0xa1 - 0xa3 */
23075 + struct _ims332_reg cursor_color_palette0;
23076 + struct _ims332_reg cursor_color_palette1;
23077 + struct _ims332_reg cursor_color_palette2;
23078 + struct _ims332_reg pad6[0x0bf - 0x0a3];
23079 + struct _ims332_reg rgb_frame_checksum0;
23080 + struct _ims332_reg rgb_frame_checksum1;
23081 + struct _ims332_reg rgb_frame_checksum2;
23082 + struct _ims332_reg pad7[0x0c6 - 0x0c2];
23083 + struct _ims332_reg cursor_start;
23084 + struct _ims332_reg pad8[0x0ff - 0x0c7];
23085 + /* color palette, 256 entries of form 0x00BBGGRR, reg no. 0x100 - 0x1ff */
23086 + struct _ims332_reg color_palette[0x1ff - 0x0ff];
23087 + /* hardware cursor bitmap, reg no. 0x200 - 0x3ff */
23088 + struct _ims332_reg cursor_ram[0x3ff - 0x1ff];
23092 + * In the functions below we use some weird looking helper variables to
23093 + * access most members of this struct, otherwise the compiler splits
23094 + * the read/write in two byte accesses.
23096 +struct ims332_regs {
23097 + struct _ims332_regs rw;
23098 + char pad0[0x80000 - sizeof (struct _ims332_regs)];
23099 + struct _ims332_regs r;
23100 + char pad1[0xa0000 - (sizeof (struct _ims332_regs) + 0x80000)];
23101 + struct _ims332_regs w;
23102 +} __attribute__((packed));
23104 +static inline void ims332_control_reg_bits(struct ims332_regs *regs, u32 mask,
23107 + volatile u16 *ctr = &(regs->r.config_control_a.r);
23108 + volatile u16 *ctw = &(regs->w.config_control_a.r);
23114 + ctrl |= ((regs->rw.boot.r << 8) & 0x00ff0000);
23115 + ctrl |= val & mask;
23116 + ctrl &= ~(~val & mask);
23118 + regs->rw.boot.r = (ctrl >> 8) & 0xff00;
23120 + *ctw = ctrl & 0xffff;
23123 +/* FIXME: This is maxinefb specific. */
23124 +static inline void ims332_bootstrap(struct ims332_regs *regs)
23126 + volatile u16 *ctw = &(regs->w.config_control_a.r);
23127 + u32 ctrl = IMS332_CTRL_A_BOOT_ENABLE_VTG | IMS332_CTRL_A_TURN_OFF_DMA;
23129 + /* bootstrap sequence */
23131 + regs->rw.boot.r = 0;
23135 + /* init control A register */
23137 + regs->rw.boot.r = (ctrl >> 8) & 0xff00;
23139 + *ctw = ctrl & 0xffff;
23142 +static inline void ims332_blank_screen(struct ims332_regs *regs, int blank)
23144 + ims332_control_reg_bits(regs, IMS332_CTRL_A_FORCE_BLANKING,
23145 + blank ? IMS332_CTRL_A_FORCE_BLANKING : 0);
23148 +static inline void ims332_set_color_depth(struct ims332_regs *regs, u32 depth)
23151 + u32 mask = (IMS332_CTRL_A_PIXEL_PORT_INTERLEAVING
23152 + | IMS332_CTRL_A_DELAYED_SAMPLING
23153 + | IMS332_CTRL_A_BITS_PER_PIXEL);
23156 + case 1: dp = 0 << 20; break;
23157 + case 2: dp = 1 << 20; break;
23158 + case 4: dp = 2 << 20; break;
23159 + case 8: dp = 3 << 20; break;
23160 + case 15: dp = (4 << 20) | IMS332_CTRL_A_PIXEL_PORT_INTERLEAVING; break;
23161 + case 16: dp = (5 << 20) | IMS332_CTRL_A_PIXEL_PORT_INTERLEAVING; break;
23164 + ims332_control_reg_bits(regs, mask, dp);
23166 + if (depth <= 8) {
23167 + volatile u16 *pmask = &(regs->w.pixel_address_mask.r);
23168 + u32 dm = (1 << depth) - 1;
23171 + regs->rw.boot.r = dm << 8;
23173 + *pmask = dm << 8 | dm;
23177 +static inline void ims332_set_screen_top(struct ims332_regs *regs, u16 top)
23179 + volatile u16 *st = &(regs->w.screen_top.r);
23182 + *st = top & 0xffff;
23185 +static inline void ims332_enable_cursor(struct ims332_regs *regs, int on)
23187 + ims332_control_reg_bits(regs, IMS332_CTRL_A_CURSOR_DISABLE,
23188 + on ? 0 : IMS332_CTRL_A_CURSOR_DISABLE);
23191 +static inline void ims332_position_cursor(struct ims332_regs *regs,
23194 + volatile u16 *cp = &(regs->w.cursor_start.r);
23195 + u32 val = ((x & 0xfff) << 12) | (y & 0xfff);
23197 + if (x > 2303 || y > 2303)
23201 + regs->rw.boot.r = (val >> 8) & 0xff00;
23203 + *cp = val & 0xffff;
23206 +static inline void ims332_set_font(struct ims332_regs *regs, u8 fgc,
23207 + u16 width, u16 height)
23209 + volatile u16 *cp0 = &(regs->w.cursor_color_palette0.r);
23213 + for (i = 0; i < 0x200; i++) {
23214 + volatile u16 *cram = &(regs->w.cursor_ram[i].r);
23216 + if (height << 6 <= i << 3)
23218 + else if (width <= i % 8 << 3)
23220 + else if (((width >> 3) & 0xffff) > i % 8)
23223 + *cram = 0x5555 & ~(0xffff << (width % 8 << 1));
23226 + regs->rw.boot.r = fgc << 8;
23228 + *cp0 = fgc << 8 | fgc;
23231 +static inline void ims332_read_cmap(struct ims332_regs *regs, u8 reg,
23232 + u8* red, u8* green, u8* blue)
23234 + volatile u16 *rptr = &(regs->r.color_palette[reg].r);
23239 + *red = val & 0xff;
23240 + *green = (val >> 8) & 0xff;
23242 + *blue = (regs->rw.boot.r >> 8) & 0xff;
23245 +static inline void ims332_write_cmap(struct ims332_regs *regs, u8 reg,
23246 + u8 red, u8 green, u8 blue)
23248 + volatile u16 *wptr = &(regs->w.color_palette[reg].r);
23251 + regs->rw.boot.r = blue << 8;
23253 + *wptr = (green << 8) + red;
23256 +static inline void ims332_dump_regs(struct ims332_regs *regs)
23260 + printk(__FUNCTION__);
23261 + ims332_control_reg_bits(regs, IMS332_CTRL_A_BOOT_ENABLE_VTG, 0);
23262 + for (i = 0; i < 0x100; i++) {
23263 + volatile u16 *cpad = (u16 *)((char *)(®s->r) + sizeof(struct _ims332_reg) * i);
23268 + val |= regs->rw.boot.r << 8;
23271 + printk("\n%02x:", i);
23272 + printk(" %06x", val);
23274 + ims332_control_reg_bits(regs, IMS332_CTRL_A_BOOT_ENABLE_VTG,
23275 + IMS332_CTRL_A_BOOT_ENABLE_VTG);
23278 --- a/drivers/video/Makefile
23279 +++ b/drivers/video/Makefile
23280 @@ -87,6 +87,7 @@ obj-$(CONFIG_FB_PMAGB_B) += pma
23281 obj-$(CONFIG_FB_MAXINE) += maxinefb.o
23282 obj-$(CONFIG_FB_TX3912) += tx3912fb.o
23283 obj-$(CONFIG_FB_AU1100) += au1100fb.o fbgen.o
23284 +obj-$(CONFIG_FB_AU1200) += au1200fb.o fbgen.o
23285 obj-$(CONFIG_FB_IT8181) += it8181fb.o fbgen.o
23287 subdir-$(CONFIG_STI_CONSOLE) += sti
23288 --- a/drivers/video/maxinefb.h
23292 - * linux/drivers/video/maxinefb.h
23294 - * DECstation 5000/xx onboard framebuffer support, Copyright (C) 1999 by
23295 - * Michael Engel <engel@unix-ag.org> and Karsten Merker <merker@guug.de>
23296 - * This file is subject to the terms and conditions of the GNU General
23297 - * Public License. See the file COPYING in the main directory of this
23298 - * archive for more details.
23301 -#include <asm/addrspace.h>
23304 - * IMS332 video controller register base address
23306 -#define MAXINEFB_IMS332_ADDRESS KSEG1ADDR(0x1c140000)
23309 - * Begin of DECstation 5000/xx onboard framebuffer memory, default resolution
23312 -#define DS5000_xx_ONBOARD_FBMEM_START KSEG1ADDR(0x0a000000)
23315 - * The IMS 332 video controller used in the DECstation 5000/xx series
23316 - * uses 32 bits wide registers; the following defines declare the
23317 - * register numbers, to get the real offset, these have to be multiplied
23321 -#define IMS332_REG_CURSOR_RAM 0x200 /* hardware cursor bitmap */
23324 - * The color palette entries have the form 0x00BBGGRR
23326 -#define IMS332_REG_COLOR_PALETTE 0x100 /* color palette, 256 entries */
23327 -#define IMS332_REG_CURSOR_COLOR_PALETTE 0x0a1 /* cursor color palette, */
23329 --- a/drivers/video/newport_con.c
23330 +++ b/drivers/video/newport_con.c
23332 #include <linux/module.h>
23333 #include <linux/slab.h>
23335 +#include <asm/io.h>
23336 #include <asm/uaccess.h>
23337 #include <asm/system.h>
23338 #include <asm/page.h>
23339 @@ -77,7 +78,7 @@ static int newport_set_def_font(int unit
23340 static inline void newport_render_background(int xstart, int ystart,
23341 int xend, int yend, int ci)
23344 + newport_wait(npregs);
23345 npregs->set.wrmask = 0xffffffff;
23346 npregs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_BLOCK |
23347 NPORT_DMODE0_DOSETUP | NPORT_DMODE0_STOPX
23348 @@ -94,7 +95,7 @@ static inline void newport_init_cmap(voi
23351 for (i = 0; i < 16; i++) {
23352 - newport_bfwait();
23353 + newport_bfwait(npregs);
23354 newport_cmap_setaddr(npregs, color_table[i]);
23355 newport_cmap_setrgb(npregs,
23357 @@ -107,7 +108,7 @@ static inline void newport_show_logo(voi
23360 for (i = 0; i < LINUX_LOGO_COLORS; i++) {
23361 - newport_bfwait();
23362 + newport_bfwait(npregs);
23363 newport_cmap_setaddr(npregs, i + 0x20);
23364 newport_cmap_setrgb(npregs,
23366 @@ -115,13 +116,13 @@ static inline void newport_show_logo(voi
23367 linux_logo_blue[i]);
23371 + newport_wait(npregs);
23372 npregs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_BLOCK |
23373 NPORT_DMODE0_CHOST);
23375 npregs->set.xystarti = ((newport_xsize - LOGO_W) << 16) | (0);
23376 npregs->set.xyendi = ((newport_xsize - 1) << 16);
23378 + newport_wait(npregs);
23380 for (i = 0; i < LOGO_W * LOGO_H; i++)
23381 npregs->go.hostrw0 = linux_logo[i] << 24;
23382 @@ -133,7 +134,7 @@ static inline void newport_clear_screen(
23387 + newport_wait(npregs);
23388 npregs->set.wrmask = 0xffffffff;
23389 npregs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_BLOCK |
23390 NPORT_DMODE0_DOSETUP | NPORT_DMODE0_STOPX
23391 @@ -155,7 +156,7 @@ void newport_reset(void)
23392 unsigned short treg;
23396 + newport_wait(npregs);
23397 treg = newport_vc2_get(npregs, VC2_IREG_CONTROL);
23398 newport_vc2_set(npregs, VC2_IREG_CONTROL,
23399 (treg | VC2_CTRL_EVIDEO));
23400 @@ -165,7 +166,7 @@ void newport_reset(void)
23401 npregs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_RAM |
23402 NPORT_DMODE_W2 | VC2_PROTOCOL);
23403 for (i = 0; i < 128; i++) {
23404 - newport_bfwait();
23405 + newport_bfwait(npregs);
23406 if (i == 92 || i == 94)
23407 npregs->set.dcbdata0.byshort.s1 = 0xff00;
23409 @@ -205,7 +206,7 @@ void newport_get_screensize(void)
23410 npregs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_RAM |
23411 NPORT_DMODE_W2 | VC2_PROTOCOL);
23412 for (i = 0; i < 128; i++) {
23413 - newport_bfwait();
23414 + newport_bfwait(npregs);
23415 linetable[i] = npregs->set.dcbdata0.byshort.s1;
23418 @@ -216,12 +217,12 @@ void newport_get_screensize(void)
23419 npregs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_RAM |
23420 NPORT_DMODE_W2 | VC2_PROTOCOL);
23422 - newport_bfwait();
23423 + newport_bfwait(npregs);
23424 treg = npregs->set.dcbdata0.byshort.s1;
23425 if ((treg & 1) == 0)
23426 cols += (treg >> 7) & 0xfe;
23427 if ((treg & 0x80) == 0) {
23428 - newport_bfwait();
23429 + newport_bfwait(npregs);
23430 treg = npregs->set.dcbdata0.byshort.s1;
23432 } while ((treg & 0x8000) == 0);
23433 @@ -291,16 +292,16 @@ static const char *newport_startup(void)
23437 - npregs = (struct newport_regs *) (KSEG1 + sgi_gfxaddr);
23438 + npregs = (struct newport_regs *) /* ioremap cannot fail */
23439 + ioremap(sgi_gfxaddr, sizeof(struct newport_regs));
23440 npregs->cset.config = NPORT_CFG_GD0;
23442 - if (newport_wait()) {
23445 + if (newport_wait(npregs))
23448 npregs->set.xstarti = TESTVAL;
23449 if (npregs->set._xstart.word != XSTI_TO_FXSTART(TESTVAL))
23453 for (i = 0; i < MAX_NR_CONSOLES; i++)
23454 font_data[i] = FONT_DATA;
23455 @@ -310,6 +311,10 @@ static const char *newport_startup(void)
23456 newport_get_screensize();
23458 return "SGI Newport";
23461 + iounmap((void *)npregs);
23465 static void newport_init(struct vc_data *vc, int init)
23466 @@ -363,7 +368,7 @@ static void newport_putc(struct vc_data
23467 (charattr & 0xf0) >> 4);
23469 /* Set the color and drawing mode. */
23471 + newport_wait(npregs);
23472 npregs->set.colori = charattr & 0xf;
23473 npregs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_BLOCK |
23474 NPORT_DMODE0_STOPX | NPORT_DMODE0_ZPENAB |
23475 @@ -372,7 +377,7 @@ static void newport_putc(struct vc_data
23476 /* Set coordinates for bitmap operation. */
23477 npregs->set.xystarti = (xpos << 16) | ((ypos + topscan) & 0x3ff);
23478 npregs->set.xyendi = ((xpos + 7) << 16);
23480 + newport_wait(npregs);
23482 /* Go, baby, go... */
23484 @@ -396,7 +401,7 @@ static void newport_putcs(struct vc_data
23485 xpos + ((count - 1) << 3), ypos,
23486 (charattr & 0xf0) >> 4);
23489 + newport_wait(npregs);
23491 /* Set the color and drawing mode. */
23492 npregs->set.colori = charattr & 0xf;
23493 @@ -407,7 +412,7 @@ static void newport_putcs(struct vc_data
23494 for (i = 0; i < count; i++, xpos += 8) {
23495 p = &font_data[vc->vc_num][(scr_readw(s++) & 0xff) << 4];
23498 + newport_wait(npregs);
23500 /* Set coordinates for bitmap operation. */
23501 npregs->set.xystarti =
23502 @@ -689,7 +694,7 @@ static void newport_bmove(struct vc_data
23507 + newport_wait(npregs);
23508 npregs->set.drawmode0 = (NPORT_DMODE0_S2S | NPORT_DMODE0_BLOCK |
23509 NPORT_DMODE0_DOSETUP | NPORT_DMODE0_STOPX
23510 | NPORT_DMODE0_STOPY);
23511 @@ -706,35 +711,35 @@ static int newport_dummy(struct vc_data
23512 #define DUMMY (void *) newport_dummy
23514 const struct consw newport_con = {
23515 - con_startup: newport_startup,
23516 - con_init: newport_init,
23517 - con_deinit: newport_deinit,
23518 - con_clear: newport_clear,
23519 - con_putc: newport_putc,
23520 - con_putcs: newport_putcs,
23521 - con_cursor: newport_cursor,
23522 - con_scroll: newport_scroll,
23523 - con_bmove: newport_bmove,
23524 - con_switch: newport_switch,
23525 - con_blank: newport_blank,
23526 - con_font_op: newport_font_op,
23527 - con_set_palette: newport_set_palette,
23528 - con_scrolldelta: newport_scrolldelta,
23529 - con_set_origin: DUMMY,
23530 - con_save_screen: DUMMY
23531 + .con_startup = newport_startup,
23532 + .con_init = newport_init,
23533 + .con_deinit = newport_deinit,
23534 + .con_clear = newport_clear,
23535 + .con_putc = newport_putc,
23536 + .con_putcs = newport_putcs,
23537 + .con_cursor = newport_cursor,
23538 + .con_scroll = newport_scroll,
23539 + .con_bmove = newport_bmove,
23540 + .con_switch = newport_switch,
23541 + .con_blank = newport_blank,
23542 + .con_font_op = newport_font_op,
23543 + .con_set_palette = newport_set_palette,
23544 + .con_scrolldelta = newport_scrolldelta,
23545 + .con_set_origin = DUMMY,
23546 + .con_save_screen = DUMMY
23550 static int __init newport_console_init(void)
23552 take_over_console(&newport_con, 0, MAX_NR_CONSOLES - 1, 1);
23557 static void __exit newport_console_exit(void)
23559 give_up_console(&newport_con);
23560 + iounmap((void *)npregs);
23563 module_init(newport_console_init);
23564 --- a/drivers/video/tgafb.c
23565 +++ b/drivers/video/tgafb.c
23567 #include <linux/console.h>
23568 #include <asm/io.h>
23571 +#include <asm/dec/tc.h>
23573 +static int search_tc_card(const char *) { return -1; }
23574 +static void claim_tc_card(int) { }
23575 +static void release_tc_card(int) { }
23576 +static unsigned long get_tc_base_addr(int) { return 0; }
23579 #include <video/fbcon.h>
23580 #include <video/fbcon-cfb8.h>
23581 #include <video/fbcon-cfb32.h>
23582 @@ -84,10 +93,10 @@ static unsigned int fb_offset_presets[4]
23585 static unsigned int deep_presets[4] = {
23595 static unsigned int rasterop_presets[4] = {
23596 @@ -131,6 +140,13 @@ static struct {
23598 FB_VMODE_NONINTERLACED
23600 + { "1280x1024-72", { /* mode #0 of PMAGD boards */
23601 + 1280, 1024, 1280, 1024, 0, 0, 0, 0,
23602 + {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
23603 + 0, 0, -1, -1, FB_ACCELF_TEXT, 7692, 232, 32, 34, 3, 160, 3,
23604 + FB_SYNC_ON_GREEN,
23605 + FB_VMODE_NONINTERLACED
23608 800, 600, 800, 600, 0, 0, 0, 0,
23609 {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
23610 @@ -488,7 +504,8 @@ static void tgafb_set_par(const void *fb
23614 - TGA_WRITE_REG(deep_presets[fb_info.tga_type], TGA_DEEP_REG);
23615 + TGA_WRITE_REG(deep_presets[fb_info.tga_type] |
23616 + (par->sync_on_green ? 0x0 : 0x00010000), TGA_DEEP_REG);
23617 while (TGA_READ_REG(TGA_CMD_STAT_REG) & 1) /* wait for not busy */
23620 @@ -548,7 +565,7 @@ static void tgafb_set_par(const void *fb
23621 BT463_WRITE(BT463_REG_ACC, BT463_CMD_REG_0, 0x40);
23622 BT463_WRITE(BT463_REG_ACC, BT463_CMD_REG_1, 0x08);
23623 BT463_WRITE(BT463_REG_ACC, BT463_CMD_REG_2,
23624 - (par->sync_on_green ? 0x80 : 0x40));
23625 + (par->sync_on_green ? 0xc0 : 0x40));
23627 BT463_WRITE(BT463_REG_ACC, BT463_READ_MASK_0, 0xff);
23628 BT463_WRITE(BT463_REG_ACC, BT463_READ_MASK_1, 0xff);
23629 @@ -921,19 +938,34 @@ int __init tgafb_setup(char *options) {
23630 int __init tgafb_init(void)
23632 struct pci_dev *pdev;
23635 pdev = pci_find_device(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TGA, NULL);
23637 + slot = search_tc_card("PMAGD");
23638 + if (!pdev && slot < 0)
23641 /* divine board type */
23643 - fb_info.tga_mem_base = (unsigned long)ioremap(pdev->resource[0].start, 0);
23644 - fb_info.tga_type = (readl(fb_info.tga_mem_base) >> 12) & 0x0f;
23645 - fb_info.tga_regs_base = fb_info.tga_mem_base + TGA_REGS_OFFSET;
23646 - fb_info.tga_fb_base = (fb_info.tga_mem_base
23648 + fb_info.tga_mem_base = (unsigned long)ioremap(pdev->resource[0].start,
23650 + fb_info.tga_type = (readl(fb_info.tga_mem_base) >> 12) & 0x0f;
23651 + fb_info.tga_regs_base = fb_info.tga_mem_base + TGA_REGS_OFFSET;
23652 + fb_info.tga_fb_base = (fb_info.tga_mem_base
23653 + fb_offset_presets[fb_info.tga_type]);
23654 - pci_read_config_byte(pdev, PCI_REVISION_ID, &fb_info.tga_chip_rev);
23655 + pci_read_config_byte(pdev, PCI_REVISION_ID, &fb_info.tga_chip_rev);
23658 + claim_tc_card(slot);
23659 + fb_info.tga_mem_base = get_tc_base_addr(slot);
23660 + fb_info.tga_type = (readl(fb_info.tga_mem_base) >> 12) & 0x0f; /* ? */
23661 + fb_info.tga_regs_base = fb_info.tga_mem_base + TGA_REGS_OFFSET;
23662 + fb_info.tga_fb_base = (fb_info.tga_mem_base
23663 + + fb_offset_presets[fb_info.tga_type]);
23664 + fb_info.tga_chip_rev = TGA_READ_REG(TGA_START_REG) & 0xff;
23667 /* setup framebuffer */
23669 @@ -950,40 +982,62 @@ int __init tgafb_init(void)
23670 fb_info.gen.fbhw = &tgafb_hwswitch;
23671 fb_info.gen.fbhw->detect();
23673 - printk (KERN_INFO "tgafb: DC21030 [TGA] detected, rev=0x%02x\n", fb_info.tga_chip_rev);
23674 - printk (KERN_INFO "tgafb: at PCI bus %d, device %d, function %d\n",
23675 - pdev->bus->number, PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));
23677 + printk (KERN_INFO "tgafb: DC21030 [TGA] detected, rev=0x%02x\n",
23678 + fb_info.tga_chip_rev);
23679 + printk (KERN_INFO "tgafb: at PCI bus %d, device %d, function %d\n",
23680 + pdev->bus->number,
23681 + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));
23683 + printk (KERN_INFO "tgafb: SFB+ detected, rev=0x%02x\n",
23684 + fb_info.tga_chip_rev);
23687 switch (fb_info.tga_type)
23689 case TGA_TYPE_8PLANE:
23690 - strcpy (fb_info.gen.info.modename,"Digital ZLXp-E1");
23692 + strcpy (fb_info.gen.info.modename,"Digital ZLXp-E1");
23694 + strcpy (fb_info.gen.info.modename,"Digital ZLX-E1");
23697 case TGA_TYPE_24PLANE:
23698 - strcpy (fb_info.gen.info.modename,"Digital ZLXp-E2");
23700 + strcpy (fb_info.gen.info.modename,"Digital ZLXp-E2");
23702 + strcpy (fb_info.gen.info.modename,"Digital ZLX-E2");
23705 case TGA_TYPE_24PLUSZ:
23706 - strcpy (fb_info.gen.info.modename,"Digital ZLXp-E3");
23708 + strcpy (fb_info.gen.info.modename,"Digital ZLXp-E3");
23710 + strcpy (fb_info.gen.info.modename,"Digital ZLX-E3");
23714 /* This should give a reasonable default video mode */
23716 if (!default_var_valid) {
23717 - default_var = tgafb_predefined[0].var;
23719 + default_var = tgafb_predefined[0].var;
23721 + default_var = tgafb_predefined[1].var;
23723 fbgen_get_var(&disp.var, -1, &fb_info.gen.info);
23724 disp.var.activate = FB_ACTIVATE_NOW;
23725 fbgen_do_set_var(&disp.var, 1, &fb_info.gen);
23726 fbgen_set_disp(-1, &fb_info.gen);
23727 fbgen_install_cmap(0, &fb_info.gen);
23728 - if (register_framebuffer(&fb_info.gen.info) < 0)
23729 + if (register_framebuffer(&fb_info.gen.info) < 0) {
23731 + release_tc_card(slot);
23733 - printk(KERN_INFO "fb%d: %s frame buffer device at 0x%lx\n",
23735 + printk(KERN_INFO "fb%d: %s frame buffer device at 0x%llx\n",
23736 GET_FB_IDX(fb_info.gen.info.node), fb_info.gen.info.modename,
23737 - pdev->resource[0].start);
23738 + fb_info.tga_mem_base);
23742 --- a/drivers/video/tgafb.h
23743 +++ b/drivers/video/tgafb.h
23745 #define TGA_RASTEROP_REG 0x0034
23746 #define TGA_PIXELSHIFT_REG 0x0038
23747 #define TGA_DEEP_REG 0x0050
23748 +#define TGA_START_REG 0x0054
23749 #define TGA_PIXELMASK_REG 0x005c
23750 #define TGA_CURSOR_BASE_REG 0x0060
23751 #define TGA_HORIZ_REG 0x0064
23752 --- a/fs/binfmt_elf.c
23753 +++ b/fs/binfmt_elf.c
23754 @@ -665,6 +665,9 @@ static int load_elf_binary(struct linux_
23759 + /* Executables without an interpreter also need a personality */
23760 + SET_PERSONALITY(elf_ex, ibcs2_interpreter);
23763 /* Flush all traces of the currently running executable */
23764 @@ -1225,7 +1228,11 @@ static int elf_core_dump(long signr, str
23766 elf.e_phoff = sizeof(elf);
23768 +#ifdef ELF_CORE_EFLAGS
23769 + elf.e_flags = ELF_CORE_EFLAGS;
23773 elf.e_ehsize = sizeof(elf);
23774 elf.e_phentsize = sizeof(struct elf_phdr);
23775 elf.e_phnum = segs+1; /* Include notes */
23776 --- a/fs/partitions/sgi.c
23777 +++ b/fs/partitions/sgi.c
23782 +#if CONFIG_BLK_DEV_MD
23783 +extern void md_autodetect_dev(kdev_t dev);
23787 int sgi_partition(struct gendisk *hd, struct block_device *bdev, unsigned long first_sector, int current_minor)
23789 int i, csum, magic;
23790 @@ -77,6 +82,10 @@ int sgi_partition(struct gendisk *hd, st
23793 add_gd_partition(hd, current_minor, start, blocks);
23794 +#ifdef CONFIG_BLK_DEV_MD
23795 + if (be32_to_cpu(p->type) == LINUX_RAID_PARTITION)
23796 + md_autodetect_dev(MKDEV(hd->major, current_minor));
23801 --- a/fs/proc/array.c
23802 +++ b/fs/proc/array.c
23803 @@ -368,15 +368,15 @@ int proc_pid_stat(struct task_struct *ta
23807 - task->times.tms_utime,
23808 - task->times.tms_stime,
23809 - task->times.tms_cutime,
23810 - task->times.tms_cstime,
23811 + hz_to_std(task->times.tms_utime),
23812 + hz_to_std(task->times.tms_stime),
23813 + hz_to_std(task->times.tms_cutime),
23814 + hz_to_std(task->times.tms_cstime),
23818 task->it_real_value,
23819 - task->start_time,
23820 + hz_to_std(task->start_time),
23822 mm ? mm->rss : 0, /* you might want to shift this left 3 */
23823 task->rlim[RLIMIT_RSS].rlim_cur,
23824 @@ -615,14 +615,14 @@ int proc_pid_cpu(struct task_struct *tas
23826 len = sprintf(buffer,
23828 - task->times.tms_utime,
23829 - task->times.tms_stime);
23830 + hz_to_std(task->times.tms_utime),
23831 + hz_to_std(task->times.tms_stime));
23833 for (i = 0 ; i < smp_num_cpus; i++)
23834 len += sprintf(buffer + len, "cpu%d %lu %lu\n",
23836 - task->per_cpu_utime[cpu_logical_map(i)],
23837 - task->per_cpu_stime[cpu_logical_map(i)]);
23838 + hz_to_std(task->per_cpu_utime[cpu_logical_map(i)]),
23839 + hz_to_std(task->per_cpu_stime[cpu_logical_map(i)]));
23843 --- a/fs/proc/proc_misc.c
23844 +++ b/fs/proc/proc_misc.c
23845 @@ -308,16 +308,16 @@ static int kstat_read_proc(char *page, c
23848 extern unsigned long total_forks;
23849 - unsigned long jif = jiffies;
23850 + unsigned long jif = hz_to_std(jiffies);
23851 unsigned int sum = 0, user = 0, nice = 0, system = 0;
23854 for (i = 0 ; i < smp_num_cpus; i++) {
23855 int cpu = cpu_logical_map(i), j;
23857 - user += kstat.per_cpu_user[cpu];
23858 - nice += kstat.per_cpu_nice[cpu];
23859 - system += kstat.per_cpu_system[cpu];
23860 + user += hz_to_std(kstat.per_cpu_user[cpu]);
23861 + nice += hz_to_std(kstat.per_cpu_nice[cpu]);
23862 + system += hz_to_std(kstat.per_cpu_system[cpu]);
23863 #if !defined(CONFIG_ARCH_S390)
23864 for (j = 0 ; j < NR_IRQS ; j++)
23865 sum += kstat.irqs[cpu][j];
23866 @@ -331,10 +331,10 @@ static int kstat_read_proc(char *page, c
23867 proc_sprintf(page, &off, &len,
23868 "cpu%d %u %u %u %lu\n",
23870 - kstat.per_cpu_user[cpu_logical_map(i)],
23871 - kstat.per_cpu_nice[cpu_logical_map(i)],
23872 - kstat.per_cpu_system[cpu_logical_map(i)],
23873 - jif - ( kstat.per_cpu_user[cpu_logical_map(i)] \
23874 + hz_to_std(kstat.per_cpu_user[cpu_logical_map(i)]),
23875 + hz_to_std(kstat.per_cpu_nice[cpu_logical_map(i)]),
23876 + hz_to_std(kstat.per_cpu_system[cpu_logical_map(i)]),
23877 + jif - hz_to_std( kstat.per_cpu_user[cpu_logical_map(i)] \
23878 + kstat.per_cpu_nice[cpu_logical_map(i)] \
23879 + kstat.per_cpu_system[cpu_logical_map(i)]));
23880 proc_sprintf(page, &off, &len,
23881 --- a/include/asm-alpha/param.h
23882 +++ b/include/asm-alpha/param.h
23888 +# define hz_to_std(a) (a)
23892 #define EXEC_PAGESIZE 8192
23893 --- a/include/asm-i386/param.h
23894 +++ b/include/asm-i386/param.h
23900 +#define hz_to_std(a) (a)
23904 #define EXEC_PAGESIZE 4096
23905 --- a/include/asm-ia64/param.h
23906 +++ b/include/asm-ia64/param.h
23908 * Based on <asm-i386/param.h>.
23910 * Modified 1998, 1999, 2002-2003
23911 - * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
23912 + * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
23915 +#include <linux/config.h>
23918 +#define hz_to_std(a) (a)
23921 #define EXEC_PAGESIZE 65536
23924 --- a/include/asm-m68k/param.h
23925 +++ b/include/asm-m68k/param.h
23931 +#define hz_to_std(a) (a)
23935 #define EXEC_PAGESIZE 8192
23936 --- a/include/asm-mips/au1000_gpio.h
23937 +++ b/include/asm-mips/au1000_gpio.h
23939 * 675 Mass Ave, Cambridge, MA 02139, USA.
23943 + * Revision history
23944 + * 01/31/02 0.01 Initial release. Steve Longerbeam, MontaVista
23945 + * 10/12/03 0.1 Added Au1100/Au1500, GPIO2, and bit operations. K.C. Nishio, AMD
23946 + * 08/05/04 0.11 Added Au1550 and Au1200. K.C. Nishio
23949 #ifndef __AU1000_GPIO_H
23950 #define __AU1000_GPIO_H
23952 @@ -44,13 +51,94 @@
23953 #define AU1000GPIO_TRISTATE _IOW (AU1000GPIO_IOC_MAGIC, 4, int)
23954 #define AU1000GPIO_AVAIL_MASK _IOR (AU1000GPIO_IOC_MAGIC, 5, int)
23957 +#define AU1000GPIO_BIT_READ _IOW (AU1000GPIO_IOC_MAGIC, 6, int)
23958 +#define AU1000GPIO_BIT_SET _IOW (AU1000GPIO_IOC_MAGIC, 7, int)
23959 +#define AU1000GPIO_BIT_CLEAR _IOW (AU1000GPIO_IOC_MAGIC, 8, int)
23960 +#define AU1000GPIO_BIT_TRISTATE _IOW (AU1000GPIO_IOC_MAGIC, 9, int)
23961 +#define AU1000GPIO_BIT_INIT _IOW (AU1000GPIO_IOC_MAGIC, 10, int)
23962 +#define AU1000GPIO_BIT_TERM _IOW (AU1000GPIO_IOC_MAGIC, 11, int)
23964 +/* set this major numer same as the CRIS GPIO driver */
23965 +#define AU1X00_GPIO_MAJOR (120)
23967 +#define ENABLED_ZERO (0)
23968 +#define ENABLED_ONE (1)
23969 +#define ENABLED_10 (0x2)
23970 +#define ENABLED_11 (0x3)
23971 +#define ENABLED_111 (0x7)
23972 +#define NOT_AVAIL (-1)
23973 +#define AU1X00_MAX_PRIMARY_GPIO (32)
23975 +#define AU1000_GPIO_MINOR_MAX AU1X00_MAX_PRIMARY_GPIO
23976 +/* Au1100, 1500, 1550 and 1200 have the secondary GPIO block */
23977 +#define AU1XX0_GPIO_MINOR_MAX (48)
23979 +#define AU1X00_GPIO_NAME "gpio"
23981 +/* GPIO pins which are not multiplexed */
23982 +#if defined(CONFIG_SOC_AU1000)
23983 + #define NATIVE_GPIOPIN ((1 << 15) | (1 << 8) | (1 << 7) | (1 << 1) | (1 << 0))
23984 + #define NATIVE_GPIO2PIN (0)
23985 +#elif defined(CONFIG_SOC_AU1100)
23986 + #define NATIVE_GPIOPIN ((1 << 23) | (1 << 22) | (1 << 21) | (1 << 20) | (1 << 19) | (1 << 18) | \
23987 + (1 << 17) | (1 << 16) | (1 << 7) | (1 << 1) | (1 << 0))
23988 + #define NATIVE_GPIO2PIN (0)
23989 +#elif defined(CONFIG_SOC_AU1500)
23990 + #define NATIVE_GPIOPIN ((1 << 15) | (1 << 8) | (1 << 7) | (1 << 1) | (1 << 0))
23991 + /* exclude the PCI reset output signal: GPIO[200], DMA_REQ2 and DMA_REQ3 */
23992 + #define NATIVE_GPIO2PIN (0xfffe & ~((1 << 9) | (1 << 8)))
23993 +#elif defined(CONFIG_SOC_AU1550)
23994 + #define NATIVE_GPIOPIN ((1 << 15) | (1 << 8) | (1 << 7) | (1 << 6) | (1 << 1) | (1 << 0))
23995 + /* please refere Au1550 Data Book, chapter 15 */
23996 + #define NATIVE_GPIO2PIN (1 << 5)
23997 +#elif defined(CONFIG_SOC_AU1200)
23998 + #define NATIVE_GPIOPIN ((1 << 7) | (1 << 5))
23999 + #define NATIVE_GPIO2PIN (0)
24002 +/* minor as u32 */
24003 +#define MINOR_TO_GPIOPIN(minor) ((minor < AU1X00_MAX_PRIMARY_GPIO) ? minor : (minor - AU1X00_MAX_PRIMARY_GPIO))
24004 +#define IS_PRIMARY_GPIOPIN(minor) ((minor < AU1X00_MAX_PRIMARY_GPIO) ? 1 : 0)
24007 + * pin to minor mapping.
24008 + * GPIO0-GPIO31, minor=0-31.
24009 + * GPIO200-GPIO215, minor=32-47.
24011 +typedef struct _au1x00_gpio_bit_ctl {
24012 + int direction; // The direction of this GPIO pin. 0: IN, 1: OUT.
24013 + int data; // Pin output when itized (0/1), or at the term. 0/1/-1 (tristate).
24014 +} au1x00_gpio_bit_ctl;
24016 +typedef struct _au1x00_gpio_driver {
24017 + const char *driver_name;
24018 + const char *name;
24019 + int name_base; /* offset of printed name */
24020 + short major; /* major device number */
24021 + short minor_start; /* start of minor device number*/
24022 + short num; /* number of devices */
24023 +} au1x00_gpio_driver;
24026 -extern u32 get_au1000_avail_gpio_mask(void);
24027 -extern int au1000gpio_tristate(u32 data);
24028 -extern int au1000gpio_in(u32 *data);
24029 -extern int au1000gpio_set(u32 data);
24030 -extern int au1000gpio_clear(u32 data);
24031 -extern int au1000gpio_out(u32 data);
24032 +extern u32 get_au1000_avail_gpio_mask(u32 *avail_gpio2);
24033 +extern int au1000gpio_tristate(u32 minor, u32 data);
24034 +extern int au1000gpio_in(u32 minor, u32 *data);
24035 +extern int au1000gpio_set(u32 minor, u32 data);
24036 +extern int au1000gpio_clear(u32 minor, u32 data);
24037 +extern int au1000gpio_out(u32 minor, u32 data);
24038 +extern int au1000gpio_bit_read(u32 minor, u32 *read_data);
24039 +extern int au1000gpio_bit_set(u32 minor);
24040 +extern int au1000gpio_bit_clear(u32 minor);
24041 +extern int au1000gpio_bit_tristate(u32 minor);
24042 +extern int check_minor_to_gpio(u32 minor);
24043 +extern int au1000gpio_bit_init(u32 minor, au1x00_gpio_bit_ctl *bit_opt);
24044 +extern int au1000gpio_bit_term(u32 minor, au1x00_gpio_bit_ctl *bit_opt);
24046 +extern void gpio_register_devfs (au1x00_gpio_driver *driver, unsigned int flags, unsigned minor);
24047 +extern void gpio_unregister_devfs (au1x00_gpio_driver *driver, unsigned minor);
24048 +extern int gpio_register_driver(au1x00_gpio_driver *driver);
24049 +extern int gpio_unregister_driver(au1x00_gpio_driver *driver);
24053 --- a/include/asm-mips/au1000.h
24054 +++ b/include/asm-mips/au1000.h
24055 @@ -160,28 +160,356 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24056 #define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5)
24059 -/* SDRAM Controller */
24061 + * SDRAM Register Offsets
24063 #if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1100)
24064 -#define MEM_SDMODE0 0xB4000000
24065 -#define MEM_SDMODE1 0xB4000004
24066 -#define MEM_SDMODE2 0xB4000008
24068 -#define MEM_SDADDR0 0xB400000C
24069 -#define MEM_SDADDR1 0xB4000010
24070 -#define MEM_SDADDR2 0xB4000014
24072 -#define MEM_SDREFCFG 0xB4000018
24073 -#define MEM_SDPRECMD 0xB400001C
24074 -#define MEM_SDAUTOREF 0xB4000020
24076 -#define MEM_SDWRMD0 0xB4000024
24077 -#define MEM_SDWRMD1 0xB4000028
24078 -#define MEM_SDWRMD2 0xB400002C
24079 +#define MEM_SDMODE0 (0x0000)
24080 +#define MEM_SDMODE1 (0x0004)
24081 +#define MEM_SDMODE2 (0x0008)
24082 +#define MEM_SDADDR0 (0x000C)
24083 +#define MEM_SDADDR1 (0x0010)
24084 +#define MEM_SDADDR2 (0x0014)
24085 +#define MEM_SDREFCFG (0x0018)
24086 +#define MEM_SDPRECMD (0x001C)
24087 +#define MEM_SDAUTOREF (0x0020)
24088 +#define MEM_SDWRMD0 (0x0024)
24089 +#define MEM_SDWRMD1 (0x0028)
24090 +#define MEM_SDWRMD2 (0x002C)
24091 +#define MEM_SDSLEEP (0x0030)
24092 +#define MEM_SDSMCKE (0x0034)
24095 +/*typedef volatile struct
24104 + uint32 sdautoref;
24115 + * MEM_SDMODE register content definitions
24117 +#define MEM_SDMODE_F (1<<22)
24118 +#define MEM_SDMODE_SR (1<<21)
24119 +#define MEM_SDMODE_BS (1<<20)
24120 +#define MEM_SDMODE_RS (3<<18)
24121 +#define MEM_SDMODE_CS (7<<15)
24122 +#define MEM_SDMODE_TRAS (15<<11)
24123 +#define MEM_SDMODE_TMRD (3<<9)
24124 +#define MEM_SDMODE_TWR (3<<7)
24125 +#define MEM_SDMODE_TRP (3<<5)
24126 +#define MEM_SDMODE_TRCD (3<<3)
24127 +#define MEM_SDMODE_TCL (7<<0)
24129 +#define MEM_SDMODE_BS_2Bank (0<<20)
24130 +#define MEM_SDMODE_BS_4Bank (1<<20)
24131 +#define MEM_SDMODE_RS_11Row (0<<18)
24132 +#define MEM_SDMODE_RS_12Row (1<<18)
24133 +#define MEM_SDMODE_RS_13Row (2<<18)
24134 +#define MEM_SDMODE_RS_N(N) ((N)<<18)
24135 +#define MEM_SDMODE_CS_7Col (0<<15)
24136 +#define MEM_SDMODE_CS_8Col (1<<15)
24137 +#define MEM_SDMODE_CS_9Col (2<<15)
24138 +#define MEM_SDMODE_CS_10Col (3<<15)
24139 +#define MEM_SDMODE_CS_11Col (4<<15)
24140 +#define MEM_SDMODE_CS_N(N) ((N)<<15)
24141 +#define MEM_SDMODE_TRAS_N(N) ((N)<<11)
24142 +#define MEM_SDMODE_TMRD_N(N) ((N)<<9)
24143 +#define MEM_SDMODE_TWR_N(N) ((N)<<7)
24144 +#define MEM_SDMODE_TRP_N(N) ((N)<<5)
24145 +#define MEM_SDMODE_TRCD_N(N) ((N)<<3)
24146 +#define MEM_SDMODE_TCL_N(N) ((N)<<0)
24149 + * MEM_SDADDR register contents definitions
24151 +#define MEM_SDADDR_E (1<<20)
24152 +#define MEM_SDADDR_CSBA (0x03FF<<10)
24153 +#define MEM_SDADDR_CSMASK (0x03FF<<0)
24154 +#define MEM_SDADDR_CSBA_N(N) ((N)&(0x03FF<<22)>>12)
24155 +#define MEM_SDADDR_CSMASK_N(N) ((N)&(0x03FF<<22)>>22)
24158 + * MEM_SDREFCFG register content definitions
24160 +#define MEM_SDREFCFG_TRC (15<<28)
24161 +#define MEM_SDREFCFG_TRPM (3<<26)
24162 +#define MEM_SDREFCFG_E (1<<25)
24163 +#define MEM_SDREFCFG_RE (0x1ffffff<<0)
24164 +#define MEM_SDREFCFG_TRC_N(N) ((N)<<MEM_SDREFCFG_TRC)
24165 +#define MEM_SDREFCFG_TRPM_N(N) ((N)<<MEM_SDREFCFG_TRPM)
24166 +#define MEM_SDREFCFG_REF_N(N) (N)
24169 +/***********************************************************************/
24172 + * Au1550 SDRAM Register Offsets
24175 +/***********************************************************************/
24177 +#if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200)
24178 +#define MEM_SDMODE0 (0x0800)
24179 +#define MEM_SDMODE1 (0x0808)
24180 +#define MEM_SDMODE2 (0x0810)
24181 +#define MEM_SDADDR0 (0x0820)
24182 +#define MEM_SDADDR1 (0x0828)
24183 +#define MEM_SDADDR2 (0x0830)
24184 +#define MEM_SDCONFIGA (0x0840)
24185 +#define MEM_SDCONFIGB (0x0848)
24186 +#define MEM_SDSTAT (0x0850)
24187 +#define MEM_SDERRADDR (0x0858)
24188 +#define MEM_SDSTRIDE0 (0x0860)
24189 +#define MEM_SDSTRIDE1 (0x0868)
24190 +#define MEM_SDSTRIDE2 (0x0870)
24191 +#define MEM_SDWRMD0 (0x0880)
24192 +#define MEM_SDWRMD1 (0x0888)
24193 +#define MEM_SDWRMD2 (0x0890)
24194 +#define MEM_SDPRECMD (0x08C0)
24195 +#define MEM_SDAUTOREF (0x08C8)
24196 +#define MEM_SDSREF (0x08D0)
24197 +#define MEM_SDSLEEP MEM_SDSREF
24200 +/*typedef volatile struct
24203 + uint32 reserved0;
24205 + uint32 reserved1;
24207 + uint32 reserved2[3];
24209 + uint32 reserved3;
24211 + uint32 reserved4;
24213 + uint32 reserved5[3];
24214 + uint32 sdconfiga;
24215 + uint32 reserved6;
24216 + uint32 sdconfigb;
24217 + uint32 reserved7;
24219 + uint32 reserved8;
24220 + uint32 sderraddr;
24221 + uint32 reserved9;
24222 + uint32 sdstride0;
24223 + uint32 reserved10;
24224 + uint32 sdstride1;
24225 + uint32 reserved11;
24226 + uint32 sdstride2;
24227 + uint32 reserved12[3];
24229 + uint32 reserved13;
24231 + uint32 reserved14;
24233 + uint32 reserved15[11];
24235 + uint32 reserved16;
24236 + uint32 sdautoref;
24237 + uint32 reserved17;
24245 + * Physical base addresses for integrated peripherals
24248 +#ifdef CONFIG_SOC_AU1000
24249 +#define MEM_PHYS_ADDR 0x14000000
24250 +#define STATIC_MEM_PHYS_ADDR 0x14001000
24251 +#define DMA0_PHYS_ADDR 0x14002000
24252 +#define DMA1_PHYS_ADDR 0x14002100
24253 +#define DMA2_PHYS_ADDR 0x14002200
24254 +#define DMA3_PHYS_ADDR 0x14002300
24255 +#define DMA4_PHYS_ADDR 0x14002400
24256 +#define DMA5_PHYS_ADDR 0x14002500
24257 +#define DMA6_PHYS_ADDR 0x14002600
24258 +#define DMA7_PHYS_ADDR 0x14002700
24259 +#define IC0_PHYS_ADDR 0x10400000
24260 +#define IC1_PHYS_ADDR 0x11800000
24261 +#define AC97_PHYS_ADDR 0x10000000
24262 +#define USBH_PHYS_ADDR 0x10100000
24263 +#define USBD_PHYS_ADDR 0x10200000
24264 +#define IRDA_PHYS_ADDR 0x10300000
24265 +#define MAC0_PHYS_ADDR 0x10500000
24266 +#define MAC1_PHYS_ADDR 0x10510000
24267 +#define MACEN_PHYS_ADDR 0x10520000
24268 +#define MACDMA0_PHYS_ADDR 0x14004000
24269 +#define MACDMA1_PHYS_ADDR 0x14004200
24270 +#define I2S_PHYS_ADDR 0x11000000
24271 +#define UART0_PHYS_ADDR 0x11100000
24272 +#define UART1_PHYS_ADDR 0x11200000
24273 +#define UART2_PHYS_ADDR 0x11300000
24274 +#define UART3_PHYS_ADDR 0x11400000
24275 +#define SSI0_PHYS_ADDR 0x11600000
24276 +#define SSI1_PHYS_ADDR 0x11680000
24277 +#define SYS_PHYS_ADDR 0x11900000
24278 +#define PCMCIA_IO_PHYS_ADDR 0xF00000000
24279 +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
24280 +#define PCMCIA_MEM_PHYS_ADDR 0xF80000000
24283 +/********************************************************************/
24285 -#define MEM_SDSLEEP 0xB4000030
24286 -#define MEM_SDSMCKE 0xB4000034
24287 +#ifdef CONFIG_SOC_AU1500
24288 +#define MEM_PHYS_ADDR 0x14000000
24289 +#define STATIC_MEM_PHYS_ADDR 0x14001000
24290 +#define DMA0_PHYS_ADDR 0x14002000
24291 +#define DMA1_PHYS_ADDR 0x14002100
24292 +#define DMA2_PHYS_ADDR 0x14002200
24293 +#define DMA3_PHYS_ADDR 0x14002300
24294 +#define DMA4_PHYS_ADDR 0x14002400
24295 +#define DMA5_PHYS_ADDR 0x14002500
24296 +#define DMA6_PHYS_ADDR 0x14002600
24297 +#define DMA7_PHYS_ADDR 0x14002700
24298 +#define IC0_PHYS_ADDR 0x10400000
24299 +#define IC1_PHYS_ADDR 0x11800000
24300 +#define AC97_PHYS_ADDR 0x10000000
24301 +#define USBH_PHYS_ADDR 0x10100000
24302 +#define USBD_PHYS_ADDR 0x10200000
24303 +#define PCI_PHYS_ADDR 0x14005000
24304 +#define MAC0_PHYS_ADDR 0x11500000
24305 +#define MAC1_PHYS_ADDR 0x11510000
24306 +#define MACEN_PHYS_ADDR 0x11520000
24307 +#define MACDMA0_PHYS_ADDR 0x14004000
24308 +#define MACDMA1_PHYS_ADDR 0x14004200
24309 +#define I2S_PHYS_ADDR 0x11000000
24310 +#define UART0_PHYS_ADDR 0x11100000
24311 +#define UART3_PHYS_ADDR 0x11400000
24312 +#define GPIO2_PHYS_ADDR 0x11700000
24313 +#define SYS_PHYS_ADDR 0x11900000
24314 +#define PCI_MEM_PHYS_ADDR 0x400000000
24315 +#define PCI_IO_PHYS_ADDR 0x500000000
24316 +#define PCI_CONFIG0_PHYS_ADDR 0x600000000
24317 +#define PCI_CONFIG1_PHYS_ADDR 0x680000000
24318 +#define PCMCIA_IO_PHYS_ADDR 0xF00000000
24319 +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
24320 +#define PCMCIA_MEM_PHYS_ADDR 0xF80000000
24323 +/********************************************************************/
24325 +#ifdef CONFIG_SOC_AU1100
24326 +#define MEM_PHYS_ADDR 0x14000000
24327 +#define STATIC_MEM_PHYS_ADDR 0x14001000
24328 +#define DMA0_PHYS_ADDR 0x14002000
24329 +#define DMA1_PHYS_ADDR 0x14002100
24330 +#define DMA2_PHYS_ADDR 0x14002200
24331 +#define DMA3_PHYS_ADDR 0x14002300
24332 +#define DMA4_PHYS_ADDR 0x14002400
24333 +#define DMA5_PHYS_ADDR 0x14002500
24334 +#define DMA6_PHYS_ADDR 0x14002600
24335 +#define DMA7_PHYS_ADDR 0x14002700
24336 +#define IC0_PHYS_ADDR 0x10400000
24337 +#define SD0_PHYS_ADDR 0x10600000
24338 +#define SD1_PHYS_ADDR 0x10680000
24339 +#define IC1_PHYS_ADDR 0x11800000
24340 +#define AC97_PHYS_ADDR 0x10000000
24341 +#define USBH_PHYS_ADDR 0x10100000
24342 +#define USBD_PHYS_ADDR 0x10200000
24343 +#define IRDA_PHYS_ADDR 0x10300000
24344 +#define MAC0_PHYS_ADDR 0x10500000
24345 +#define MACEN_PHYS_ADDR 0x10520000
24346 +#define MACDMA0_PHYS_ADDR 0x14004000
24347 +#define MACDMA1_PHYS_ADDR 0x14004200
24348 +#define I2S_PHYS_ADDR 0x11000000
24349 +#define UART0_PHYS_ADDR 0x11100000
24350 +#define UART1_PHYS_ADDR 0x11200000
24351 +#define UART3_PHYS_ADDR 0x11400000
24352 +#define SSI0_PHYS_ADDR 0x11600000
24353 +#define SSI1_PHYS_ADDR 0x11680000
24354 +#define GPIO2_PHYS_ADDR 0x11700000
24355 +#define SYS_PHYS_ADDR 0x11900000
24356 +#define LCD_PHYS_ADDR 0x15000000
24357 +#define PCMCIA_IO_PHYS_ADDR 0xF00000000
24358 +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
24359 +#define PCMCIA_MEM_PHYS_ADDR 0xF80000000
24362 +/***********************************************************************/
24364 +#ifdef CONFIG_SOC_AU1550
24365 +#define MEM_PHYS_ADDR 0x14000000
24366 +#define STATIC_MEM_PHYS_ADDR 0x14001000
24367 +#define IC0_PHYS_ADDR 0x10400000
24368 +#define IC1_PHYS_ADDR 0x11800000
24369 +#define USBH_PHYS_ADDR 0x14020000
24370 +#define USBD_PHYS_ADDR 0x10200000
24371 +#define PCI_PHYS_ADDR 0x14005000
24372 +#define MAC0_PHYS_ADDR 0x10500000
24373 +#define MAC1_PHYS_ADDR 0x10510000
24374 +#define MACEN_PHYS_ADDR 0x10520000
24375 +#define MACDMA0_PHYS_ADDR 0x14004000
24376 +#define MACDMA1_PHYS_ADDR 0x14004200
24377 +#define UART0_PHYS_ADDR 0x11100000
24378 +#define UART1_PHYS_ADDR 0x11200000
24379 +#define UART3_PHYS_ADDR 0x11400000
24380 +#define GPIO2_PHYS_ADDR 0x11700000
24381 +#define SYS_PHYS_ADDR 0x11900000
24382 +#define DDMA_PHYS_ADDR 0x14002000
24383 +#define PE_PHYS_ADDR 0x14008000
24384 +#define PSC0_PHYS_ADDR 0x11A00000
24385 +#define PSC1_PHYS_ADDR 0x11B00000
24386 +#define PSC2_PHYS_ADDR 0x10A00000
24387 +#define PSC3_PHYS_ADDR 0x10B00000
24388 +#define PCI_MEM_PHYS_ADDR 0x400000000
24389 +#define PCI_IO_PHYS_ADDR 0x500000000
24390 +#define PCI_CONFIG0_PHYS_ADDR 0x600000000
24391 +#define PCI_CONFIG1_PHYS_ADDR 0x680000000
24392 +#define PCMCIA_IO_PHYS_ADDR 0xF00000000
24393 +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
24394 +#define PCMCIA_MEM_PHYS_ADDR 0xF80000000
24397 +/***********************************************************************/
24399 +#ifdef CONFIG_SOC_AU1200
24400 +#define MEM_PHYS_ADDR 0x14000000
24401 +#define STATIC_MEM_PHYS_ADDR 0x14001000
24402 +#define AES_PHYS_ADDR 0x10300000
24403 +#define CIM_PHYS_ADDR 0x14004000
24404 +#define IC0_PHYS_ADDR 0x10400000
24405 +#define IC1_PHYS_ADDR 0x11800000
24406 +#define USBM_PHYS_ADDR 0x14020000
24407 +#define USBH_PHYS_ADDR 0x14020100
24408 +#define UART0_PHYS_ADDR 0x11100000
24409 +#define UART1_PHYS_ADDR 0x11200000
24410 +#define GPIO2_PHYS_ADDR 0x11700000
24411 +#define SYS_PHYS_ADDR 0x11900000
24412 +#define DDMA_PHYS_ADDR 0x14002000
24413 +#define PSC0_PHYS_ADDR 0x11A00000
24414 +#define PSC1_PHYS_ADDR 0x11B00000
24415 +#define PCMCIA_IO_PHYS_ADDR 0xF00000000
24416 +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
24417 +#define PCMCIA_MEM_PHYS_ADDR 0xF80000000
24418 +#define SD0_PHYS_ADDR 0x10600000
24419 +#define SD1_PHYS_ADDR 0x10680000
24420 +#define LCD_PHYS_ADDR 0x15000000
24421 +#define SWCNT_PHYS_ADDR 0x1110010C
24422 +#define MAEFE_PHYS_ADDR 0x14012000
24423 +#define MAEBE_PHYS_ADDR 0x14010000
24427 /* Static Bus Controller */
24428 #define MEM_STCFG0 0xB4001000
24429 #define MEM_STTIME0 0xB4001004
24430 @@ -367,7 +695,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24431 #define AU1000_MAC0_ENABLE 0xB0520000
24432 #define AU1000_MAC1_ENABLE 0xB0520004
24433 #define NUM_ETH_INTERFACES 2
24434 -#endif // CONFIG_SOC_AU1000
24435 +#endif /* CONFIG_SOC_AU1000 */
24438 #ifdef CONFIG_SOC_AU1500
24439 @@ -438,7 +766,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24440 #define AU1500_MAC0_ENABLE 0xB1520000
24441 #define AU1500_MAC1_ENABLE 0xB1520004
24442 #define NUM_ETH_INTERFACES 2
24443 -#endif // CONFIG_SOC_AU1500
24444 +#endif /* CONFIG_SOC_AU1500 */
24447 #ifdef CONFIG_SOC_AU1100
24448 @@ -483,6 +811,22 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24449 #define AU1000_GPIO_13 45
24450 #define AU1000_GPIO_14 46
24451 #define AU1000_GPIO_15 47
24452 +#define AU1000_GPIO_16 48
24453 +#define AU1000_GPIO_17 49
24454 +#define AU1000_GPIO_18 50
24455 +#define AU1000_GPIO_19 51
24456 +#define AU1000_GPIO_20 52
24457 +#define AU1000_GPIO_21 53
24458 +#define AU1000_GPIO_22 54
24459 +#define AU1000_GPIO_23 55
24460 +#define AU1000_GPIO_24 56
24461 +#define AU1000_GPIO_25 57
24462 +#define AU1000_GPIO_26 58
24463 +#define AU1000_GPIO_27 59
24464 +#define AU1000_GPIO_28 60
24465 +#define AU1000_GPIO_29 61
24466 +#define AU1000_GPIO_30 62
24467 +#define AU1000_GPIO_31 63
24469 #define UART0_ADDR 0xB1100000
24470 #define UART1_ADDR 0xB1200000
24471 @@ -494,7 +838,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24472 #define AU1100_ETH0_BASE 0xB0500000
24473 #define AU1100_MAC0_ENABLE 0xB0520000
24474 #define NUM_ETH_INTERFACES 1
24475 -#endif // CONFIG_SOC_AU1100
24476 +#endif /* CONFIG_SOC_AU1100 */
24478 #ifdef CONFIG_SOC_AU1550
24479 #define AU1550_UART0_INT 0
24480 @@ -511,14 +855,14 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24481 #define AU1550_PSC1_INT 11
24482 #define AU1550_PSC2_INT 12
24483 #define AU1550_PSC3_INT 13
24484 -#define AU1550_TOY_INT 14
24485 -#define AU1550_TOY_MATCH0_INT 15
24486 -#define AU1550_TOY_MATCH1_INT 16
24487 -#define AU1550_TOY_MATCH2_INT 17
24488 -#define AU1550_RTC_INT 18
24489 -#define AU1550_RTC_MATCH0_INT 19
24490 -#define AU1550_RTC_MATCH1_INT 20
24491 -#define AU1550_RTC_MATCH2_INT 21
24492 +#define AU1000_TOY_INT 14
24493 +#define AU1000_TOY_MATCH0_INT 15
24494 +#define AU1000_TOY_MATCH1_INT 16
24495 +#define AU1000_TOY_MATCH2_INT 17
24496 +#define AU1000_RTC_INT 18
24497 +#define AU1000_RTC_MATCH0_INT 19
24498 +#define AU1000_RTC_MATCH1_INT 20
24499 +#define AU1000_RTC_MATCH2_INT 21
24500 #define AU1550_NAND_INT 23
24501 #define AU1550_USB_DEV_REQ_INT 24
24502 #define AU1550_USB_DEV_SUS_INT 25
24503 @@ -573,7 +917,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24504 #define AU1550_MAC0_ENABLE 0xB0520000
24505 #define AU1550_MAC1_ENABLE 0xB0520004
24506 #define NUM_ETH_INTERFACES 2
24507 -#endif // CONFIG_SOC_AU1550
24508 +#endif /* CONFIG_SOC_AU1550 */
24510 #ifdef CONFIG_SOC_AU1200
24511 #define AU1200_UART0_INT 0
24512 @@ -590,14 +934,14 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24513 #define AU1200_PSC1_INT 11
24514 #define AU1200_AES_INT 12
24515 #define AU1200_CAMERA_INT 13
24516 -#define AU1200_TOY_INT 14
24517 -#define AU1200_TOY_MATCH0_INT 15
24518 -#define AU1200_TOY_MATCH1_INT 16
24519 -#define AU1200_TOY_MATCH2_INT 17
24520 -#define AU1200_RTC_INT 18
24521 -#define AU1200_RTC_MATCH0_INT 19
24522 -#define AU1200_RTC_MATCH1_INT 20
24523 -#define AU1200_RTC_MATCH2_INT 21
24524 +#define AU1000_TOY_INT 14
24525 +#define AU1000_TOY_MATCH0_INT 15
24526 +#define AU1000_TOY_MATCH1_INT 16
24527 +#define AU1000_TOY_MATCH2_INT 17
24528 +#define AU1000_RTC_INT 18
24529 +#define AU1000_RTC_MATCH0_INT 19
24530 +#define AU1000_RTC_MATCH1_INT 20
24531 +#define AU1000_RTC_MATCH2_INT 21
24532 #define AU1200_NAND_INT 23
24533 #define AU1200_GPIO_204 24
24534 #define AU1200_GPIO_205 25
24535 @@ -605,6 +949,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24536 #define AU1200_GPIO_207 27
24537 #define AU1200_GPIO_208_215 28 // Logical OR of 208:215
24538 #define AU1200_USB_INT 29
24539 +#define AU1000_USB_HOST_INT AU1200_USB_INT
24540 #define AU1200_LCD_INT 30
24541 #define AU1200_MAE_BOTH_INT 31
24542 #define AU1000_GPIO_0 32
24543 @@ -643,21 +988,36 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24544 #define UART0_ADDR 0xB1100000
24545 #define UART1_ADDR 0xB1200000
24547 -#define USB_OHCI_BASE 0x14020000 // phys addr for ioremap
24548 -#define USB_HOST_CONFIG 0xB4027ffc
24549 +#define USB_UOC_BASE 0x14020020
24550 +#define USB_UOC_LEN 0x20
24551 +#define USB_OHCI_BASE 0x14020100
24552 +#define USB_OHCI_LEN 0x100
24553 +#define USB_EHCI_BASE 0x14020200
24554 +#define USB_EHCI_LEN 0x100
24555 +#define USB_UDC_BASE 0x14022000
24556 +#define USB_UDC_LEN 0x2000
24557 +#define USB_MSR_BASE 0xB4020000
24558 +#define USB_MSR_MCFG 4
24559 +#define USBMSRMCFG_OMEMEN 0
24560 +#define USBMSRMCFG_OBMEN 1
24561 +#define USBMSRMCFG_EMEMEN 2
24562 +#define USBMSRMCFG_EBMEN 3
24563 +#define USBMSRMCFG_DMEMEN 4
24564 +#define USBMSRMCFG_DBMEN 5
24565 +#define USBMSRMCFG_GMEMEN 6
24566 +#define USBMSRMCFG_OHCCLKEN 16
24567 +#define USBMSRMCFG_EHCCLKEN 17
24568 +#define USBMSRMCFG_UDCCLKEN 18
24569 +#define USBMSRMCFG_PHYPLLEN 19
24570 +#define USBMSRMCFG_RDCOMB 30
24571 +#define USBMSRMCFG_PFEN 31
24573 -// these are here for prototyping on au1550 (do not exist on au1200)
24574 -#define AU1200_ETH0_BASE 0xB0500000
24575 -#define AU1200_ETH1_BASE 0xB0510000
24576 -#define AU1200_MAC0_ENABLE 0xB0520000
24577 -#define AU1200_MAC1_ENABLE 0xB0520004
24578 -#define NUM_ETH_INTERFACES 2
24579 -#endif // CONFIG_SOC_AU1200
24580 +#endif /* CONFIG_SOC_AU1200 */
24582 #define AU1000_LAST_INTC0_INT 31
24583 +#define AU1000_LAST_INTC1_INT 63
24584 #define AU1000_MAX_INTR 63
24587 /* Programmable Counters 0 and 1 */
24588 #define SYS_BASE 0xB1900000
24589 #define SYS_COUNTER_CNTRL (SYS_BASE + 0x14)
24590 @@ -728,6 +1088,8 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24591 #define I2S_CONTROL_D (1<<1)
24592 #define I2S_CONTROL_CE (1<<0)
24594 +#ifndef CONFIG_SOC_AU1200
24596 /* USB Host Controller */
24597 #define USB_OHCI_LEN 0x00100000
24599 @@ -773,6 +1135,8 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24600 #define USBDEV_ENABLE (1<<1)
24601 #define USBDEV_CE (1<<0)
24603 +#endif /* !CONFIG_SOC_AU1200 */
24605 /* Ethernet Controllers */
24607 /* 4 byte offsets from AU1000_ETH_BASE */
24608 @@ -1171,6 +1535,37 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24609 #define SYS_PF_PSC1_S1 (1 << 1)
24610 #define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2))
24613 +#ifdef CONFIG_SOC_AU1200
24614 +#define SYS_PINFUNC_DMA (1<<31)
24615 +#define SYS_PINFUNC_S0A (1<<30)
24616 +#define SYS_PINFUNC_S1A (1<<29)
24617 +#define SYS_PINFUNC_LP0 (1<<28)
24618 +#define SYS_PINFUNC_LP1 (1<<27)
24619 +#define SYS_PINFUNC_LD16 (1<<26)
24620 +#define SYS_PINFUNC_LD8 (1<<25)
24621 +#define SYS_PINFUNC_LD1 (1<<24)
24622 +#define SYS_PINFUNC_LD0 (1<<23)
24623 +#define SYS_PINFUNC_P1A (3<<21)
24624 +#define SYS_PINFUNC_P1B (1<<20)
24625 +#define SYS_PINFUNC_FS3 (1<<19)
24626 +#define SYS_PINFUNC_P0A (3<<17)
24627 +#define SYS_PINFUNC_CS (1<<16)
24628 +#define SYS_PINFUNC_CIM (1<<15)
24629 +#define SYS_PINFUNC_P1C (1<<14)
24630 +#define SYS_PINFUNC_U1T (1<<12)
24631 +#define SYS_PINFUNC_U1R (1<<11)
24632 +#define SYS_PINFUNC_EX1 (1<<10)
24633 +#define SYS_PINFUNC_EX0 (1<<9)
24634 +#define SYS_PINFUNC_U0R (1<<8)
24635 +#define SYS_PINFUNC_MC (1<<7)
24636 +#define SYS_PINFUNC_S0B (1<<6)
24637 +#define SYS_PINFUNC_S0C (1<<5)
24638 +#define SYS_PINFUNC_P0B (1<<4)
24639 +#define SYS_PINFUNC_U0T (1<<3)
24640 +#define SYS_PINFUNC_S1B (1<<2)
24643 #define SYS_TRIOUTRD 0xB1900100
24644 #define SYS_TRIOUTCLR 0xB1900100
24645 #define SYS_OUTPUTRD 0xB1900108
24646 @@ -1298,7 +1693,6 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24647 #define SD1_XMIT_FIFO 0xB0680000
24648 #define SD1_RECV_FIFO 0xB0680004
24651 #if defined (CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550)
24652 /* Au1500 PCI Controller */
24653 #define Au1500_CFG_BASE 0xB4005000 // virtual, kseg0 addr
24654 @@ -1388,9 +1782,60 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]
24658 +#ifndef _LANGUAGE_ASSEMBLY
24659 +typedef volatile struct
24661 + /* 0x0000 */ u32 toytrim;
24662 + /* 0x0004 */ u32 toywrite;
24663 + /* 0x0008 */ u32 toymatch0;
24664 + /* 0x000C */ u32 toymatch1;
24665 + /* 0x0010 */ u32 toymatch2;
24666 + /* 0x0014 */ u32 cntrctrl;
24667 + /* 0x0018 */ u32 scratch0;
24668 + /* 0x001C */ u32 scratch1;
24669 + /* 0x0020 */ u32 freqctrl0;
24670 + /* 0x0024 */ u32 freqctrl1;
24671 + /* 0x0028 */ u32 clksrc;
24672 + /* 0x002C */ u32 pinfunc;
24673 + /* 0x0030 */ u32 reserved0;
24674 + /* 0x0034 */ u32 wakemsk;
24675 + /* 0x0038 */ u32 endian;
24676 + /* 0x003C */ u32 powerctrl;
24677 + /* 0x0040 */ u32 toyread;
24678 + /* 0x0044 */ u32 rtctrim;
24679 + /* 0x0048 */ u32 rtcwrite;
24680 + /* 0x004C */ u32 rtcmatch0;
24681 + /* 0x0050 */ u32 rtcmatch1;
24682 + /* 0x0054 */ u32 rtcmatch2;
24683 + /* 0x0058 */ u32 rtcread;
24684 + /* 0x005C */ u32 wakesrc;
24685 + /* 0x0060 */ u32 cpupll;
24686 + /* 0x0064 */ u32 auxpll;
24687 + /* 0x0068 */ u32 reserved1;
24688 + /* 0x006C */ u32 reserved2;
24689 + /* 0x0070 */ u32 reserved3;
24690 + /* 0x0074 */ u32 reserved4;
24691 + /* 0x0078 */ u32 slppwr;
24692 + /* 0x007C */ u32 sleep;
24693 + /* 0x0080 */ u32 reserved5[32];
24694 + /* 0x0100 */ u32 trioutrd;
24695 +#define trioutclr trioutrd
24696 + /* 0x0104 */ u32 reserved6;
24697 + /* 0x0108 */ u32 outputrd;
24698 +#define outputset outputrd
24699 + /* 0x010C */ u32 outputclr;
24700 + /* 0x0110 */ u32 pinstaterd;
24701 +#define pininputen pinstaterd
24705 +static AU1X00_SYS* const sys = (AU1X00_SYS *)SYS_BASE;
24708 /* Processor information base on prid.
24709 * Copied from PowerPC.
24711 +#ifndef _LANGUAGE_ASSEMBLY
24713 /* CPU is matched via (PRID & prid_mask) == prid_value */
24714 unsigned int prid_mask;
24715 @@ -1404,3 +1849,6 @@ struct cpu_spec {
24716 extern struct cpu_spec cpu_specs[];
24717 extern struct cpu_spec *cur_cpu_spec[];
24722 --- a/include/asm-mips/au1000_pcmcia.h
24723 +++ b/include/asm-mips/au1000_pcmcia.h
24724 @@ -38,16 +38,41 @@
24725 #define AU1X_SOCK0_PHYS_MEM 0xF80000000
24727 /* pcmcia socket 1 needs external glue logic so the memory map
24728 - * differs from board to board.
24729 + * differs from board to board. the general rule is that
24730 + * static bus address bit 26 should be used to decode socket 0
24731 + * from socket 1. alas, some boards dont follow this...
24732 + * These really belong in a board-specific header file...
24734 -#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_PB1500)
24735 -#define AU1X_SOCK1_IO 0xF08000000
24736 -#define AU1X_SOCK1_PHYS_ATTR 0xF48000000
24737 -#define AU1X_SOCK1_PHYS_MEM 0xF88000000
24738 -#elif defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550)
24739 -#define AU1X_SOCK1_IO 0xF04000000
24740 -#define AU1X_SOCK1_PHYS_ATTR 0xF44000000
24741 -#define AU1X_SOCK1_PHYS_MEM 0xF84000000
24742 +#ifdef CONFIG_MIPS_PB1000
24743 +#define SOCK1_DECODE (1<<27)
24745 +#ifdef CONFIG_MIPS_DB1000
24746 +#define SOCK1_DECODE (1<<26)
24748 +#ifdef CONFIG_MIPS_DB1500
24749 +#define SOCK1_DECODE (1<<26)
24751 +#ifdef CONFIG_MIPS_DB1100
24752 +#define SOCK1_DECODE (1<<26)
24754 +#ifdef CONFIG_MIPS_DB1550
24755 +#define SOCK1_DECODE (1<<26)
24757 +#ifdef CONFIG_MIPS_DB1200
24758 +#define SOCK1_DECODE (1<<26)
24760 +#ifdef CONFIG_MIPS_PB1550
24761 +#define SOCK1_DECODE (1<<26)
24763 +#ifdef CONFIG_MIPS_PB1200
24764 +#define SOCK1_DECODE (1<<26)
24767 +/* The board has a second PCMCIA socket */
24768 +#ifdef SOCK1_DECODE
24769 +#define AU1X_SOCK1_IO (0xF00000000|SOCK1_DECODE)
24770 +#define AU1X_SOCK1_PHYS_ATTR (0xF40000000|SOCK1_DECODE)
24771 +#define AU1X_SOCK1_PHYS_MEM (0xF80000000|SOCK1_DECODE)
24774 struct pcmcia_state {
24775 --- a/include/asm-mips/au1100_mmc.h
24776 +++ b/include/asm-mips/au1100_mmc.h
24777 @@ -39,16 +39,22 @@
24778 #define __ASM_AU1100_MMC_H
24781 -#define NUM_AU1100_MMC_CONTROLLERS 2
24784 -#define AU1100_SD_IRQ 2
24786 +#if defined(CONFIG_SOC_AU1100)
24787 +#define NUM_MMC_CONTROLLERS 2
24788 +#define AU1X_MMC_INT AU1100_SD_INT
24791 +#if defined(CONFIG_SOC_AU1200)
24792 +#define NUM_MMC_CONTROLLERS 2
24793 +#define AU1X_MMC_INT AU1200_SD_INT
24796 #define SD0_BASE 0xB0600000
24797 #define SD1_BASE 0xB0680000
24803 * Register offsets.
24805 @@ -201,5 +207,12 @@
24806 #define SD_CMD_RT_1B (0x00810000)
24809 +/* support routines required on a platform-specific basis */
24810 +extern void mmc_card_inserted(int _n_, int *_res_);
24811 +extern void mmc_card_writable(int _n_, int *_res_);
24812 +extern void mmc_power_on(int _n_);
24813 +extern void mmc_power_off(int _n_);
24816 #endif /* __ASM_AU1100_MMC_H */
24818 --- a/include/asm-mips/au1xxx_dbdma.h
24819 +++ b/include/asm-mips/au1xxx_dbdma.h
24821 #define DDMA_GLOBAL_BASE 0xb4003000
24822 #define DDMA_CHANNEL_BASE 0xb4002000
24824 -typedef struct dbdma_global {
24825 +typedef volatile struct dbdma_global {
24829 @@ -60,7 +60,7 @@ typedef struct dbdma_global {
24831 /* The structure of a DMA Channel.
24833 -typedef struct au1xxx_dma_channel {
24834 +typedef volatile struct au1xxx_dma_channel {
24835 u32 ddma_cfg; /* See below */
24836 u32 ddma_desptr; /* 32-byte aligned pointer to descriptor */
24837 u32 ddma_statptr; /* word aligned pointer to status word */
24838 @@ -96,7 +96,7 @@ typedef struct au1xxx_dma_channel {
24839 /* "Standard" DDMA Descriptor.
24840 * Must be 32-byte aligned.
24842 -typedef struct au1xxx_ddma_desc {
24843 +typedef volatile struct au1xxx_ddma_desc {
24844 u32 dscr_cmd0; /* See below */
24845 u32 dscr_cmd1; /* See below */
24846 u32 dscr_source0; /* source phys address */
24847 @@ -105,6 +105,12 @@ typedef struct au1xxx_ddma_desc {
24848 u32 dscr_dest1; /* See below */
24849 u32 dscr_stat; /* completion status */
24850 u32 dscr_nxtptr; /* Next descriptor pointer (mostly) */
24851 + /* First 32bytes are HW specific!!!
24852 + Lets have some SW data following.. make sure its 32bytes
24856 + u32 sw_reserved[6];
24857 } au1x_ddma_desc_t;
24859 #define DSCR_CMD0_V (1 << 31) /* Descriptor valid */
24860 @@ -123,6 +129,8 @@ typedef struct au1xxx_ddma_desc {
24861 #define DSCR_CMD0_CV (0x1 << 2) /* Clear Valid when done */
24862 #define DSCR_CMD0_ST_MASK (0x3 << 0) /* Status instruction */
24864 +#define SW_STATUS_INUSE (1<<0)
24866 /* Command 0 device IDs.
24868 #ifdef CONFIG_SOC_AU1550
24869 @@ -169,8 +177,8 @@ typedef struct au1xxx_ddma_desc {
24870 #define DSCR_CMD0_SDMS_RX0 9
24871 #define DSCR_CMD0_SDMS_TX1 10
24872 #define DSCR_CMD0_SDMS_RX1 11
24873 -#define DSCR_CMD0_AES_TX 12
24874 -#define DSCR_CMD0_AES_RX 13
24875 +#define DSCR_CMD0_AES_TX 13
24876 +#define DSCR_CMD0_AES_RX 12
24877 #define DSCR_CMD0_PSC0_TX 14
24878 #define DSCR_CMD0_PSC0_RX 15
24879 #define DSCR_CMD0_PSC1_TX 16
24880 @@ -189,6 +197,10 @@ typedef struct au1xxx_ddma_desc {
24881 #define DSCR_CMD0_THROTTLE 30
24882 #define DSCR_CMD0_ALWAYS 31
24883 #define DSCR_NDEV_IDS 32
24884 +/* THis macro is used to find/create custom device types */
24885 +#define DSCR_DEV2CUSTOM_ID(x,d) (((((x)&0xFFFF)<<8)|0x32000000)|((d)&0xFF))
24886 +#define DSCR_CUSTOM2DEV_ID(x) ((x)&0xFF)
24889 #define DSCR_CMD0_SID(x) (((x) & 0x1f) << 25)
24890 #define DSCR_CMD0_DID(x) (((x) & 0x1f) << 20)
24891 @@ -277,6 +289,43 @@ typedef struct au1xxx_ddma_desc {
24893 #define NUM_DBDMA_CHANS 16
24896 + * Ddma API definitions
24897 + * FIXME: may not fit to this header file
24899 +typedef struct dbdma_device_table {
24903 + u32 dev_devwidth;
24904 + u32 dev_physaddr; /* If FIFO */
24905 + u32 dev_intlevel;
24906 + u32 dev_intpolarity;
24910 +typedef struct dbdma_chan_config {
24915 + dbdev_tab_t *chan_src;
24916 + dbdev_tab_t *chan_dest;
24917 + au1x_dma_chan_t *chan_ptr;
24918 + au1x_ddma_desc_t *chan_desc_base;
24919 + au1x_ddma_desc_t *get_ptr, *put_ptr, *cur_ptr;
24920 + void *chan_callparam;
24921 + void (*chan_callback)(int, void *, struct pt_regs *);
24924 +#define DEV_FLAGS_INUSE (1 << 0)
24925 +#define DEV_FLAGS_ANYUSE (1 << 1)
24926 +#define DEV_FLAGS_OUT (1 << 2)
24927 +#define DEV_FLAGS_IN (1 << 3)
24928 +#define DEV_FLAGS_BURSTABLE (1 << 4)
24929 +#define DEV_FLAGS_SYNC (1 << 5)
24930 +/* end Ddma API definitions */
24932 /* External functions for drivers to use.
24934 /* Use this to allocate a dbdma channel. The device ids are one of the
24935 @@ -299,8 +348,8 @@ u32 au1xxx_dbdma_ring_alloc(u32 chanid,
24937 /* Put buffers on source/destination descriptors.
24939 -u32 au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes);
24940 -u32 au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes);
24941 +u32 _au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags);
24942 +u32 _au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags);
24944 /* Get a buffer from the destination descriptor.
24946 @@ -314,5 +363,25 @@ u32 au1xxx_get_dma_residue(u32 chanid);
24947 void au1xxx_dbdma_chan_free(u32 chanid);
24948 void au1xxx_dbdma_dump(u32 chanid);
24950 +u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr );
24952 +u32 au1xxx_ddma_add_device( dbdev_tab_t *dev );
24955 + Some compatibilty macros --
24956 + Needed to make changes to API without breaking existing drivers
24958 +#define au1xxx_dbdma_put_source(chanid,buf,nbytes)_au1xxx_dbdma_put_source(chanid, buf, nbytes, DDMA_FLAGS_IE)
24959 +#define au1xxx_dbdma_put_source_flags(chanid,buf,nbytes,flags) _au1xxx_dbdma_put_source(chanid, buf, nbytes, flags)
24961 +#define au1xxx_dbdma_put_dest(chanid,buf,nbytes) _au1xxx_dbdma_put_dest(chanid, buf, nbytes, DDMA_FLAGS_IE)
24962 +#define au1xxx_dbdma_put_dest_flags(chanid,buf,nbytes,flags) _au1xxx_dbdma_put_dest(chanid, buf, nbytes, flags)
24965 + * Flags for the put_source/put_dest functions.
24967 +#define DDMA_FLAGS_IE (1<<0)
24968 +#define DDMA_FLAGS_NOIE (1<<1)
24970 #endif /* _LANGUAGE_ASSEMBLY */
24971 #endif /* _AU1000_DBDMA_H_ */
24973 +++ b/include/asm-mips/au1xxx_gpio.h
24977 +#ifndef __AU1XXX_GPIO_H
24978 +#define __AU1XXX_GPIO_H
24980 +void au1xxx_gpio1_set_inputs(void);
24981 +void au1xxx_gpio_tristate(int signal);
24982 +void au1xxx_gpio_write(int signal, int value);
24983 +int au1xxx_gpio_read(int signal);
24985 +typedef volatile struct
24996 +#endif //__AU1XXX_GPIO_H
24997 --- a/include/asm-mips/au1xxx_psc.h
24998 +++ b/include/asm-mips/au1xxx_psc.h
25000 #define PSC3_BASE_ADDR 0xb0d00000
25003 +#ifdef CONFIG_SOC_AU1200
25004 +#define PSC0_BASE_ADDR 0xb1a00000
25005 +#define PSC1_BASE_ADDR 0xb1b00000
25008 /* The PSC select and control registers are common to
25011 @@ -226,6 +231,8 @@ typedef struct psc_i2s {
25012 #define PSC_I2SCFG_DD_DISABLE (1 << 27)
25013 #define PSC_I2SCFG_DE_ENABLE (1 << 26)
25014 #define PSC_I2SCFG_SET_WS(x) (((((x) / 2) - 1) & 0x7f) << 16)
25015 +#define PSC_I2SCFG_WS(n) ((n&0xFF)<<16)
25016 +#define PSC_I2SCFG_WS_MASK (PSC_I2SCFG_WS(0x3F))
25017 #define PSC_I2SCFG_WI (1 << 15)
25019 #define PSC_I2SCFG_DIV_MASK (3 << 13)
25020 --- a/include/asm-mips/bootinfo.h
25021 +++ b/include/asm-mips/bootinfo.h
25022 @@ -180,6 +180,9 @@
25023 #define MACH_MTX1 7 /* 4G MTX-1 Au1500-based board */
25024 #define MACH_CSB250 8 /* Cogent Au1500 */
25025 #define MACH_PB1550 9 /* Au1550-based eval board */
25026 +#define MACH_PB1200 10 /* Au1200-based eval board */
25027 +#define MACH_DB1550 11 /* Au1550-based eval board */
25028 +#define MACH_DB1200 12 /* Au1200-based eval board */
25031 * Valid machtype for group NEC_VR41XX
25033 +++ b/include/asm-mips/db1200.h
25036 + * AMD Alchemy DB1200 Referrence Board
25037 + * Board Registers defines.
25039 + * ########################################################################
25041 + * This program is free software; you can distribute it and/or modify it
25042 + * under the terms of the GNU General Public License (Version 2) as
25043 + * published by the Free Software Foundation.
25045 + * This program is distributed in the hope it will be useful, but WITHOUT
25046 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
25047 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25048 + * for more details.
25050 + * You should have received a copy of the GNU General Public License along
25051 + * with this program; if not, write to the Free Software Foundation, Inc.,
25052 + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
25054 + * ########################################################################
25058 +#ifndef __ASM_DB1200_H
25059 +#define __ASM_DB1200_H
25061 +#include <linux/types.h>
25063 +// This is defined in au1000.h with bogus value
25064 +#undef AU1X00_EXTERNAL_INT
25066 +#define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX
25067 +#define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX
25068 +#define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC1_TX
25069 +#define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC1_RX
25071 +/* SPI and SMB are muxed on the Pb1200 board.
25072 + Refer to board documentation.
25074 +#define SPI_PSC_BASE PSC0_BASE_ADDR
25075 +#define SMBUS_PSC_BASE PSC0_BASE_ADDR
25076 +/* AC97 and I2S are muxed on the Pb1200 board.
25077 + Refer to board documentation.
25079 +#define AC97_PSC_BASE PSC1_BASE_ADDR
25080 +#define I2S_PSC_BASE PSC1_BASE_ADDR
25082 +#define BCSR_KSEG1_ADDR 0xB9800000
25084 +typedef volatile struct
25086 + /*00*/ u16 whoami;
25088 + /*04*/ u16 status;
25090 + /*08*/ u16 switches;
25092 + /*0C*/ u16 resets;
25095 + /*10*/ u16 pcmcia;
25097 + /*14*/ u16 board;
25099 + /*18*/ u16 disk_leds;
25101 + /*1C*/ u16 system;
25104 + /*20*/ u16 intclr;
25106 + /*24*/ u16 intset;
25108 + /*28*/ u16 intclr_mask;
25110 + /*2C*/ u16 intset_mask;
25113 + /*30*/ u16 sig_status;
25115 + /*34*/ u16 int_status;
25117 + /*38*/ u16 reserved14;
25119 + /*3C*/ u16 reserved16;
25124 +static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
25127 + * Register bit definitions for the BCSRs
25129 +#define BCSR_WHOAMI_DCID 0x000F
25130 +#define BCSR_WHOAMI_CPLD 0x00F0
25131 +#define BCSR_WHOAMI_BOARD 0x0F00
25133 +#define BCSR_STATUS_PCMCIA0VS 0x0003
25134 +#define BCSR_STATUS_PCMCIA1VS 0x000C
25135 +#define BCSR_STATUS_SWAPBOOT 0x0040
25136 +#define BCSR_STATUS_FLASHBUSY 0x0100
25137 +#define BCSR_STATUS_IDECBLID 0x0200
25138 +#define BCSR_STATUS_SD0WP 0x0400
25139 +#define BCSR_STATUS_U0RXD 0x1000
25140 +#define BCSR_STATUS_U1RXD 0x2000
25142 +#define BCSR_SWITCHES_OCTAL 0x00FF
25143 +#define BCSR_SWITCHES_DIP_1 0x0080
25144 +#define BCSR_SWITCHES_DIP_2 0x0040
25145 +#define BCSR_SWITCHES_DIP_3 0x0020
25146 +#define BCSR_SWITCHES_DIP_4 0x0010
25147 +#define BCSR_SWITCHES_DIP_5 0x0008
25148 +#define BCSR_SWITCHES_DIP_6 0x0004
25149 +#define BCSR_SWITCHES_DIP_7 0x0002
25150 +#define BCSR_SWITCHES_DIP_8 0x0001
25151 +#define BCSR_SWITCHES_ROTARY 0x0F00
25153 +#define BCSR_RESETS_ETH 0x0001
25154 +#define BCSR_RESETS_CAMERA 0x0002
25155 +#define BCSR_RESETS_DC 0x0004
25156 +#define BCSR_RESETS_IDE 0x0008
25157 +#define BCSR_RESETS_TV 0x0010
25158 +/* not resets but in the same register */
25159 +#define BCSR_RESETS_PWMR1mUX 0x0800
25160 +#define BCSR_RESETS_PCS0MUX 0x1000
25161 +#define BCSR_RESETS_PCS1MUX 0x2000
25162 +#define BCSR_RESETS_SPISEL 0x4000
25164 +#define BCSR_PCMCIA_PC0VPP 0x0003
25165 +#define BCSR_PCMCIA_PC0VCC 0x000C
25166 +#define BCSR_PCMCIA_PC0DRVEN 0x0010
25167 +#define BCSR_PCMCIA_PC0RST 0x0080
25168 +#define BCSR_PCMCIA_PC1VPP 0x0300
25169 +#define BCSR_PCMCIA_PC1VCC 0x0C00
25170 +#define BCSR_PCMCIA_PC1DRVEN 0x1000
25171 +#define BCSR_PCMCIA_PC1RST 0x8000
25173 +#define BCSR_BOARD_LCDVEE 0x0001
25174 +#define BCSR_BOARD_LCDVDD 0x0002
25175 +#define BCSR_BOARD_LCDBL 0x0004
25176 +#define BCSR_BOARD_CAMSNAP 0x0010
25177 +#define BCSR_BOARD_CAMPWR 0x0020
25178 +#define BCSR_BOARD_SD0PWR 0x0040
25180 +#define BCSR_LEDS_DECIMALS 0x0003
25181 +#define BCSR_LEDS_LED0 0x0100
25182 +#define BCSR_LEDS_LED1 0x0200
25183 +#define BCSR_LEDS_LED2 0x0400
25184 +#define BCSR_LEDS_LED3 0x0800
25186 +#define BCSR_SYSTEM_POWEROFF 0x4000
25187 +#define BCSR_SYSTEM_RESET 0x8000
25189 +/* Bit positions for the different interrupt sources */
25190 +#define BCSR_INT_IDE 0x0001
25191 +#define BCSR_INT_ETH 0x0002
25192 +#define BCSR_INT_PC0 0x0004
25193 +#define BCSR_INT_PC0STSCHG 0x0008
25194 +#define BCSR_INT_PC1 0x0010
25195 +#define BCSR_INT_PC1STSCHG 0x0020
25196 +#define BCSR_INT_DC 0x0040
25197 +#define BCSR_INT_FLASHBUSY 0x0080
25198 +#define BCSR_INT_PC0INSERT 0x0100
25199 +#define BCSR_INT_PC0EJECT 0x0200
25200 +#define BCSR_INT_PC1INSERT 0x0400
25201 +#define BCSR_INT_PC1EJECT 0x0800
25202 +#define BCSR_INT_SD0INSERT 0x1000
25203 +#define BCSR_INT_SD0EJECT 0x2000
25205 +#define AU1XXX_SMC91111_PHYS_ADDR (0x19000300)
25206 +#define AU1XXX_SMC91111_IRQ DB1200_ETH_INT
25208 +#define AU1XXX_ATA_PHYS_ADDR (0x18800000)
25209 +#define AU1XXX_ATA_PHYS_LEN (0x100)
25210 +#define AU1XXX_ATA_REG_OFFSET (5)
25211 +#define AU1XXX_ATA_INT DB1200_IDE_INT
25212 +#define AU1XXX_ATA_DDMA_REQ DSCR_CMD0_DMA_REQ1;
25213 +#define AU1XXX_ATA_RQSIZE 128
25215 +#define NAND_PHYS_ADDR 0x20000000
25218 + * External Interrupts for Pb1200 as of 8/6/2004.
25219 + * Bit positions in the CPLD registers can be calculated by taking
25220 + * the interrupt define and subtracting the DB1200_INT_BEGIN value.
25221 + * *example: IDE bis pos is = 64 - 64
25222 + ETH bit pos is = 65 - 64
25224 +#define DB1200_INT_BEGIN (AU1000_LAST_INTC1_INT + 1)
25225 +#define DB1200_IDE_INT (DB1200_INT_BEGIN + 0)
25226 +#define DB1200_ETH_INT (DB1200_INT_BEGIN + 1)
25227 +#define DB1200_PC0_INT (DB1200_INT_BEGIN + 2)
25228 +#define DB1200_PC0_STSCHG_INT (DB1200_INT_BEGIN + 3)
25229 +#define DB1200_PC1_INT (DB1200_INT_BEGIN + 4)
25230 +#define DB1200_PC1_STSCHG_INT (DB1200_INT_BEGIN + 5)
25231 +#define DB1200_DC_INT (DB1200_INT_BEGIN + 6)
25232 +#define DB1200_FLASHBUSY_INT (DB1200_INT_BEGIN + 7)
25233 +#define DB1200_PC0_INSERT_INT (DB1200_INT_BEGIN + 8)
25234 +#define DB1200_PC0_EJECT_INT (DB1200_INT_BEGIN + 9)
25235 +#define DB1200_PC1_INSERT_INT (DB1200_INT_BEGIN + 10)
25236 +#define DB1200_PC1_EJECT_INT (DB1200_INT_BEGIN + 11)
25237 +#define DB1200_SD0_INSERT_INT (DB1200_INT_BEGIN + 12)
25238 +#define DB1200_SD0_EJECT_INT (DB1200_INT_BEGIN + 13)
25240 +#define DB1200_INT_END (DB1200_INT_BEGIN + 15)
25242 +/* For drivers/pcmcia/au1000_db1x00.c */
25243 +#define BOARD_PC0_INT DB1200_PC0_INT
25244 +#define BOARD_PC1_INT DB1200_PC1_INT
25245 +#define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1<<(8+(2*SOCKET)))
25247 +#endif /* __ASM_DB1200_H */
25249 --- a/include/asm-mips/db1x00.h
25250 +++ b/include/asm-mips/db1x00.h
25253 - * AMD Alchemy DB1x00 Reference Boards
25254 + * AMD Alchemy DB1x00 Reference Boards (BUT NOT DB1200)
25256 * Copyright 2001 MontaVista Software Inc.
25257 * Author: MontaVista Software, Inc.
25259 #define AC97_PSC_BASE PSC1_BASE_ADDR
25260 #define SMBUS_PSC_BASE PSC2_BASE_ADDR
25261 #define I2S_PSC_BASE PSC3_BASE_ADDR
25263 +/* for drivers/pcmcia/au1000_db1x00.c */
25264 +#define BOARD_PC0_INT AU1000_GPIO_3
25265 +#define BOARD_PC1_INT AU1000_GPIO_5
25266 +#define BOARD_CARD_INSERTED(SOCKET) !(bcsr->status & (1<<(4+SOCKET)))
25269 #define BCSR_KSEG1_ADDR 0xAE000000
25270 +/* for drivers/pcmcia/au1000_db1x00.c */
25271 +#define BOARD_PC0_INT AU1000_GPIO_2
25272 +#define BOARD_PC1_INT AU1000_GPIO_5
25273 +#define BOARD_CARD_INSERTED(SOCKET) !(bcsr->status & (1<<(4+SOCKET)))
25277 @@ -66,6 +75,7 @@ typedef volatile struct
25281 +static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
25284 * Register/mask bit definitions for the BCSRs
25285 @@ -130,14 +140,6 @@ typedef volatile struct
25287 #define BCSR_SWRESET_RESET 0x0080
25289 -/* PCMCIA Db1x00 specific defines */
25290 -#define PCMCIA_MAX_SOCK 1
25291 -#define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1)
25294 -#define SET_VCC_VPP(VCC, VPP, SLOT)\
25295 - ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
25297 /* MTD CONFIG OPTIONS */
25298 #if defined(CONFIG_MTD_DB1X00_BOOT) && defined(CONFIG_MTD_DB1X00_USER)
25299 #define DB1X00_BOTH_BANKS
25300 @@ -147,48 +149,15 @@ typedef volatile struct
25301 #define DB1X00_USER_ONLY
25304 -/* SD controller macros */
25308 -#define mmc_card_inserted(_n_, _res_) \
25310 - BCSR * const bcsr = (BCSR *)0xAE000000; \
25311 - unsigned long mmc_wp, board_specific; \
25313 - mmc_wp = BCSR_BOARD_SD1_WP; \
25315 - mmc_wp = BCSR_BOARD_SD0_WP; \
25317 - board_specific = au_readl((unsigned long)(&bcsr->specific)); \
25318 - if (!(board_specific & mmc_wp)) {/* low means card present */ \
25319 - *(int *)(_res_) = 1; \
25321 - *(int *)(_res_) = 0; \
25325 +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX) && defined(CONFIG_MIPS_DB1550)
25327 - * Apply power to card slot(s).
25328 + * Daughter card information.
25330 -#define mmc_power_on(_n_) \
25332 - BCSR * const bcsr = (BCSR *)0xAE000000; \
25333 - unsigned long mmc_pwr, mmc_wp, board_specific; \
25335 - mmc_pwr = BCSR_BOARD_SD1_PWR; \
25336 - mmc_wp = BCSR_BOARD_SD1_WP; \
25338 - mmc_pwr = BCSR_BOARD_SD0_PWR; \
25339 - mmc_wp = BCSR_BOARD_SD0_WP; \
25341 - board_specific = au_readl((unsigned long)(&bcsr->specific)); \
25342 - if (!(board_specific & mmc_wp)) {/* low means card present */ \
25343 - board_specific |= mmc_pwr; \
25344 - au_writel(board_specific, (int)(&bcsr->specific)); \
25348 +#define DAUGHTER_CARD_IRQ (AU1000_GPIO_8)
25350 +#define AU1XXX_ATA_PHYS_ADDR (0x0C000000)
25351 +#define AU1XXX_ATA_REG_OFFSET (5)
25352 +#endif /* CONFIG_MIPS_DB1550 */
25354 #endif /* __ASM_DB1X00_H */
25356 --- a/include/asm-mips/elf.h
25357 +++ b/include/asm-mips/elf.h
25358 @@ -66,9 +66,10 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
25359 #define USE_ELF_CORE_DUMP
25360 #define ELF_EXEC_PAGESIZE PAGE_SIZE
25362 -#define ELF_CORE_COPY_REGS(_dest,_regs) \
25363 - memcpy((char *) &_dest, (char *) _regs, \
25364 - sizeof(struct pt_regs));
25365 +extern void dump_regs(elf_greg_t *, struct pt_regs *regs);
25367 +#define ELF_CORE_COPY_REGS(elf_regs, regs) \
25368 + dump_regs((elf_greg_t *)&(elf_regs), regs);
25370 /* This yields a mask that user programs can use to figure out what
25371 instruction set this cpu supports. This could be done in userspace,
25373 +++ b/include/asm-mips/ficmmp.h
25378 + * ########################################################################
25380 + * This program is free software; you can distribute it and/or modify it
25381 + * under the terms of the GNU General Public License (Version 2) as
25382 + * published by the Free Software Foundation.
25384 + * This program is distributed in the hope it will be useful, but WITHOUT
25385 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
25386 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25387 + * for more details.
25389 + * You should have received a copy of the GNU General Public License along
25390 + * with this program; if not, write to the Free Software Foundation, Inc.,
25391 + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
25393 + * ########################################################################
25397 +#ifndef __ASM_FICMMP_H
25398 +#define __ASM_FICMMP_H
25400 +#include <linux/types.h>
25401 +#include <asm/au1000.h>
25402 +#include <asm/au1xxx_gpio.h>
25404 +// This is defined in au1000.h with bogus value
25405 +#undef AU1X00_EXTERNAL_INT
25407 +#define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX
25408 +#define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX
25409 +#define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC1_TX
25410 +#define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC1_RX
25411 +/* SPI and SMB are muxed on the Pb1200 board.
25412 + Refer to board documentation.
25414 +#define SPI_PSC_BASE PSC0_BASE_ADDR
25415 +#define SMBUS_PSC_BASE PSC0_BASE_ADDR
25416 +/* AC97 and I2S are muxed on the Pb1200 board.
25417 + Refer to board documentation.
25419 +#define AC97_PSC_BASE PSC1_BASE_ADDR
25420 +#define I2S_PSC_BASE PSC1_BASE_ADDR
25426 +#define AU1XXX_SMC91111_PHYS_ADDR (0xAC000300)
25427 +#define AU1XXX_SMC91111_IRQ AU1000_GPIO_5
25429 +/* DC_IDE and DC_ETHERNET */
25430 +#define FICMMP_IDE_INT AU1000_GPIO_4
25432 +#define AU1XXX_ATA_PHYS_ADDR (0x0C800000)
25433 +#define AU1XXX_ATA_REG_OFFSET (5)
25435 +#define AU1XXX_ATA_BASE (0x0C800000)
25436 +#define AU1XXX_ATA_END (0x0CFFFFFF)
25437 +#define AU1XXX_ATA_MEM_SIZE (AU1XXX_ATA_END - AU1XXX_ATA_BASE +1)
25439 +#define AU1XXX_ATA_REG_OFFSET (5)
25442 +#define SET_VCC_VPP(VCC, VPP, SLOT)\
25443 + ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
25446 +#define FICMMP_CONFIG_BASE 0xAD000000
25447 +#define FICMMP_CONFIG_ENABLE 13
25449 +#define FICMMP_CONFIG_I2SFREQ(N) (N<<0)
25450 +#define FICMMP_CONFIG_I2SXTAL0 (1<<0)
25451 +#define FICMMP_CONFIG_I2SXTAL1 (1<<1)
25452 +#define FICMMP_CONFIG_I2SXTAL2 (1<<2)
25453 +#define FICMMP_CONFIG_I2SXTAL3 (1<<3)
25454 +#define FICMMP_CONFIG_ADV1 (1<<4)
25455 +#define FICMMP_CONFIG_IDERST (1<<5)
25456 +#define FICMMP_CONFIG_LCMEN (1<<6)
25457 +#define FICMMP_CONFIG_CAMPWDN (1<<7)
25458 +#define FICMMP_CONFIG_USBPWREN (1<<8)
25459 +#define FICMMP_CONFIG_LCMPWREN (1<<9)
25460 +#define FICMMP_CONFIG_TVOUTPWREN (1<<10)
25461 +#define FICMMP_CONFIG_RS232PWREN (1<<11)
25462 +#define FICMMP_CONFIG_LCMDATAOUT (1<<12)
25463 +#define FICMMP_CONFIG_TVODATAOUT (1<<13)
25464 +#define FICMMP_CONFIG_ADV3 (1<<14)
25465 +#define FICMMP_CONFIG_ADV4 (1<<15)
25467 +#define I2S_FREQ_8_192 (0x0)
25468 +#define I2S_FREQ_11_2896 (0x1)
25469 +#define I2S_FREQ_12_288 (0x2)
25470 +#define I2S_FREQ_24_576 (0x3)
25471 +//#define I2S_FREQ_12_288 (0x4)
25472 +#define I2S_FREQ_16_9344 (0x5)
25473 +#define I2S_FREQ_18_432 (0x6)
25474 +#define I2S_FREQ_36_864 (0x7)
25475 +#define I2S_FREQ_16_384 (0x8)
25476 +#define I2S_FREQ_22_5792 (0x9)
25477 +//#define I2S_FREQ_24_576 (0x10)
25478 +#define I2S_FREQ_49_152 (0x11)
25479 +//#define I2S_FREQ_24_576 (0x12)
25480 +#define I2S_FREQ_33_8688 (0x13)
25481 +//#define I2S_FREQ_36_864 (0x14)
25482 +#define I2S_FREQ_73_728 (0x15)
25484 +#define FICMMP_IDE_PWR 9
25485 +#define FICMMP_FOCUS_RST 2
25487 +static __inline void ficmmp_config_set(u16 bits)
25489 + extern u16 ficmmp_config;
25490 + //printk("set_config: %X, Old: %X, New: %X\n", bits, ficmmp_config, ficmmp_config | bits);
25491 + ficmmp_config |= bits;
25492 + *((u16*)FICMMP_CONFIG_BASE) = ficmmp_config;
25495 +static __inline void ficmmp_config_clear(u16 bits)
25497 + extern u16 ficmmp_config;
25498 +// printk("clear_config: %X, Old: %X, New: %X\n", bits, ficmmp_config, ficmmp_config & ~bits);
25499 + ficmmp_config &= ~bits;
25500 + *((u16*)FICMMP_CONFIG_BASE) = ficmmp_config;
25503 +static __inline void ficmmp_config_init(void)
25505 + au1xxx_gpio_write(FICMMP_CONFIG_ENABLE, 0); //Enable configuration latch
25506 + ficmmp_config_set(FICMMP_CONFIG_LCMDATAOUT | FICMMP_CONFIG_TVODATAOUT | FICMMP_CONFIG_IDERST); //Disable display data buffers
25507 + ficmmp_config_set(FICMMP_CONFIG_I2SFREQ(I2S_FREQ_36_864));
25510 +static __inline u32 ficmmp_set_i2s_sample_rate(u32 rate)
25518 + case 8018: freq = I2S_FREQ_11_2896; break;
25520 + case 32000: //freq = I2S_FREQ_18_432; break;
25521 + case 8000: freq = I2S_FREQ_12_288; break;
25522 + default: freq = I2S_FREQ_12_288; rate = 8000;
25524 + ficmmp_config_clear(FICMMP_CONFIG_I2SFREQ(0xF));
25525 + ficmmp_config_set(FICMMP_CONFIG_I2SFREQ(freq));
25529 +#endif /* __ASM_FICMMP_H */
25531 --- a/include/asm-mips/hazards.h
25532 +++ b/include/asm-mips/hazards.h
25534 * License. See the file "COPYING" in the main directory of this archive
25535 * for more details.
25537 - * Copyright (C) 2003 Ralf Baechle
25538 + * Copyright (C) 2003, 2004 Ralf Baechle
25540 #ifndef _ASM_HAZARDS_H
25541 #define _ASM_HAZARDS_H
25542 @@ -12,38 +12,200 @@
25544 #ifdef __ASSEMBLY__
25551 * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent
25552 * use of the JTLB for instructions should not occur for 4 cpu cycles and use
25553 * for data translations should not occur for 3 cpu cycles.
25555 #ifdef CONFIG_CPU_RM9000
25556 -#define rm9000_tlb_hazard \
25558 +#define mtc0_tlbw_hazard \
25561 - ssnop; ssnop; ssnop; ssnop; \
25562 + _ssnop; _ssnop; _ssnop; _ssnop; \
25565 +#define tlbw_eret_hazard \
25568 + _ssnop; _ssnop; _ssnop; _ssnop; \
25572 -#define rm9000_tlb_hazard
25575 + * The taken branch will result in a two cycle penalty for the two killed
25576 + * instructions on R4000 / R4400. Other processors only have a single cycle
25577 + * hazard so this is nice trick to have an optimal code for a range of
25580 +#define mtc0_tlbw_hazard \
25582 +#define tlbw_eret_hazard \
25587 + * mtc0->mfc0 hazard
25588 + * The 24K has a 2 cycle mtc0/mfc0 execution hazard.
25589 + * It is a MIPS32R2 processor so ehb will clear the hazard.
25592 +#ifdef CONFIG_CPU_MIPSR2
25594 + * Use a macro for ehb unless explicit support for MIPSR2 is enabled
25600 +#define irq_enable_hazard \
25601 + ehb # irq_enable_hazard
25603 +#define irq_disable_hazard \
25604 + ehb # irq_disable_hazard
25606 +#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000)
25609 + * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
25612 +#define irq_enable_hazard
25614 +#define irq_disable_hazard
25619 + * Classic MIPS needs 1 - 3 nops or ssnops
25621 +#define irq_enable_hazard
25622 +#define irq_disable_hazard \
25623 + _ssnop; _ssnop; _ssnop
25627 +#else /* __ASSEMBLY__ */
25630 * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent
25631 * use of the JTLB for instructions should not occur for 4 cpu cycles and use
25632 * for data translations should not occur for 3 cpu cycles.
25634 #ifdef CONFIG_CPU_RM9000
25635 -#define rm9000_tlb_hazard() \
25637 +#define mtc0_tlbw_hazard() \
25638 __asm__ __volatile__( \
25639 ".set\tmips32\n\t" \
25640 - "ssnop; ssnop; ssnop; ssnop\n\t" \
25641 + "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
25644 +#define tlbw_use_hazard() \
25645 + __asm__ __volatile__( \
25646 + ".set\tmips32\n\t" \
25647 + "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
25650 -#define rm9000_tlb_hazard() do { } while (0)
25653 + * Overkill warning ...
25655 +#define mtc0_tlbw_hazard() \
25656 + __asm__ __volatile__( \
25657 + ".set noreorder\n\t" \
25658 + "nop; nop; nop; nop; nop; nop;\n\t" \
25659 + ".set reorder\n\t")
25661 +#define tlbw_use_hazard() \
25662 + __asm__ __volatile__( \
25663 + ".set noreorder\n\t" \
25664 + "nop; nop; nop; nop; nop; nop;\n\t" \
25665 + ".set reorder\n\t")
25670 + * mtc0->mfc0 hazard
25671 + * The 24K has a 2 cycle mtc0/mfc0 execution hazard.
25672 + * It is a MIPS32R2 processor so ehb will clear the hazard.
25675 +#ifdef CONFIG_CPU_MIPSR2
25677 + * Use a macro for ehb unless explicit support for MIPSR2 is enabled
25680 + " .macro ehb \n\t"
25681 + " sll $0, $0, 3 \n\t"
25684 + " .macro\tirq_enable_hazard \n\t"
25688 + " .macro\tirq_disable_hazard \n\t"
25692 +#define irq_enable_hazard() \
25693 + __asm__ __volatile__( \
25694 + "ehb\t\t\t\t# irq_enable_hazard")
25696 +#define irq_disable_hazard() \
25697 + __asm__ __volatile__( \
25698 + "ehb\t\t\t\t# irq_disable_hazard")
25700 +#elif defined(CONFIG_CPU_R10000)
25703 + * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
25707 + " .macro\tirq_enable_hazard \n\t"
25710 + " .macro\tirq_disable_hazard \n\t"
25713 +#define irq_enable_hazard() do { } while (0)
25714 +#define irq_disable_hazard() do { } while (0)
25719 + * Default for classic MIPS processors. Assume worst case hazards but don't
25720 + * care about the irq_enable_hazard - sooner or later the hardware will
25721 + * enable it and we don't care when exactly.
25725 + " .macro _ssnop \n\t"
25726 + " sll $0, $2, 1 \n\t"
25730 + " # There is a hazard but we do not care \n\t"
25732 + " .macro\tirq_enable_hazard \n\t"
25735 + " .macro\tirq_disable_hazard \n\t"
25736 + " _ssnop; _ssnop; _ssnop \n\t"
25739 +#define irq_enable_hazard() do { } while (0)
25740 +#define irq_disable_hazard() \
25741 + __asm__ __volatile__( \
25742 + "_ssnop; _ssnop; _ssnop;\t\t# irq_disable_hazard")
25746 +#endif /* __ASSEMBLY__ */
25748 #endif /* _ASM_HAZARDS_H */
25749 --- a/include/asm-mips/ide.h
25750 +++ b/include/asm-mips/ide.h
25751 @@ -32,12 +32,12 @@ struct ide_ops {
25753 extern struct ide_ops *ide_ops;
25755 -static __inline__ int ide_default_irq(ide_ioreg_t base)
25756 +static inline int ide_default_irq(ide_ioreg_t base)
25758 return ide_ops->ide_default_irq(base);
25761 -static __inline__ ide_ioreg_t ide_default_io_base(int index)
25762 +static inline ide_ioreg_t ide_default_io_base(int index)
25764 return ide_ops->ide_default_io_base(index);
25766 @@ -48,7 +48,7 @@ static inline void ide_init_hwif_ports(h
25767 ide_ops->ide_init_hwif_ports(hw, data_port, ctrl_port, irq);
25770 -static __inline__ void ide_init_default_hwifs(void)
25771 +static inline void ide_init_default_hwifs(void)
25773 #ifndef CONFIG_BLK_DEV_IDEPCI
25775 @@ -68,7 +68,89 @@ static __inline__ void ide_init_default_
25776 #define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1)
25779 -#include <asm-generic/ide_iops.h>
25780 +/* MIPS port and memory-mapped I/O string operations. */
25782 +static inline void __ide_flush_dcache_range(unsigned long addr, unsigned long size)
25784 + if (cpu_has_dc_aliases) {
25785 + unsigned long end = addr + size;
25786 + for (; addr < end; addr += PAGE_SIZE)
25787 + flush_dcache_page(virt_to_page(addr));
25791 +static inline void __ide_insw(unsigned long port, void *addr,
25792 + unsigned int count)
25794 + insw(port, addr, count);
25795 + __ide_flush_dcache_range((unsigned long)addr, count * 2);
25798 +static inline void __ide_insl(unsigned long port, void *addr, unsigned int count)
25800 + insl(port, addr, count);
25801 + __ide_flush_dcache_range((unsigned long)addr, count * 4);
25804 +static inline void __ide_outsw(unsigned long port, const void *addr,
25805 + unsigned long count)
25807 + outsw(port, addr, count);
25808 + __ide_flush_dcache_range((unsigned long)addr, count * 2);
25811 +static inline void __ide_outsl(unsigned long port, const void *addr,
25812 + unsigned long count)
25814 + outsl(port, addr, count);
25815 + __ide_flush_dcache_range((unsigned long)addr, count * 4);
25818 +static inline void __ide_mm_insw(unsigned long port, void *addr, u32 count)
25820 + unsigned long start = (unsigned long) addr;
25822 + while (count--) {
25823 + *(u16 *)addr = readw(port);
25826 + __ide_flush_dcache_range(start, count * 2);
25829 +static inline void __ide_mm_insl(unsigned long port, void *addr, u32 count)
25831 + unsigned long start = (unsigned long) addr;
25833 + while (count--) {
25834 + *(u32 *)addr = readl(port);
25837 + __ide_flush_dcache_range(start, count * 4);
25840 +static inline void __ide_mm_outsw(unsigned long port, const void *addr,
25843 + unsigned long start = (unsigned long) addr;
25845 + while (count--) {
25846 + writew(*(u16 *)addr, port);
25849 + __ide_flush_dcache_range(start, count * 2);
25852 +static inline void __ide_mm_outsl(unsigned long port, const void *addr,
25855 + unsigned long start = (unsigned long) addr;
25857 + while (count--) {
25858 + writel(*(u32 *)addr, port);
25861 + __ide_flush_dcache_range(start, count * 4);
25864 #endif /* __KERNEL__ */
25866 --- a/include/asm-mips/io.h
25867 +++ b/include/asm-mips/io.h
25868 @@ -392,7 +392,8 @@ static inline unsigned int inl_p(unsigne
25869 return __ioswab32(__val);
25872 -static inline void __outsb(unsigned long port, void *addr, unsigned int count)
25873 +static inline void __outsb(unsigned long port, const void *addr,
25874 + unsigned int count)
25877 outb(*(u8 *)addr, port);
25878 @@ -408,7 +409,8 @@ static inline void __insb(unsigned long
25882 -static inline void __outsw(unsigned long port, void *addr, unsigned int count)
25883 +static inline void __outsw(unsigned long port, const void *addr,
25884 + unsigned int count)
25887 outw(*(u16 *)addr, port);
25888 @@ -424,7 +426,8 @@ static inline void __insw(unsigned long
25892 -static inline void __outsl(unsigned long port, void *addr, unsigned int count)
25893 +static inline void __outsl(unsigned long port, const void *addr,
25894 + unsigned int count)
25897 outl(*(u32 *)addr, port);
25898 --- a/include/asm-mips/mipsregs.h
25899 +++ b/include/asm-mips/mipsregs.h
25900 @@ -757,10 +757,18 @@ do { \
25901 #define read_c0_config1() __read_32bit_c0_register($16, 1)
25902 #define read_c0_config2() __read_32bit_c0_register($16, 2)
25903 #define read_c0_config3() __read_32bit_c0_register($16, 3)
25904 +#define read_c0_config4() __read_32bit_c0_register($16, 4)
25905 +#define read_c0_config5() __read_32bit_c0_register($16, 5)
25906 +#define read_c0_config6() __read_32bit_c0_register($16, 6)
25907 +#define read_c0_config7() __read_32bit_c0_register($16, 7)
25908 #define write_c0_config(val) __write_32bit_c0_register($16, 0, val)
25909 #define write_c0_config1(val) __write_32bit_c0_register($16, 1, val)
25910 #define write_c0_config2(val) __write_32bit_c0_register($16, 2, val)
25911 #define write_c0_config3(val) __write_32bit_c0_register($16, 3, val)
25912 +#define write_c0_config4(val) __write_32bit_c0_register($16, 4, val)
25913 +#define write_c0_config5(val) __write_32bit_c0_register($16, 5, val)
25914 +#define write_c0_config6(val) __write_32bit_c0_register($16, 6, val)
25915 +#define write_c0_config7(val) __write_32bit_c0_register($16, 7, val)
25918 * The WatchLo register. There may be upto 8 of them.
25919 @@ -874,42 +882,34 @@ do { \
25921 static inline void tlb_probe(void)
25923 - rm9000_tlb_hazard();
25924 __asm__ __volatile__(
25925 ".set noreorder\n\t"
25928 - rm9000_tlb_hazard();
25931 static inline void tlb_read(void)
25933 - rm9000_tlb_hazard();
25934 __asm__ __volatile__(
25935 ".set noreorder\n\t"
25938 - rm9000_tlb_hazard();
25941 static inline void tlb_write_indexed(void)
25943 - rm9000_tlb_hazard();
25944 __asm__ __volatile__(
25945 ".set noreorder\n\t"
25948 - rm9000_tlb_hazard();
25951 static inline void tlb_write_random(void)
25953 - rm9000_tlb_hazard();
25954 __asm__ __volatile__(
25955 ".set noreorder\n\t"
25958 - rm9000_tlb_hazard();
25962 --- a/include/asm-mips/mmu_context.h
25963 +++ b/include/asm-mips/mmu_context.h
25965 #define TLBMISS_HANDLER_SETUP_PGD(pgd) \
25966 pgd_current[smp_processor_id()] = (unsigned long)(pgd)
25967 #define TLBMISS_HANDLER_SETUP() \
25968 - write_c0_context((unsigned long) smp_processor_id() << (23 + 3)); \
25969 + write_c0_context((unsigned long) smp_processor_id() << 23); \
25970 TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
25971 extern unsigned long pgd_current[];
25973 --- a/include/asm-mips/pb1100.h
25974 +++ b/include/asm-mips/pb1100.h
25977 - * Alchemy Semi PB1100 Referrence Board
25978 + * AMD Alchemy PB1100 Reference Boards
25980 * Copyright 2001 MontaVista Software Inc.
25981 * Author: MontaVista Software, Inc.
25982 @@ -27,55 +27,108 @@
25983 #ifndef __ASM_PB1100_H
25984 #define __ASM_PB1100_H
25986 -#define PB1100_IDENT 0xAE000000
25987 -#define BOARD_STATUS_REG 0xAE000004
25988 - #define PB1100_ROM_SEL (1<<15)
25989 - #define PB1100_ROM_SIZ (1<<14)
25990 - #define PB1100_SWAP_BOOT (1<<13)
25991 - #define PB1100_FLASH_WP (1<<12)
25992 - #define PB1100_ROM_H_STS (1<<11)
25993 - #define PB1100_ROM_L_STS (1<<10)
25994 - #define PB1100_FLASH_H_STS (1<<9)
25995 - #define PB1100_FLASH_L_STS (1<<8)
25996 - #define PB1100_SRAM_SIZ (1<<7)
25997 - #define PB1100_TSC_BUSY (1<<6)
25998 - #define PB1100_PCMCIA_VS_MASK (3<<4)
25999 - #define PB1100_RS232_CD (1<<3)
26000 - #define PB1100_RS232_CTS (1<<2)
26001 - #define PB1100_RS232_DSR (1<<1)
26002 - #define PB1100_RS232_RI (1<<0)
26004 -#define PB1100_IRDA_RS232 0xAE00000C
26005 - #define PB1100_IRDA_FULL (0<<14) /* full power */
26006 - #define PB1100_IRDA_SHUTDOWN (1<<14)
26007 - #define PB1100_IRDA_TT (2<<14) /* 2/3 power */
26008 - #define PB1100_IRDA_OT (3<<14) /* 1/3 power */
26009 - #define PB1100_IRDA_FIR (1<<13)
26011 -#define PCMCIA_BOARD_REG 0xAE000010
26012 - #define PB1100_SD_WP1_RO (1<<15) /* read only */
26013 - #define PB1100_SD_WP0_RO (1<<14) /* read only */
26014 - #define PB1100_SD_PWR1 (1<<11) /* applies power to SD1 */
26015 - #define PB1100_SD_PWR0 (1<<10) /* applies power to SD0 */
26016 - #define PB1100_SEL_SD_CONN1 (1<<9)
26017 - #define PB1100_SEL_SD_CONN0 (1<<8)
26018 - #define PC_DEASSERT_RST (1<<7)
26019 - #define PC_DRV_EN (1<<4)
26021 -#define PB1100_G_CONTROL 0xAE000014 /* graphics control */
26023 -#define PB1100_RST_VDDI 0xAE00001C
26024 - #define PB1100_SOFT_RESET (1<<15) /* clear to reset the board */
26025 - #define PB1100_VDDI_MASK (0x1F)
26026 +#define BCSR_KSEG1_ADDR 0xAE000000
26029 + * Overlay data structure of the Pb1100 board registers.
26030 + * Registers located at physical 0E0000xx, KSEG1 0xAE0000xx
26032 +typedef volatile struct
26034 + /*00*/ unsigned short whoami;
26035 + unsigned short reserved0;
26036 + /*04*/ unsigned short status;
26037 + unsigned short reserved1;
26038 + /*08*/ unsigned short switches;
26039 + unsigned short reserved2;
26040 + /*0C*/ unsigned short resets;
26041 + unsigned short reserved3;
26042 + /*10*/ unsigned short pcmcia;
26043 + unsigned short reserved4;
26044 + /*14*/ unsigned short graphics;
26045 + unsigned short reserved5;
26046 + /*18*/ unsigned short leds;
26047 + unsigned short reserved6;
26048 + /*1C*/ unsigned short swreset;
26049 + unsigned short reserved7;
26053 -#define PB1100_LEDS 0xAE000018
26055 -/* 11:8 is 4 discreet LEDs. Clearing a bit illuminates the LED.
26056 - * 7:0 is the LED Display's decimal points.
26058 + * Register/mask bit definitions for the BCSRs
26060 -#define PB1100_HEX_LED 0xAE000018
26061 +#define BCSR_WHOAMI_DCID 0x000F
26062 +#define BCSR_WHOAMI_CPLD 0x00F0
26063 +#define BCSR_WHOAMI_BOARD 0x0F00
26065 +#define BCSR_STATUS_RS232_RI 0x0001
26066 +#define BCSR_STATUS_RS232_DSR 0x0002
26067 +#define BCSR_STATUS_RS232_CTS 0x0004
26068 +#define BCSR_STATUS_RS232_CD 0x0008
26069 +#define BCSR_STATUS_PCMCIA_VS_MASK 0x0030
26070 +#define BCSR_STATUS_TSC_BUSY 0x0040
26071 +#define BCSR_STATUS_SRAM_SIZ 0x0080
26072 +#define BCSR_STATUS_FLASH_L_STS 0x0100
26073 +#define BCSR_STATUS_FLASH_H_STS 0x0200
26074 +#define BCSR_STATUS_ROM_H_STS 0x0400
26075 +#define BCSR_STATUS_ROM_L_STS 0x0800
26076 +#define BCSR_STATUS_FLASH_WP 0x1000
26077 +#define BCSR_STATUS_SWAP_BOOT 0x2000
26078 +#define BCSR_STATUS_ROM_SIZ 0x4000
26079 +#define BCSR_STATUS_ROM_SEL 0x8000
26081 +#define BCSR_SWITCHES_DIP 0x00FF
26082 +#define BCSR_SWITCHES_DIP_1 0x0080
26083 +#define BCSR_SWITCHES_DIP_2 0x0040
26084 +#define BCSR_SWITCHES_DIP_3 0x0020
26085 +#define BCSR_SWITCHES_DIP_4 0x0010
26086 +#define BCSR_SWITCHES_DIP_5 0x0008
26087 +#define BCSR_SWITCHES_DIP_6 0x0004
26088 +#define BCSR_SWITCHES_DIP_7 0x0002
26089 +#define BCSR_SWITCHES_DIP_8 0x0001
26090 +#define BCSR_SWITCHES_ROTARY 0x0F00
26091 +#define BCSR_SWITCHES_SDO_CL 0x8000
26093 +#define BCSR_RESETS_PHY0 0x0001
26094 +#define BCSR_RESETS_PHY1 0x0002
26095 +#define BCSR_RESETS_DC 0x0004
26096 +#define BCSR_RESETS_RS232_RTS 0x0100
26097 +#define BCSR_RESETS_RS232_DTR 0x0200
26098 +#define BCSR_RESETS_FIR_SEL 0x2000
26099 +#define BCSR_RESETS_IRDA_MODE_MASK 0xC000
26100 +#define BCSR_RESETS_IRDA_MODE_FULL 0x0000
26101 +#define BCSR_RESETS_IRDA_MODE_OFF 0x4000
26102 +#define BCSR_RESETS_IRDA_MODE_2_3 0x8000
26103 +#define BCSR_RESETS_IRDA_MODE_1_3 0xC000
26105 +#define BCSR_PCMCIA_PC0VPP 0x0003
26106 +#define BCSR_PCMCIA_PC0VCC 0x000C
26107 +#define BCSR_PCMCIA_PC0_DR_VEN 0x0010
26108 +#define BCSR_PCMCIA_PC0RST 0x0080
26109 +#define BCSR_PCMCIA_SEL_SD_CON0 0x0100
26110 +#define BCSR_PCMCIA_SEL_SD_CON1 0x0200
26111 +#define BCSR_PCMCIA_SD0_PWR 0x0400
26112 +#define BCSR_PCMCIA_SD1_PWR 0x0800
26113 +#define BCSR_PCMCIA_SD0_WP 0x4000
26114 +#define BCSR_PCMCIA_SD1_WP 0x8000
26116 +#define PB1100_G_CONTROL 0xAE000014
26117 +#define BCSR_GRAPHICS_GPX_SMPASS 0x0010
26118 +#define BCSR_GRAPHICS_GPX_BIG_ENDIAN 0x0020
26119 +#define BCSR_GRAPHICS_GPX_RST 0x0040
26121 +#define BCSR_LEDS_DECIMALS 0x00FF
26122 +#define BCSR_LEDS_LED0 0x0100
26123 +#define BCSR_LEDS_LED1 0x0200
26124 +#define BCSR_LEDS_LED2 0x0400
26125 +#define BCSR_LEDS_LED3 0x0800
26127 +#define BCSR_SWRESET_RESET 0x0080
26128 +#define BCSR_VDDI_VDI 0x001F
26130 -/* PCMCIA PB1100 specific defines */
26132 + /* PCMCIA Pb1x00 specific defines */
26133 #define PCMCIA_MAX_SOCK 0
26134 #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1)
26137 #define SET_VCC_VPP(VCC, VPP) (((VCC)<<2) | ((VPP)<<0))
26139 #endif /* __ASM_PB1100_H */
26142 +++ b/include/asm-mips/pb1200.h
26145 + * AMD Alchemy PB1200 Referrence Board
26146 + * Board Registers defines.
26148 + * ########################################################################
26150 + * This program is free software; you can distribute it and/or modify it
26151 + * under the terms of the GNU General Public License (Version 2) as
26152 + * published by the Free Software Foundation.
26154 + * This program is distributed in the hope it will be useful, but WITHOUT
26155 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
26156 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
26157 + * for more details.
26159 + * You should have received a copy of the GNU General Public License along
26160 + * with this program; if not, write to the Free Software Foundation, Inc.,
26161 + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
26163 + * ########################################################################
26167 +#ifndef __ASM_PB1200_H
26168 +#define __ASM_PB1200_H
26170 +#include <linux/types.h>
26172 +// This is defined in au1000.h with bogus value
26173 +#undef AU1X00_EXTERNAL_INT
26175 +#define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX
26176 +#define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX
26177 +#define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC1_TX
26178 +#define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC1_RX
26180 +/* SPI and SMB are muxed on the Pb1200 board.
26181 + Refer to board documentation.
26183 +#define SPI_PSC_BASE PSC0_BASE_ADDR
26184 +#define SMBUS_PSC_BASE PSC0_BASE_ADDR
26185 +/* AC97 and I2S are muxed on the Pb1200 board.
26186 + Refer to board documentation.
26188 +#define AC97_PSC_BASE PSC1_BASE_ADDR
26189 +#define I2S_PSC_BASE PSC1_BASE_ADDR
26191 +#define BCSR_KSEG1_ADDR 0xAD800000
26193 +typedef volatile struct
26195 + /*00*/ u16 whoami;
26197 + /*04*/ u16 status;
26199 + /*08*/ u16 switches;
26201 + /*0C*/ u16 resets;
26204 + /*10*/ u16 pcmcia;
26206 + /*14*/ u16 board;
26208 + /*18*/ u16 disk_leds;
26210 + /*1C*/ u16 system;
26213 + /*20*/ u16 intclr;
26215 + /*24*/ u16 intset;
26217 + /*28*/ u16 intclr_mask;
26219 + /*2C*/ u16 intset_mask;
26222 + /*30*/ u16 sig_status;
26224 + /*34*/ u16 int_status;
26226 + /*38*/ u16 reserved14;
26228 + /*3C*/ u16 reserved16;
26233 +static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
26236 + * Register bit definitions for the BCSRs
26238 +#define BCSR_WHOAMI_DCID 0x000F
26239 +#define BCSR_WHOAMI_CPLD 0x00F0
26240 +#define BCSR_WHOAMI_BOARD 0x0F00
26242 +#define BCSR_STATUS_PCMCIA0VS 0x0003
26243 +#define BCSR_STATUS_PCMCIA1VS 0x000C
26244 +#define BCSR_STATUS_SWAPBOOT 0x0040
26245 +#define BCSR_STATUS_FLASHBUSY 0x0100
26246 +#define BCSR_STATUS_IDECBLID 0x0200
26247 +#define BCSR_STATUS_SD0WP 0x0400
26248 +#define BCSR_STATUS_SD1WP 0x0800
26249 +#define BCSR_STATUS_U0RXD 0x1000
26250 +#define BCSR_STATUS_U1RXD 0x2000
26252 +#define BCSR_SWITCHES_OCTAL 0x00FF
26253 +#define BCSR_SWITCHES_DIP_1 0x0080
26254 +#define BCSR_SWITCHES_DIP_2 0x0040
26255 +#define BCSR_SWITCHES_DIP_3 0x0020
26256 +#define BCSR_SWITCHES_DIP_4 0x0010
26257 +#define BCSR_SWITCHES_DIP_5 0x0008
26258 +#define BCSR_SWITCHES_DIP_6 0x0004
26259 +#define BCSR_SWITCHES_DIP_7 0x0002
26260 +#define BCSR_SWITCHES_DIP_8 0x0001
26261 +#define BCSR_SWITCHES_ROTARY 0x0F00
26263 +#define BCSR_RESETS_ETH 0x0001
26264 +#define BCSR_RESETS_CAMERA 0x0002
26265 +#define BCSR_RESETS_DC 0x0004
26266 +#define BCSR_RESETS_IDE 0x0008
26267 +/* not resets but in the same register */
26268 +#define BCSR_RESETS_WSCFSM 0x0800
26269 +#define BCSR_RESETS_PCS0MUX 0x1000
26270 +#define BCSR_RESETS_PCS1MUX 0x2000
26271 +#define BCSR_RESETS_SPISEL 0x4000
26272 +#define BCSR_RESETS_SD1MUX 0x8000
26274 +#define BCSR_PCMCIA_PC0VPP 0x0003
26275 +#define BCSR_PCMCIA_PC0VCC 0x000C
26276 +#define BCSR_PCMCIA_PC0DRVEN 0x0010
26277 +#define BCSR_PCMCIA_PC0RST 0x0080
26278 +#define BCSR_PCMCIA_PC1VPP 0x0300
26279 +#define BCSR_PCMCIA_PC1VCC 0x0C00
26280 +#define BCSR_PCMCIA_PC1DRVEN 0x1000
26281 +#define BCSR_PCMCIA_PC1RST 0x8000
26283 +#define BCSR_BOARD_LCDVEE 0x0001
26284 +#define BCSR_BOARD_LCDVDD 0x0002
26285 +#define BCSR_BOARD_LCDBL 0x0004
26286 +#define BCSR_BOARD_CAMSNAP 0x0010
26287 +#define BCSR_BOARD_CAMPWR 0x0020
26288 +#define BCSR_BOARD_SD0PWR 0x0040
26289 +#define BCSR_BOARD_SD1PWR 0x0080
26291 +#define BCSR_LEDS_DECIMALS 0x00FF
26292 +#define BCSR_LEDS_LED0 0x0100
26293 +#define BCSR_LEDS_LED1 0x0200
26294 +#define BCSR_LEDS_LED2 0x0400
26295 +#define BCSR_LEDS_LED3 0x0800
26297 +#define BCSR_SYSTEM_VDDI 0x001F
26298 +#define BCSR_SYSTEM_POWEROFF 0x4000
26299 +#define BCSR_SYSTEM_RESET 0x8000
26301 +/* Bit positions for the different interrupt sources */
26302 +#define BCSR_INT_IDE 0x0001
26303 +#define BCSR_INT_ETH 0x0002
26304 +#define BCSR_INT_PC0 0x0004
26305 +#define BCSR_INT_PC0STSCHG 0x0008
26306 +#define BCSR_INT_PC1 0x0010
26307 +#define BCSR_INT_PC1STSCHG 0x0020
26308 +#define BCSR_INT_DC 0x0040
26309 +#define BCSR_INT_FLASHBUSY 0x0080
26310 +#define BCSR_INT_PC0INSERT 0x0100
26311 +#define BCSR_INT_PC0EJECT 0x0200
26312 +#define BCSR_INT_PC1INSERT 0x0400
26313 +#define BCSR_INT_PC1EJECT 0x0800
26314 +#define BCSR_INT_SD0INSERT 0x1000
26315 +#define BCSR_INT_SD0EJECT 0x2000
26316 +#define BCSR_INT_SD1INSERT 0x4000
26317 +#define BCSR_INT_SD1EJECT 0x8000
26319 +#define AU1XXX_SMC91111_PHYS_ADDR (0x0D000300)
26320 +#define AU1XXX_SMC91111_IRQ PB1200_ETH_INT
26322 +#define AU1XXX_ATA_PHYS_ADDR (0x0C800000)
26323 +#define AU1XXX_ATA_PHYS_LEN (0x100)
26324 +#define AU1XXX_ATA_REG_OFFSET (5)
26325 +#define AU1XXX_ATA_INT PB1200_IDE_INT
26326 +#define AU1XXX_ATA_DDMA_REQ DSCR_CMD0_DMA_REQ1;
26327 +#define AU1XXX_ATA_RQSIZE 128
26329 +#define NAND_PHYS_ADDR 0x1C000000
26331 +/* Timing values as described in databook, * ns value stripped of
26333 + * These defines are here rather than an SOC1200 generic file because
26334 + * the parts chosen on another board may be different and may require
26335 + * different timings.
26337 +#define NAND_T_H (18 >> 2)
26338 +#define NAND_T_PUL (30 >> 2)
26339 +#define NAND_T_SU (30 >> 2)
26340 +#define NAND_T_WH (30 >> 2)
26342 +/* Bitfield shift amounts */
26343 +#define NAND_T_H_SHIFT 0
26344 +#define NAND_T_PUL_SHIFT 4
26345 +#define NAND_T_SU_SHIFT 8
26346 +#define NAND_T_WH_SHIFT 12
26348 +#define NAND_TIMING ((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \
26349 + ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \
26350 + ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \
26351 + ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)
26355 + * External Interrupts for Pb1200 as of 8/6/2004.
26356 + * Bit positions in the CPLD registers can be calculated by taking
26357 + * the interrupt define and subtracting the PB1200_INT_BEGIN value.
26358 + * *example: IDE bis pos is = 64 - 64
26359 + ETH bit pos is = 65 - 64
26361 +#define PB1200_INT_BEGIN (AU1000_LAST_INTC1_INT + 1)
26362 +#define PB1200_IDE_INT (PB1200_INT_BEGIN + 0)
26363 +#define PB1200_ETH_INT (PB1200_INT_BEGIN + 1)
26364 +#define PB1200_PC0_INT (PB1200_INT_BEGIN + 2)
26365 +#define PB1200_PC0_STSCHG_INT (PB1200_INT_BEGIN + 3)
26366 +#define PB1200_PC1_INT (PB1200_INT_BEGIN + 4)
26367 +#define PB1200_PC1_STSCHG_INT (PB1200_INT_BEGIN + 5)
26368 +#define PB1200_DC_INT (PB1200_INT_BEGIN + 6)
26369 +#define PB1200_FLASHBUSY_INT (PB1200_INT_BEGIN + 7)
26370 +#define PB1200_PC0_INSERT_INT (PB1200_INT_BEGIN + 8)
26371 +#define PB1200_PC0_EJECT_INT (PB1200_INT_BEGIN + 9)
26372 +#define PB1200_PC1_INSERT_INT (PB1200_INT_BEGIN + 10)
26373 +#define PB1200_PC1_EJECT_INT (PB1200_INT_BEGIN + 11)
26374 +#define PB1200_SD0_INSERT_INT (PB1200_INT_BEGIN + 12)
26375 +#define PB1200_SD0_EJECT_INT (PB1200_INT_BEGIN + 13)
26376 +#define PB1200_SD1_INSERT_INT (PB1200_INT_BEGIN + 14)
26377 +#define PB1200_SD1_EJECT_INT (PB1200_INT_BEGIN + 15)
26379 +#define PB1200_INT_END (PB1200_INT_BEGIN + 15)
26381 +/* For drivers/pcmcia/au1000_db1x00.c */
26382 +#define BOARD_PC0_INT PB1200_PC0_INT
26383 +#define BOARD_PC1_INT PB1200_PC1_INT
26384 +#define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1<<(8+(2*SOCKET)))
26386 +#endif /* __ASM_PB1200_H */
26388 --- a/include/asm-mips/pb1550.h
26389 +++ b/include/asm-mips/pb1550.h
26390 @@ -30,13 +30,11 @@
26392 #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX
26393 #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX
26394 -#define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC3_TX
26395 -#define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC3_RX
26397 #define SPI_PSC_BASE PSC0_BASE_ADDR
26398 #define AC97_PSC_BASE PSC1_BASE_ADDR
26399 #define SMBUS_PSC_BASE PSC2_BASE_ADDR
26400 #define I2S_PSC_BASE PSC3_BASE_ADDR
26403 #define BCSR_PHYS_ADDR 0xAF000000
26405 @@ -160,9 +158,23 @@ static BCSR * const bcsr = (BCSR *)BCSR_
26406 #define NAND_T_SU_SHIFT 8
26407 #define NAND_T_WH_SHIFT 12
26409 -#define NAND_TIMING ((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \
26410 - ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \
26411 - ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \
26412 - ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)
26413 +#define NAND_TIMING ((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \
26414 + ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \
26415 + ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \
26416 + ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)
26419 + * Daughter card information.
26421 +#define DAUGHTER_CARD_BASE (0xAC000000)
26422 +#define DAUGHTER_CARD_MEM_SIZE (0xADFFFFFF - DAUGHTER_CARD_BASE + 1)
26423 +#define DAUGHTER_CARD_IRQ (AU1000_GPIO_3)
26425 +/* DC_IDE and DC_ETHERNET */
26426 +#define AU1XXX_ATA_PHYS_ADDR (0x0C000000)
26427 +#define AU1XXX_ATA_REG_OFFSET (5)
26429 +#define AU1XXX_SMC91111_PHYS_ADDR (0x0C000300)
26430 +#define AU1XXX_SMC91111_IRQ AU1000_GPIO_3
26432 #endif /* __ASM_PB1550_H */
26433 --- a/include/asm-mips/reg.h
26434 +++ b/include/asm-mips/reg.h
26439 +#define EF_REG26 32
26440 +#define EF_REG27 33
26442 #define EF_REG28 34
26443 #define EF_REG29 35
26444 #define EF_REG30 36
26446 #define EF_CP0_BADVADDR 41
26447 #define EF_CP0_STATUS 42
26448 #define EF_CP0_CAUSE 43
26449 +#define EF_UNUSED0 44
26451 #define EF_SIZE 180 /* size in bytes */
26453 --- a/include/asm-mips/sgi/hpc3.h
26454 +++ b/include/asm-mips/sgi/hpc3.h
26455 @@ -128,26 +128,26 @@ struct hpc3_ethregs {
26456 volatile u32 rx_gfptr; /* current GIO fifo ptr */
26457 volatile u32 rx_dfptr; /* current device fifo ptr */
26458 u32 _unused1; /* padding */
26459 - volatile u32 rx_reset; /* reset register */
26460 -#define HPC3_ERXRST_CRESET 0x1 /* Reset dma channel and external controller */
26461 -#define HPC3_ERXRST_CLRIRQ 0x2 /* Clear channel interrupt */
26462 -#define HPC3_ERXRST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */
26464 - volatile u32 rx_dconfig; /* DMA configuration register */
26465 -#define HPC3_ERXDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */
26466 -#define HPC3_ERXDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */
26467 -#define HPC3_ERXDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */
26468 -#define HPC3_ERXDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */
26469 -#define HPC3_ERXDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */
26470 -#define HPC3_ERXDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */
26471 -#define HPC3_ERXDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */
26472 -#define HPC3_ERXDCFG_PTO 0x30000 /* Programmed timeout value for above two */
26474 - volatile u32 rx_pconfig; /* PIO configuration register */
26475 -#define HPC3_ERXPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */
26476 -#define HPC3_ERXPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */
26477 -#define HPC3_ERXPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */
26478 -#define HPC3_ERXPCFG_TST 0x1000 /* Diagnistic ram test feature bit */
26479 + volatile u32 reset; /* reset register */
26480 +#define HPC3_ERST_CRESET 0x1 /* Reset dma channel and external controller */
26481 +#define HPC3_ERST_CLRIRQ 0x2 /* Clear channel interrupt */
26482 +#define HPC3_ERST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */
26484 + volatile u32 dconfig; /* DMA configuration register */
26485 +#define HPC3_EDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */
26486 +#define HPC3_EDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */
26487 +#define HPC3_EDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */
26488 +#define HPC3_EDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */
26489 +#define HPC3_EDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */
26490 +#define HPC3_EDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */
26491 +#define HPC3_EDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */
26492 +#define HPC3_EDCFG_PTO 0x30000 /* Programmed timeout value for above two */
26494 + volatile u32 pconfig; /* PIO configuration register */
26495 +#define HPC3_EPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */
26496 +#define HPC3_EPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */
26497 +#define HPC3_EPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */
26498 +#define HPC3_EPCFG_TST 0x1000 /* Diagnistic ram test feature bit */
26500 u32 _unused2[0x1000/4 - 8]; /* padding */
26502 @@ -221,7 +221,7 @@ struct hpc3_regs {
26503 #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */
26505 u32 _unused1[0x14000/4 - 5]; /* padding */
26508 /* Now direct PIO per-HPC3 peripheral access to external regs. */
26509 volatile u32 scsi0_ext[256]; /* SCSI channel 0 external regs */
26510 u32 _unused2[0x7c00/4];
26511 @@ -304,7 +304,7 @@ struct hpc3_regs {
26512 volatile u32 bbram[8192-50-14]; /* Battery backed ram */
26517 * It is possible to have two HPC3's within the address space on
26518 * one machine, though only having one is more likely on an Indy.
26520 --- a/include/asm-mips/tx4927/tx4927.h
26521 +++ b/include/asm-mips/tx4927/tx4927.h
26525 /* TX4927 Configuration registers (64-bit registers) */
26526 -#define TX4927_CONFIG_BASE 0xe300
26527 -#define TX4927_CONFIG_CCFG 0xe300
26528 +#define TX4927_CONFIG_BASE 0xe000
26529 +#define TX4927_CONFIG_CCFG 0xe000
26530 #define TX4927_CONFIG_CCFG_RESERVED_42_63 BM_63_42
26531 #define TX4927_CONFIG_CCFG_WDRST BM_41_41
26532 #define TX4927_CONFIG_CCFG_WDREXEN BM_40_40
26533 @@ -124,14 +124,14 @@
26534 #define TX4927_CONFIG_CCFG_ENDIAN BM_02_02
26535 #define TX4927_CONFIG_CCFG_ARMODE BM_01_01
26536 #define TX4927_CONFIG_CCFG_ACEHOLD BM_00_00
26537 -#define TX4927_CONFIG_REVID 0xe308
26538 +#define TX4927_CONFIG_REVID 0xe008
26539 #define TX4927_CONFIG_REVID_RESERVED_32_63 BM_32_63
26540 #define TX4927_CONFIG_REVID_PCODE BM_16_31
26541 #define TX4927_CONFIG_REVID_MJERREV BM_12_15
26542 #define TX4927_CONFIG_REVID_MINEREV BM_08_11
26543 #define TX4927_CONFIG_REVID_MJREV BM_04_07
26544 #define TX4927_CONFIG_REVID_MINREV BM_00_03
26545 -#define TX4927_CONFIG_PCFG 0xe310
26546 +#define TX4927_CONFIG_PCFG 0xe010
26547 #define TX4927_CONFIG_PCFG_RESERVED_57_63 BM_57_63
26548 #define TX4927_CONFIG_PCFG_DRVDATA BM_56_56
26549 #define TX4927_CONFIG_PCFG_DRVCB BM_55_55
26550 @@ -197,10 +197,10 @@
26551 #define TX4927_CONFIG_PCFG_DMASEL0_SIO1 BM_00_00
26552 #define TX4927_CONFIG_PCFG_DMASEL0_ACLC0 BM_01_01
26553 #define TX4927_CONFIG_PCFG_DMASEL0_ACLC2 BM_00_01
26554 -#define TX4927_CONFIG_TOEA 0xe318
26555 +#define TX4927_CONFIG_TOEA 0xe018
26556 #define TX4927_CONFIG_TOEA_RESERVED_36_63 BM_36_63
26557 #define TX4927_CONFIG_TOEA_TOEA BM_00_35
26558 -#define TX4927_CONFIG_CLKCTR 0xe320
26559 +#define TX4927_CONFIG_CLKCTR 0xe020
26560 #define TX4927_CONFIG_CLKCTR_RESERVED_26_63 BM_26_63
26561 #define TX4927_CONFIG_CLKCTR_ACLCKD BM_25_25
26562 #define TX4927_CONFIG_CLKCTR_PIOCKD BM_24_24
26563 @@ -223,7 +223,7 @@
26564 #define TX4927_CONFIG_CLKCTR_TM2RST BM_02_02
26565 #define TX4927_CONFIG_CLKCTR_SIO0RST BM_01_01
26566 #define TX4927_CONFIG_CLKCTR_SIO1RST BM_00_00
26567 -#define TX4927_CONFIG_GARBC 0xe330
26568 +#define TX4927_CONFIG_GARBC 0xe030
26569 #define TX4927_CONFIG_GARBC_RESERVED_10_63 BM_10_63
26570 #define TX4927_CONFIG_GARBC_SET_09 BM_09_09
26571 #define TX4927_CONFIG_GARBC_ARBMD BM_08_08
26572 @@ -243,7 +243,7 @@
26573 #define TX4927_CONFIG_GARBC_PRIORITY_H3_PDMAC BM_00_00
26574 #define TX4927_CONFIG_GARBC_PRIORITY_H3_DMAC BM_01_01
26575 #define TX4927_CONFIG_GARBC_PRIORITY_H3_BAD_VALUE BM_00_01
26576 -#define TX4927_CONFIG_RAMP 0xe348
26577 +#define TX4927_CONFIG_RAMP 0xe048
26578 #define TX4927_CONFIG_RAMP_RESERVED_20_63 BM_20_63
26579 #define TX4927_CONFIG_RAMP_RAMP BM_00_19
26580 #define TX4927_CONFIG_LIMIT 0xefff
26581 @@ -456,7 +456,7 @@
26582 #define TX4927_ACLC_ACINTSTS 0xf710
26583 #define TX4927_ACLC_ACINTMSTS 0xf714
26584 #define TX4927_ACLC_ACINTEN 0xf718
26585 -#define TX4927_ACLC_ACINTDIS 0xfR71c
26586 +#define TX4927_ACLC_ACINTDIS 0xf71c
26587 #define TX4927_ACLC_ACSEMAPH 0xf720
26588 #define TX4927_ACLC_ACGPIDAT 0xf740
26589 #define TX4927_ACLC_ACGPODAT 0xf744
26590 --- a/include/asm-mips/unistd.h
26591 +++ b/include/asm-mips/unistd.h
26592 @@ -760,7 +760,7 @@ type name(void) \
26594 return (type) __v0; \
26597 + return (type)-1; \
26601 @@ -788,7 +788,7 @@ type name(atype a) \
26603 return (type) __v0; \
26606 + return (type)-1; \
26609 #define _syscall2(type,name,atype,a,btype,b) \
26610 @@ -813,7 +813,7 @@ type name(atype a, btype b) \
26612 return (type) __v0; \
26615 + return (type)-1; \
26618 #define _syscall3(type,name,atype,a,btype,b,ctype,c) \
26619 @@ -839,7 +839,7 @@ type name(atype a, btype b, ctype c) \
26621 return (type) __v0; \
26624 + return (type)-1; \
26627 #define _syscall4(type,name,atype,a,btype,b,ctype,c,dtype,d) \
26628 @@ -865,7 +865,7 @@ type name(atype a, btype b, ctype c, dty
26630 return (type) __v0; \
26633 + return (type)-1; \
26636 #if (_MIPS_SIM == _MIPS_SIM_ABI32)
26637 @@ -902,7 +902,7 @@ type name(atype a, btype b, ctype c, dty
26639 return (type) __v0; \
26642 + return (type)-1; \
26645 #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \
26646 @@ -935,7 +935,7 @@ type name(atype a, btype b, ctype c, dty
26648 return (type) __v0; \
26651 + return (type)-1; \
26654 #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
26655 @@ -966,7 +966,7 @@ type name (atype a,btype b,ctype c,dtype
26657 return (type) __v0; \
26660 + return (type)-1; \
26663 #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \
26664 @@ -995,7 +995,7 @@ type name (atype a,btype b,ctype c,dtype
26666 return (type) __v0; \
26669 + return (type)-1; \
26672 #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
26673 --- a/include/asm-mips64/checksum.h
26674 +++ b/include/asm-mips64/checksum.h
26675 @@ -144,7 +144,7 @@ static inline unsigned long csum_tcpudp_
26676 "daddu\t%0, %4\n\t"
26677 "dsll32\t$1, %0, 0\n\t"
26678 "daddu\t%0, $1\n\t"
26679 - "dsrl32\t%0, %0, 0\n\t"
26680 + "dsra32\t%0, %0, 0\n\t"
26683 : "0" (daddr), "r"(saddr),
26684 --- a/include/asm-mips64/elf.h
26685 +++ b/include/asm-mips64/elf.h
26686 @@ -64,9 +64,10 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
26687 #define USE_ELF_CORE_DUMP
26688 #define ELF_EXEC_PAGESIZE PAGE_SIZE
26690 -#define ELF_CORE_COPY_REGS(_dest,_regs) \
26691 - memcpy((char *) &_dest, (char *) _regs, \
26692 - sizeof(struct pt_regs));
26693 +extern void dump_regs(elf_greg_t *, struct pt_regs *regs);
26695 +#define ELF_CORE_COPY_REGS(elf_regs, regs) \
26696 + dump_regs((elf_greg_t *)&(elf_regs), regs);
26698 /* This yields a mask that user programs can use to figure out what
26699 instruction set this cpu supports. This could be done in userspace,
26700 --- a/include/asm-mips64/hazards.h
26701 +++ b/include/asm-mips64/hazards.h
26703 * License. See the file "COPYING" in the main directory of this archive
26704 * for more details.
26706 - * Copyright (C) 2003 Ralf Baechle
26707 + * Copyright (C) 2003, 2004 Ralf Baechle
26709 #ifndef _ASM_HAZARDS_H
26710 #define _ASM_HAZARDS_H
26711 @@ -12,37 +12,200 @@
26713 #ifdef __ASSEMBLY__
26720 * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent
26721 * use of the JTLB for instructions should not occur for 4 cpu cycles and use
26722 * for data translations should not occur for 3 cpu cycles.
26724 #ifdef CONFIG_CPU_RM9000
26725 -#define rm9000_tlb_hazard \
26727 +#define mtc0_tlbw_hazard \
26730 - ssnop; ssnop; ssnop; ssnop; \
26732 + _ssnop; _ssnop; _ssnop; _ssnop; \
26735 +#define tlbw_eret_hazard \
26738 + _ssnop; _ssnop; _ssnop; _ssnop; \
26742 -#define rm9000_tlb_hazard
26745 + * The taken branch will result in a two cycle penalty for the two killed
26746 + * instructions on R4000 / R4400. Other processors only have a single cycle
26747 + * hazard so this is nice trick to have an optimal code for a range of
26750 +#define mtc0_tlbw_hazard \
26752 +#define tlbw_eret_hazard \
26757 + * mtc0->mfc0 hazard
26758 + * The 24K has a 2 cycle mtc0/mfc0 execution hazard.
26759 + * It is a MIPS32R2 processor so ehb will clear the hazard.
26762 +#ifdef CONFIG_CPU_MIPSR2
26764 + * Use a macro for ehb unless explicit support for MIPSR2 is enabled
26770 +#define irq_enable_hazard \
26771 + ehb # irq_enable_hazard
26773 +#define irq_disable_hazard \
26774 + ehb # irq_disable_hazard
26776 +#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000)
26779 + * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
26782 +#define irq_enable_hazard
26784 +#define irq_disable_hazard
26789 + * Classic MIPS needs 1 - 3 nops or ssnops
26791 +#define irq_enable_hazard
26792 +#define irq_disable_hazard \
26793 + _ssnop; _ssnop; _ssnop
26797 +#else /* __ASSEMBLY__ */
26800 * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent
26801 * use of the JTLB for instructions should not occur for 4 cpu cycles and use
26802 * for data translations should not occur for 3 cpu cycles.
26804 #ifdef CONFIG_CPU_RM9000
26805 -#define rm9000_tlb_hazard() \
26807 +#define mtc0_tlbw_hazard() \
26808 + __asm__ __volatile__( \
26809 + ".set\tmips32\n\t" \
26810 + "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
26813 +#define tlbw_use_hazard() \
26814 __asm__ __volatile__( \
26815 ".set\tmips32\n\t" \
26816 - "ssnop; ssnop; ssnop; ssnop\n\t" \
26817 + "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
26820 -#define rm9000_tlb_hazard() do { } while (0)
26823 + * Overkill warning ...
26825 +#define mtc0_tlbw_hazard() \
26826 + __asm__ __volatile__( \
26827 + ".set noreorder\n\t" \
26828 + "nop; nop; nop; nop; nop; nop;\n\t" \
26829 + ".set reorder\n\t")
26831 +#define tlbw_use_hazard() \
26832 + __asm__ __volatile__( \
26833 + ".set noreorder\n\t" \
26834 + "nop; nop; nop; nop; nop; nop;\n\t" \
26835 + ".set reorder\n\t")
26840 + * mtc0->mfc0 hazard
26841 + * The 24K has a 2 cycle mtc0/mfc0 execution hazard.
26842 + * It is a MIPS32R2 processor so ehb will clear the hazard.
26845 +#ifdef CONFIG_CPU_MIPSR2
26847 + * Use a macro for ehb unless explicit support for MIPSR2 is enabled
26850 + " .macro ehb \n\t"
26851 + " sll $0, $0, 3 \n\t"
26854 + " .macro\tirq_enable_hazard \n\t"
26858 + " .macro\tirq_disable_hazard \n\t"
26862 +#define irq_enable_hazard() \
26863 + __asm__ __volatile__( \
26864 + "ehb\t\t\t\t# irq_enable_hazard")
26866 +#define irq_disable_hazard() \
26867 + __asm__ __volatile__( \
26868 + "ehb\t\t\t\t# irq_disable_hazard")
26870 +#elif defined(CONFIG_CPU_R10000)
26873 + * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
26877 + " .macro\tirq_enable_hazard \n\t"
26880 + " .macro\tirq_disable_hazard \n\t"
26883 +#define irq_enable_hazard() do { } while (0)
26884 +#define irq_disable_hazard() do { } while (0)
26889 + * Default for classic MIPS processors. Assume worst case hazards but don't
26890 + * care about the irq_enable_hazard - sooner or later the hardware will
26891 + * enable it and we don't care when exactly.
26895 + " .macro _ssnop \n\t"
26896 + " sll $0, $2, 1 \n\t"
26900 + " # There is a hazard but we do not care \n\t"
26902 + " .macro\tirq_enable_hazard \n\t"
26905 + " .macro\tirq_disable_hazard \n\t"
26906 + " _ssnop; _ssnop; _ssnop \n\t"
26909 +#define irq_enable_hazard() do { } while (0)
26910 +#define irq_disable_hazard() \
26911 + __asm__ __volatile__( \
26912 + "_ssnop; _ssnop; _ssnop;\t\t# irq_disable_hazard")
26916 +#endif /* __ASSEMBLY__ */
26918 #endif /* _ASM_HAZARDS_H */
26919 --- a/include/asm-mips64/ide.h
26920 +++ b/include/asm-mips64/ide.h
26921 @@ -32,12 +32,12 @@ struct ide_ops {
26923 extern struct ide_ops *ide_ops;
26925 -static __inline__ int ide_default_irq(ide_ioreg_t base)
26926 +static inline int ide_default_irq(ide_ioreg_t base)
26928 return ide_ops->ide_default_irq(base);
26931 -static __inline__ ide_ioreg_t ide_default_io_base(int index)
26932 +static inline ide_ioreg_t ide_default_io_base(int index)
26934 return ide_ops->ide_default_io_base(index);
26936 @@ -48,7 +48,7 @@ static inline void ide_init_hwif_ports(h
26937 ide_ops->ide_init_hwif_ports(hw, data_port, ctrl_port, irq);
26940 -static __inline__ void ide_init_default_hwifs(void)
26941 +static inline void ide_init_default_hwifs(void)
26943 #ifndef CONFIG_BLK_DEV_IDEPCI
26945 @@ -68,7 +68,89 @@ static __inline__ void ide_init_default_
26946 #define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1)
26949 -#include <asm-generic/ide_iops.h>
26950 +/* MIPS port and memory-mapped I/O string operations. */
26952 +static inline void __ide_flush_dcache_range(unsigned long addr, unsigned long size)
26954 + if (cpu_has_dc_aliases) {
26955 + unsigned long end = addr + size;
26956 + for (; addr < end; addr += PAGE_SIZE)
26957 + flush_dcache_page(virt_to_page(addr));
26961 +static inline void __ide_insw(unsigned long port, void *addr,
26962 + unsigned int count)
26964 + insw(port, addr, count);
26965 + __ide_flush_dcache_range((unsigned long)addr, count * 2);
26968 +static inline void __ide_insl(unsigned long port, void *addr, unsigned int count)
26970 + insl(port, addr, count);
26971 + __ide_flush_dcache_range((unsigned long)addr, count * 4);
26974 +static inline void __ide_outsw(unsigned long port, const void *addr,
26975 + unsigned long count)
26977 + outsw(port, addr, count);
26978 + __ide_flush_dcache_range((unsigned long)addr, count * 2);
26981 +static inline void __ide_outsl(unsigned long port, const void *addr,
26982 + unsigned long count)
26984 + outsl(port, addr, count);
26985 + __ide_flush_dcache_range((unsigned long)addr, count * 4);
26988 +static inline void __ide_mm_insw(unsigned long port, void *addr, u32 count)
26990 + unsigned long start = (unsigned long) addr;
26992 + while (count--) {
26993 + *(u16 *)addr = readw(port);
26996 + __ide_flush_dcache_range(start, count * 2);
26999 +static inline void __ide_mm_insl(unsigned long port, void *addr, u32 count)
27001 + unsigned long start = (unsigned long) addr;
27003 + while (count--) {
27004 + *(u32 *)addr = readl(port);
27007 + __ide_flush_dcache_range(start, count * 4);
27010 +static inline void __ide_mm_outsw(unsigned long port, const void *addr,
27013 + unsigned long start = (unsigned long) addr;
27015 + while (count--) {
27016 + writew(*(u16 *)addr, port);
27019 + __ide_flush_dcache_range(start, count * 2);
27022 +static inline void __ide_mm_outsl(unsigned long port, const void *addr,
27025 + unsigned long start = (unsigned long) addr;
27027 + while (count--) {
27028 + writel(*(u32 *)addr, port);
27031 + __ide_flush_dcache_range(start, count * 4);
27034 #endif /* __KERNEL__ */
27036 --- a/include/asm-mips64/io.h
27037 +++ b/include/asm-mips64/io.h
27038 @@ -414,7 +414,8 @@ static inline unsigned int inl_p(unsigne
27039 return __ioswab32(__val);
27042 -static inline void __outsb(unsigned long port, void *addr, unsigned int count)
27043 +static inline void __outsb(unsigned long port, const void *addr,
27044 + unsigned int count)
27047 outb(*(u8 *)addr, port);
27048 @@ -430,7 +431,8 @@ static inline void __insb(unsigned long
27052 -static inline void __outsw(unsigned long port, void *addr, unsigned int count)
27053 +static inline void __outsw(unsigned long port, const void *addr,
27054 + unsigned int count)
27057 outw(*(u16 *)addr, port);
27058 @@ -446,7 +448,8 @@ static inline void __insw(unsigned long
27062 -static inline void __outsl(unsigned long port, void *addr, unsigned int count)
27063 +static inline void __outsl(unsigned long port, const void *addr,
27064 + unsigned int count)
27067 outl(*(u32 *)addr, port);
27068 --- a/include/asm-mips64/mipsregs.h
27069 +++ b/include/asm-mips64/mipsregs.h
27070 @@ -757,10 +757,18 @@ do { \
27071 #define read_c0_config1() __read_32bit_c0_register($16, 1)
27072 #define read_c0_config2() __read_32bit_c0_register($16, 2)
27073 #define read_c0_config3() __read_32bit_c0_register($16, 3)
27074 +#define read_c0_config4() __read_32bit_c0_register($16, 4)
27075 +#define read_c0_config5() __read_32bit_c0_register($16, 5)
27076 +#define read_c0_config6() __read_32bit_c0_register($16, 6)
27077 +#define read_c0_config7() __read_32bit_c0_register($16, 7)
27078 #define write_c0_config(val) __write_32bit_c0_register($16, 0, val)
27079 #define write_c0_config1(val) __write_32bit_c0_register($16, 1, val)
27080 #define write_c0_config2(val) __write_32bit_c0_register($16, 2, val)
27081 #define write_c0_config3(val) __write_32bit_c0_register($16, 3, val)
27082 +#define write_c0_config4(val) __write_32bit_c0_register($16, 4, val)
27083 +#define write_c0_config5(val) __write_32bit_c0_register($16, 5, val)
27084 +#define write_c0_config6(val) __write_32bit_c0_register($16, 6, val)
27085 +#define write_c0_config7(val) __write_32bit_c0_register($16, 7, val)
27088 * The WatchLo register. There may be upto 8 of them.
27089 @@ -856,42 +864,34 @@ do { \
27091 static inline void tlb_probe(void)
27093 - rm9000_tlb_hazard();
27094 __asm__ __volatile__(
27095 ".set noreorder\n\t"
27098 - rm9000_tlb_hazard();
27101 static inline void tlb_read(void)
27103 - rm9000_tlb_hazard();
27104 __asm__ __volatile__(
27105 ".set noreorder\n\t"
27108 - rm9000_tlb_hazard();
27111 static inline void tlb_write_indexed(void)
27113 - rm9000_tlb_hazard();
27114 __asm__ __volatile__(
27115 ".set noreorder\n\t"
27118 - rm9000_tlb_hazard();
27121 static inline void tlb_write_random(void)
27123 - rm9000_tlb_hazard();
27124 __asm__ __volatile__(
27125 ".set noreorder\n\t"
27128 - rm9000_tlb_hazard();
27132 --- a/include/asm-mips64/reg.h
27133 +++ b/include/asm-mips64/reg.h
27138 +#define EF_REG26 26
27139 +#define EF_REG27 27
27141 #define EF_REG28 28
27142 #define EF_REG29 29
27143 #define EF_REG30 30
27144 --- a/include/asm-mips64/sgi/hpc3.h
27145 +++ b/include/asm-mips64/sgi/hpc3.h
27146 @@ -128,26 +128,26 @@ struct hpc3_ethregs {
27147 volatile u32 rx_gfptr; /* current GIO fifo ptr */
27148 volatile u32 rx_dfptr; /* current device fifo ptr */
27149 u32 _unused1; /* padding */
27150 - volatile u32 rx_reset; /* reset register */
27151 -#define HPC3_ERXRST_CRESET 0x1 /* Reset dma channel and external controller */
27152 -#define HPC3_ERXRST_CLRIRQ 0x2 /* Clear channel interrupt */
27153 -#define HPC3_ERXRST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */
27155 - volatile u32 rx_dconfig; /* DMA configuration register */
27156 -#define HPC3_ERXDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */
27157 -#define HPC3_ERXDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */
27158 -#define HPC3_ERXDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */
27159 -#define HPC3_ERXDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */
27160 -#define HPC3_ERXDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */
27161 -#define HPC3_ERXDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */
27162 -#define HPC3_ERXDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */
27163 -#define HPC3_ERXDCFG_PTO 0x30000 /* Programmed timeout value for above two */
27165 - volatile u32 rx_pconfig; /* PIO configuration register */
27166 -#define HPC3_ERXPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */
27167 -#define HPC3_ERXPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */
27168 -#define HPC3_ERXPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */
27169 -#define HPC3_ERXPCFG_TST 0x1000 /* Diagnistic ram test feature bit */
27170 + volatile u32 reset; /* reset register */
27171 +#define HPC3_ERST_CRESET 0x1 /* Reset dma channel and external controller */
27172 +#define HPC3_ERST_CLRIRQ 0x2 /* Clear channel interrupt */
27173 +#define HPC3_ERST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */
27175 + volatile u32 dconfig; /* DMA configuration register */
27176 +#define HPC3_EDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */
27177 +#define HPC3_EDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */
27178 +#define HPC3_EDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */
27179 +#define HPC3_EDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */
27180 +#define HPC3_EDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */
27181 +#define HPC3_EDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */
27182 +#define HPC3_EDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */
27183 +#define HPC3_EDCFG_PTO 0x30000 /* Programmed timeout value for above two */
27185 + volatile u32 pconfig; /* PIO configuration register */
27186 +#define HPC3_EPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */
27187 +#define HPC3_EPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */
27188 +#define HPC3_EPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */
27189 +#define HPC3_EPCFG_TST 0x1000 /* Diagnistic ram test feature bit */
27191 u32 _unused2[0x1000/4 - 8]; /* padding */
27193 @@ -221,7 +221,7 @@ struct hpc3_regs {
27194 #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */
27196 u32 _unused1[0x14000/4 - 5]; /* padding */
27199 /* Now direct PIO per-HPC3 peripheral access to external regs. */
27200 volatile u32 scsi0_ext[256]; /* SCSI channel 0 external regs */
27201 u32 _unused2[0x7c00/4];
27202 @@ -304,7 +304,7 @@ struct hpc3_regs {
27203 volatile u32 bbram[8192-50-14]; /* Battery backed ram */
27208 * It is possible to have two HPC3's within the address space on
27209 * one machine, though only having one is more likely on an Indy.
27211 --- a/include/asm-mips64/sn/nmi.h
27212 +++ b/include/asm-mips64/sn/nmi.h
27214 #ifndef __ASM_SN_NMI_H
27215 #define __ASM_SN_NMI_H
27217 -#ident "$Revision: 1.2.4.2 $"
27218 +#ident "$Revision: 1.2.4.1 $"
27220 #include <asm/sn/addrs.h>
27222 --- a/include/asm-mips64/unistd.h
27223 +++ b/include/asm-mips64/unistd.h
27224 @@ -760,7 +760,7 @@ type name(void) \
27226 return (type) __v0; \
27229 + return (type)-1; \
27233 @@ -788,7 +788,7 @@ type name(atype a) \
27235 return (type) __v0; \
27238 + return (type)-1; \
27241 #define _syscall2(type,name,atype,a,btype,b) \
27242 @@ -813,7 +813,7 @@ type name(atype a, btype b) \
27244 return (type) __v0; \
27247 + return (type)-1; \
27250 #define _syscall3(type,name,atype,a,btype,b,ctype,c) \
27251 @@ -839,7 +839,7 @@ type name(atype a, btype b, ctype c) \
27253 return (type) __v0; \
27256 + return (type)-1; \
27259 #define _syscall4(type,name,atype,a,btype,b,ctype,c,dtype,d) \
27260 @@ -865,7 +865,7 @@ type name(atype a, btype b, ctype c, dty
27262 return (type) __v0; \
27265 + return (type)-1; \
27268 #if (_MIPS_SIM == _MIPS_SIM_ABI32)
27269 @@ -902,7 +902,7 @@ type name(atype a, btype b, ctype c, dty
27271 return (type) __v0; \
27274 + return (type)-1; \
27277 #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \
27278 @@ -935,7 +935,7 @@ type name(atype a, btype b, ctype c, dty
27280 return (type) __v0; \
27283 + return (type)-1; \
27286 #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
27287 @@ -966,7 +966,7 @@ type name (atype a,btype b,ctype c,dtype
27289 return (type) __v0; \
27292 + return (type)-1; \
27295 #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \
27296 @@ -995,7 +995,7 @@ type name (atype a,btype b,ctype c,dtype
27298 return (type) __v0; \
27301 + return (type)-1; \
27304 #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
27305 --- a/include/asm-ppc/param.h
27306 +++ b/include/asm-ppc/param.h
27312 +#define hz_to_std(a) (a)
27316 #define EXEC_PAGESIZE 4096
27317 --- a/include/asm-s390/param.h
27318 +++ b/include/asm-s390/param.h
27324 +#define hz_to_std(a) (a)
27328 #define EXEC_PAGESIZE 4096
27329 --- a/include/asm-sh/param.h
27330 +++ b/include/asm-sh/param.h
27336 +#define hz_to_std(a) (a)
27340 #define EXEC_PAGESIZE 4096
27341 --- a/include/asm-sparc/param.h
27342 +++ b/include/asm-sparc/param.h
27348 +#define hz_to_std(a) (a)
27352 #define EXEC_PAGESIZE 8192 /* Thanks for sun4's we carry baggage... */
27353 --- a/include/asm-sparc64/param.h
27354 +++ b/include/asm-sparc64/param.h
27360 +#define hz_to_std(a) (a)
27364 #define EXEC_PAGESIZE 8192 /* Thanks for sun4's we carry baggage... */
27366 +++ b/include/linux/i2c-algo-au1550.h
27369 + * Copyright (C) 2004 Embedded Edge, LLC <dan@embeddededge.com>
27371 + * This program is free software; you can redistribute it and/or modify
27372 + * it under the terms of the GNU General Public License as published by
27373 + * the Free Software Foundation; either version 2 of the License, or
27374 + * (at your option) any later version.
27376 + * This program is distributed in the hope that it will be useful,
27377 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
27378 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27379 + * GNU General Public License for more details.
27381 + * You should have received a copy of the GNU General Public License
27382 + * along with this program; if not, write to the Free Software
27383 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27386 +#ifndef I2C_ALGO_AU1550_H
27387 +#define I2C_ALGO_AU1550_H 1
27389 +struct i2c_algo_au1550_data {
27391 + int xfer_timeout;
27395 +int i2c_au1550_add_bus(struct i2c_adapter *);
27396 +int i2c_au1550_del_bus(struct i2c_adapter *);
27398 +#endif /* I2C_ALGO_AU1550_H */
27399 --- a/include/linux/i2c-id.h
27400 +++ b/include/linux/i2c-id.h
27401 @@ -155,6 +155,8 @@
27402 #define I2C_ALGO_SIBYTE 0x150000 /* Broadcom SiByte SOCs */
27403 #define I2C_ALGO_SGI 0x160000 /* SGI algorithm */
27405 +#define I2C_ALGO_AU1550 0x140000 /* Alchemy Au1550 PSC */
27407 #define I2C_ALGO_EXP 0x800000 /* experimental */
27409 #define I2C_ALGO_MASK 0xff0000 /* Mask for algorithms */
27410 @@ -203,6 +205,9 @@
27411 #define I2C_HW_SGI_VINO 0x00
27412 #define I2C_HW_SGI_MACE 0x01
27414 +/* --- Au1550 PSC adapters */
27415 +#define I2C_HW_AU1550_PSC 0x00
27417 /* --- SMBus only adapters */
27418 #define I2C_HW_SMBUS_PIIX4 0x00
27419 #define I2C_HW_SMBUS_ALI15X3 0x01
27420 --- a/include/linux/sched.h
27421 +++ b/include/linux/sched.h
27422 @@ -619,6 +619,10 @@ asmlinkage long sys_wait4(pid_t pid,unsi
27423 extern int in_group_p(gid_t);
27424 extern int in_egroup_p(gid_t);
27426 +extern ATTRIB_NORET void cpu_idle(void);
27428 +extern void release_task(struct task_struct * p);
27430 extern void proc_caches_init(void);
27431 extern void flush_signals(struct task_struct *);
27432 extern void flush_signal_handlers(struct task_struct *);
27433 --- a/include/linux/serial.h
27434 +++ b/include/linux/serial.h
27435 @@ -75,7 +75,8 @@ struct serial_struct {
27436 #define PORT_16654 11
27437 #define PORT_16850 12
27438 #define PORT_RSA 13 /* RSA-DV II/S card */
27439 -#define PORT_MAX 13
27440 +#define PORT_SB1250 14
27441 +#define PORT_MAX 14
27443 #define SERIAL_IO_PORT 0
27444 #define SERIAL_IO_HUB6 1
27445 --- a/include/linux/swap.h
27446 +++ b/include/linux/swap.h
27448 #ifndef _LINUX_SWAP_H
27449 #define _LINUX_SWAP_H
27451 +#include <linux/config.h>
27453 +#define MAX_SWAPFILES 32
27457 #include <linux/spinlock.h>
27458 #include <asm/page.h>
27461 #define SWAP_FLAG_PRIO_MASK 0x7fff
27462 #define SWAP_FLAG_PRIO_SHIFT 0
27464 -#define MAX_SWAPFILES 32
27467 * Magic header for a swap area. The first part of the union is
27468 * what the swap magic looks like for the old (limited to 128MB)
27469 @@ -39,8 +43,6 @@ union swap_header {
27476 * Max bad pages in the new format..
27478 --- a/include/video/newport.h
27479 +++ b/include/video/newport.h
27480 @@ -291,8 +291,6 @@ struct newport_regs {
27481 unsigned int _unused2[0x1ef];
27482 struct newport_cregs cgo;
27484 -extern struct newport_regs *npregs;
27488 unsigned int drawmode1;
27489 @@ -450,38 +448,26 @@ static __inline__ void newport_cmap_setr
27491 /* Miscellaneous NEWPORT routines. */
27492 #define BUSY_TIMEOUT 100000
27493 -static __inline__ int newport_wait(void)
27494 +static __inline__ int newport_wait(struct newport_regs *regs)
27497 + int t = BUSY_TIMEOUT;
27499 - while(i < BUSY_TIMEOUT)
27500 - if(!(npregs->cset.status & NPORT_STAT_GBUSY))
27502 + if (!(regs->cset.status & NPORT_STAT_GBUSY))
27504 - if(i == BUSY_TIMEOUT)
27510 -static __inline__ int newport_bfwait(void)
27511 +static __inline__ int newport_bfwait(struct newport_regs *regs)
27514 + int t = BUSY_TIMEOUT;
27516 - while(i < BUSY_TIMEOUT)
27517 - if(!(npregs->cset.status & NPORT_STAT_BBUSY))
27519 + if(!(regs->cset.status & NPORT_STAT_BBUSY))
27521 - if(i == BUSY_TIMEOUT)
27527 -/* newport.c and cons_newport.c routines */
27528 -extern struct graphics_ops *newport_probe (int, const char **);
27530 -void newport_save (void *);
27531 -void newport_restore (void *);
27532 -void newport_reset (void);
27533 -int newport_ioctl (int card, int cmd, unsigned long arg);
27536 * DCBMODE register defines:
27538 @@ -564,7 +550,7 @@ xmap9FIFOWait (struct newport_regs *rex)
27540 rex->set.dcbmode = DCB_XMAP0 | XM9_CRS_FIFO_AVAIL |
27541 DCB_DATAWIDTH_1 | R_DCB_XMAP9_PROTOCOL;
27542 - newport_bfwait ();
27543 + newport_bfwait (rex);
27545 while ((rex->set.dcbdata0.bybytes.b3 & 3) != XM9_FIFO_EMPTY)
27549 @@ -296,7 +296,6 @@ static void __init parse_options(char *l
27552 extern void setup_arch(char **);
27553 -extern void cpu_idle(void);
27555 unsigned long wait_init_idle;
27557 --- a/kernel/exit.c
27558 +++ b/kernel/exit.c
27559 @@ -26,7 +26,7 @@ extern struct task_struct *child_reaper;
27561 int getrusage(struct task_struct *, int, struct rusage *);
27563 -static void release_task(struct task_struct * p)
27564 +void release_task(struct task_struct * p)
27566 if (p != current) {
27568 --- a/kernel/signal.c
27569 +++ b/kernel/signal.c
27571 #include <linux/init.h>
27572 #include <linux/sched.h>
27574 +#include <asm/param.h>
27575 #include <asm/uaccess.h>
27579 #define SIG_SLAB_DEBUG 0
27582 +#define DEBUG_SIG 0
27585 +#define SIG_SLAB_DEBUG (SLAB_DEBUG_FREE | SLAB_RED_ZONE /* | SLAB_POISON */)
27587 +#define SIG_SLAB_DEBUG 0
27590 static kmem_cache_t *sigqueue_cachep;
27592 atomic_t nr_queued_signals;
27593 @@ -270,6 +279,11 @@ printk("SIG dequeue (%s:%d): %d ", curre
27594 signal_pending(current));
27598 +printk("SIG dequeue (%s:%d): %d ", current->comm, current->pid,
27599 + signal_pending(current));
27602 sig = next_signal(current, mask);
27604 if (current->notifier) {
27605 @@ -293,6 +307,10 @@ printk("SIG dequeue (%s:%d): %d ", curre
27606 printk(" %d -> %d\n", signal_pending(current), sig);
27610 +printk(" %d -> %d\n", signal_pending(current), sig);
27616 @@ -551,6 +569,11 @@ send_sig_info(int sig, struct siginfo *i
27617 printk("SIG queue (%s:%d): %d ", t->comm, t->pid, sig);
27622 +printk("SIG queue (%s:%d): %d ", t->comm, t->pid, sig);
27626 if (sig < 0 || sig > _NSIG)
27628 @@ -789,8 +812,8 @@ void do_notify_parent(struct task_struct
27629 info.si_uid = tsk->uid;
27631 /* FIXME: find out whether or not this is supposed to be c*time. */
27632 - info.si_utime = tsk->times.tms_utime;
27633 - info.si_stime = tsk->times.tms_stime;
27634 + info.si_utime = hz_to_std(tsk->times.tms_utime);
27635 + info.si_stime = hz_to_std(tsk->times.tms_stime);
27637 status = tsk->exit_code & 0x7f;
27638 why = SI_KERNEL; /* shouldn't happen */
27641 @@ -801,16 +801,23 @@ asmlinkage long sys_setfsgid(gid_t gid)
27643 asmlinkage long sys_times(struct tms * tbuf)
27648 * In the SMP world we might just be unlucky and have one of
27649 * the times increment as we use it. Since the value is an
27650 * atomically safe type this is just fine. Conceptually its
27651 * as if the syscall took an instant longer to occur.
27654 - if (copy_to_user(tbuf, ¤t->times, sizeof(struct tms)))
27656 + temp.tms_utime = hz_to_std(current->times.tms_utime);
27657 + temp.tms_stime = hz_to_std(current->times.tms_stime);
27658 + temp.tms_cutime = hz_to_std(current->times.tms_cutime);
27659 + temp.tms_cstime = hz_to_std(current->times.tms_cstime);
27660 + if (copy_to_user(tbuf, &temp, sizeof(struct tms)))
27664 + return hz_to_std(jiffies);
27670 @@ -27,6 +27,7 @@ obj-$(CONFIG_CRC32) += crc32.o
27671 subdir-$(CONFIG_ZLIB_INFLATE) += zlib_inflate
27672 subdir-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate
27674 +-include $(TOPDIR)/arch/$(ARCH)/Makefile.lib
27675 include $(TOPDIR)/drivers/net/Makefile.lib
27676 include $(TOPDIR)/drivers/usb/Makefile.lib
27677 include $(TOPDIR)/drivers/bluetooth/Makefile.lib
27680 @@ -469,10 +469,11 @@ mrproper: clean archmrproper
27681 $(MAKE) -C Documentation/DocBook mrproper
27683 distclean: mrproper
27684 - rm -f core `find . \( -not -type d \) -and \
27685 - \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
27686 - -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
27687 - -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
27688 + find . \( -not -type d \) -and \
27689 + \( -name core -o -name '*.orig' -o -name '*.rej' \
27690 + -o -name '*~' -o -name '*.bak' -o -name '#*#' \
27691 + -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \
27692 + -o -name TAGS -o -name tags \) -print | env -i xargs rm -f
27695 cd .. && tar cf - linux/ | gzip -9 > backup.gz
27696 @@ -499,7 +500,7 @@ mandocs:
27697 $(MAKE) -C Documentation/DocBook man
27700 - find . -type f -print | sort | xargs sum > .SUMS
27701 + find . -type f -print | sort | env -i xargs sum > .SUMS
27703 dep-files: scripts/mkdep archdep include/linux/version.h
27704 rm -f .depend .hdepend