Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4041
b: refs/heads/master
c: 44454bc
h: refs/heads/master
i:
  4039: d47edee
v: v3
  • Loading branch information
Russell King authored and Russell King committed Jun 30, 2005
1 parent f174ac1 commit 417b820
Show file tree
Hide file tree
Showing 76 changed files with 3,578 additions and 582 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd53d1270f51c6cfb53b06c8f93fd42327871d6b
refs/heads/master: 44454bcdb90532b372c74e3546043d8a3a468939
2 changes: 1 addition & 1 deletion trunk/Documentation/Changes
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ o e2fsprogs 1.29 # tune2fs
o jfsutils 1.1.3 # fsck.jfs -V
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
o xfsprogs 2.6.0 # xfs_db -V
o pcmciautils 004
o pcmciautils 001
o pcmcia-cs 3.1.21 # cardmgr -V
o quota-tools 3.09 # quota -V
o PPP 2.4.0 # pppd --version
Expand Down
5 changes: 3 additions & 2 deletions trunk/Documentation/pcmcia/devicetable.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ PCMCIA_DEVICE_PROD_ID1("some_string", 0x(hash_of_some_string)),
If the hash is incorrect, the kernel will inform you about this in "dmesg"
upon module initialization, and tell you of the correct hash.

You can determine the hash of the product ID strings by catting the file
"modalias" in the sysfs directory of the PCMCIA device. It generates a string
You can determine the hash of the product ID strings by running
"pcmcia-modalias %n.%m" [%n being replaced with the socket number and %m being
replaced with the device function] from pcmciautils. It generates a string
in the following form:
pcmcia:m0149cC1ABf06pfn00fn00pa725B842DpbF1EFEE84pc0877B627pd00000000

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/kernel/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <asm/desc.h>
#include <asm/arch_hooks.h>
#include <asm/hpet.h>
#include <asm/i8253.h>

#include <mach_apic.h>

Expand Down Expand Up @@ -880,6 +879,7 @@ void __init init_apic_mappings(void)
*/
static unsigned int __devinit get_8254_timer_count(void)
{
extern spinlock_t i8253_lock;
unsigned long flags;

unsigned int count;
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/i386/kernel/apm.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/desc.h>
#include <asm/i8253.h>

#include "io_ports.h"

extern spinlock_t i8253_lock;
extern unsigned long get_cmos_time(void);
extern void machine_real_restart(unsigned char *, int);

Expand Down Expand Up @@ -1168,7 +1168,8 @@ static void get_time_diff(void)
static void reinit_timer(void)
{
#ifdef INIT_TIMER_AFTER_SUSPEND
unsigned long flags;
unsigned long flags;
extern spinlock_t i8253_lock;

spin_lock_irqsave(&i8253_lock, flags);
/* set the clock to 100 Hz */
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <asm/smp.h>
#include <asm/desc.h>
#include <asm/timer.h>
#include <asm/i8259.h>

#include <mach_apic.h>

Expand Down Expand Up @@ -1567,6 +1566,7 @@ void print_all_local_APICs (void)

void /*__init*/ print_PIC(void)
{
extern spinlock_t i8259A_lock;
unsigned int v;
unsigned long flags;

Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/i386/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@

#include "io_ports.h"

#include <asm/i8259.h>

extern spinlock_t i8259A_lock;
int pit_latch_buggy; /* extern */

#include "do_timer.h"
Expand All @@ -86,8 +85,6 @@ extern unsigned long wall_jiffies;
DEFINE_SPINLOCK(rtc_lock);
EXPORT_SYMBOL(rtc_lock);

#include <asm/i8253.h>

DEFINE_SPINLOCK(i8253_lock);
EXPORT_SYMBOL(i8253_lock);

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/i386/kernel/timers/timer_cyclone.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/fixmap.h>
#include <asm/i8253.h>

#include "io_ports.h"

extern spinlock_t i8253_lock;

/* Number of usecs that the last interrupt was delayed */
static int delay_at_last_interrupt;

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/i386/kernel/timers/timer_pit.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
#include <asm/smp.h>
#include <asm/io.h>
#include <asm/arch_hooks.h>
#include <asm/i8253.h>

extern spinlock_t i8259A_lock;
extern spinlock_t i8253_lock;
#include "do_timer.h"
#include "io_ports.h"

Expand Down Expand Up @@ -165,6 +166,7 @@ struct init_timer_opts __initdata timer_pit_init = {

void setup_pit_timer(void)
{
extern spinlock_t i8253_lock;
unsigned long flags;

spin_lock_irqsave(&i8253_lock, flags);
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/i386/kernel/timers/timer_tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "mach_timer.h"

#include <asm/hpet.h>
#include <asm/i8253.h>

#ifdef CONFIG_HPET_TIMER
static unsigned long hpet_usec_quotient;
Expand All @@ -36,6 +35,8 @@ static inline void cpufreq_delayed_get(void);

int tsc_disable __devinitdata = 0;

extern spinlock_t i8253_lock;

static int use_tsc;
/* Number of usecs that the last interrupt was delayed */
static int delay_at_last_interrupt;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/mach-voyager/voyager_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <linux/irq.h>
#include <asm/tlbflush.h>
#include <asm/arch_hooks.h>
#include <asm/i8253.h>

/*
* Power off function, if any
Expand Down Expand Up @@ -183,6 +182,7 @@ voyager_timer_interrupt(struct pt_regs *regs)
* and swiftly introduce it to something sharp and
* pointy. */
__u16 val;
extern spinlock_t i8253_lock;

spin_lock(&i8253_lock);

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/ppc/kernel/relocate_kernel.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ relocate_new_kernel:

mr r8, r0
ori r8, r8, MSR_RI|MSR_ME
mtspr SPRN_SRR1, r8
mtspr SRR1, r8
addi r8, r4, 1f - relocate_new_kernel
mtspr SPRN_SRR0, r8
mtspr SRR0, r8
sync
rfi

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ppc/platforms/85xx/mpc8540_ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ mpc8540ads_setup_arch(void)
memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
}

pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC);
if (pdata) {
pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC);
pdata->board_flags = 0;
pdata->interruptPHY = MPC85xx_IRQ_EXT5;
pdata->phyid = 3;
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/ppc64/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ obj-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.o, $(section)))
src-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.c, $(section)))
gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section)))

hostprogs-y := addnote addRamDisk
hostprogs-y := piggy addnote addRamDisk
targets += zImage zImage.initrd imagesize.c \
$(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \
$(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \
Expand All @@ -78,6 +78,9 @@ addsection = $(CROSS32OBJCOPY) $(1) \
quiet_cmd_addnote = ADDNOTE $@
cmd_addnote = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(obj-boot) && $(obj)/addnote $@

quiet_cmd_piggy = PIGGY $@
cmd_piggy = $(obj)/piggyback $(@:.o=) < $< | $(CROSS32AS) -o $@

$(call gz-sec, $(required)): $(obj)/kernel-%.gz: % FORCE
$(call if_changed,gzip)

Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/ppc64/boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

extern void *finddevice(const char *);
extern int getprop(void *, const char *, void *, int);
extern void printk(char *fmt, ...);
extern void printf(const char *fmt, ...);
extern int sprintf(char *buf, const char *fmt, ...);
void gunzip(void *, int, unsigned char *, int *);
Expand Down Expand Up @@ -146,10 +147,10 @@ void start(unsigned long a1, unsigned long a2, void *promptr)
}
a1 = initrd.addr;
a2 = initrd.size;
printf("initial ramdisk moving 0x%lx <- 0x%lx (0x%lx bytes)\n\r",
printf("initial ramdisk moving 0x%lx <- 0x%lx (%lx bytes)\n\r",
initrd.addr, (unsigned long)_initrd_start, initrd.size);
memmove((void *)initrd.addr, (void *)_initrd_start, initrd.size);
printf("initrd head: 0x%lx\n\r", *((unsigned long *)initrd.addr));
printf("initrd head: 0x%lx\n\r", *((u32 *)initrd.addr));
}

/* Eventually gunzip the kernel */
Expand Down Expand Up @@ -200,6 +201,9 @@ void start(unsigned long a1, unsigned long a2, void *promptr)

flush_cache((void *)vmlinux.addr, vmlinux.size);

if (a1)
printf("initrd head: 0x%lx\n\r", *((u32 *)initrd.addr));

kernel_entry = (kernel_entry_t)vmlinux.addr;
#ifdef DEBUG
printf( "kernel:\n\r"
Expand Down
43 changes: 43 additions & 0 deletions trunk/arch/ppc64/boot/mknote.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (C) Cort Dougan 1999.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Generate a note section as per the CHRP specification.
*
*/

#include <stdio.h>

#define PL(x) printf("%c%c%c%c", ((x)>>24)&0xff, ((x)>>16)&0xff, ((x)>>8)&0xff, (x)&0xff );

int main(void)
{
/* header */
/* namesz */
PL(strlen("PowerPC")+1);
/* descrsz */
PL(6*4);
/* type */
PL(0x1275);
/* name */
printf("PowerPC"); printf("%c", 0);

/* descriptor */
/* real-mode */
PL(0xffffffff);
/* real-base */
PL(0x00c00000);
/* real-size */
PL(0xffffffff);
/* virt-base */
PL(0xffffffff);
/* virt-size */
PL(0xffffffff);
/* load-base */
PL(0x4000);
return 0;
}
83 changes: 83 additions & 0 deletions trunk/arch/ppc64/boot/piggyback.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* Copyright 2001 IBM Corp
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>

extern long ce_exec_config[];

int main(int argc, char *argv[])
{
int i, cnt, pos, len;
unsigned int cksum, val;
unsigned char *lp;
unsigned char buf[8192];
char *varname;
if (argc != 2)
{
fprintf(stderr, "usage: %s name <in-file >out-file\n",
argv[0]);
exit(1);
}

varname = strrchr(argv[1], '/');
if (varname)
varname++;
else
varname = argv[1];

fprintf(stdout, "#\n");
fprintf(stdout, "# Miscellaneous data structures:\n");
fprintf(stdout, "# WARNING - this file is automatically generated!\n");
fprintf(stdout, "#\n");
fprintf(stdout, "\n");
fprintf(stdout, "\t.data\n");
fprintf(stdout, "\t.globl %s_data\n", varname);
fprintf(stdout, "%s_data:\n", varname);
pos = 0;
cksum = 0;
while ((len = read(0, buf, sizeof(buf))) > 0)
{
cnt = 0;
lp = (unsigned char *)buf;
len = (len + 3) & ~3; /* Round up to longwords */
for (i = 0; i < len; i += 4)
{
if (cnt == 0)
{
fprintf(stdout, "\t.long\t");
}
fprintf(stdout, "0x%02X%02X%02X%02X", lp[0], lp[1], lp[2], lp[3]);
val = *(unsigned long *)lp;
cksum ^= val;
lp += 4;
if (++cnt == 4)
{
cnt = 0;
fprintf(stdout, " # %x \n", pos+i-12);
fflush(stdout);
} else
{
fprintf(stdout, ",");
}
}
if (cnt)
{
fprintf(stdout, "0\n");
}
pos += len;
}
fprintf(stdout, "\t.globl %s_len\n", varname);
fprintf(stdout, "%s_len:\t.long\t0x%x\n", varname, pos);
fflush(stdout);
fclose(stdout);
fprintf(stderr, "cksum = %x\n", cksum);
exit(0);
}

16 changes: 14 additions & 2 deletions trunk/arch/ppc64/boot/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void *finddevice(const char *name);
int getprop(void *phandle, const char *name, void *buf, int buflen);
void chrpboot(int a1, int a2, void *prom); /* in main.c */

int printf(char *fmt, ...);
void printk(char *fmt, ...);

/* there is no convenient header to get this from... -- paulus */
extern unsigned long strlen(const char *);
Expand Down Expand Up @@ -220,7 +220,7 @@ readchar(void)
case 1:
return ch;
case -1:
printf("read(stdin) returned -1\r\n");
printk("read(stdin) returned -1\r\n");
return -1;
}
}
Expand Down Expand Up @@ -627,6 +627,18 @@ int sprintf(char * buf, const char *fmt, ...)

static char sprint_buf[1024];

void
printk(char *fmt, ...)
{
va_list args;
int n;

va_start(args, fmt);
n = vsprintf(sprint_buf, fmt, args);
va_end(args);
write(stdout, sprint_buf, n);
}

int
printf(char *fmt, ...)
{
Expand Down
Loading

0 comments on commit 417b820

Please sign in to comment.