patch-2.4.9 linux/arch/ppc/kernel/apus_setup.c
Next file: linux/arch/ppc/kernel/chrp_pci.c
Previous file: linux/arch/ppc/kernel/apus_pci.c
Back to the patch index
Back to the overall index
- Lines: 346
- Date:
Sun Aug 12 12:43:26 2001
- Orig file:
v2.4.8/linux/arch/ppc/kernel/apus_setup.c
- Orig date:
Mon May 21 17:04:46 2001
diff -u --recursive --new-file v2.4.8/linux/arch/ppc/kernel/apus_setup.c linux/arch/ppc/kernel/apus_setup.c
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.apus_setup.c 1.11 05/17/01 18:14:21 cort
+ * BK Id: SCCS/s.apus_setup.c 1.14 07/06/01 09:19:28 trini
*/
/*
* linux/arch/ppc/kernel/apus_setup.c
@@ -80,36 +80,36 @@
#include "local_irq.h"
-unsigned long m68k_machtype __apusdata;
-char debug_device[6] __apusdata = "";
+unsigned long m68k_machtype;
+char debug_device[6] = "";
extern void amiga_init_IRQ(void);
void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)) __initdata = NULL;
/* machine dependent keyboard functions */
int (*mach_keyb_init) (void) __initdata = NULL;
-int (*mach_kbdrate) (struct kbd_repeat *) __apusdata = NULL;
-void (*mach_kbd_leds) (unsigned int) __apusdata = NULL;
+int (*mach_kbdrate) (struct kbd_repeat *) = NULL;
+void (*mach_kbd_leds) (unsigned int) = NULL;
/* machine dependent irq functions */
void (*mach_init_IRQ) (void) __initdata = NULL;
-void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) __apusdata = NULL;
-void (*mach_get_model) (char *model) __apusdata = NULL;
-int (*mach_get_hardware_list) (char *buffer) __apusdata = NULL;
-int (*mach_get_irq_list) (char *) __apusdata = NULL;
-void (*mach_process_int) (int, struct pt_regs *) __apusdata = NULL;
+void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL;
+void (*mach_get_model) (char *model) = NULL;
+int (*mach_get_hardware_list) (char *buffer) = NULL;
+int (*mach_get_irq_list) (char *) = NULL;
+void (*mach_process_int) (int, struct pt_regs *) = NULL;
/* machine dependent timer functions */
-unsigned long (*mach_gettimeoffset) (void) __apusdata;
-void (*mach_gettod) (int*, int*, int*, int*, int*, int*) __apusdata;
-int (*mach_hwclk) (int, struct hwclk_time*) __apusdata = NULL;
-int (*mach_set_clock_mmss) (unsigned long) __apusdata = NULL;
-void (*mach_reset)( void ) __apusdata;
-long mach_max_dma_address __apusdata = 0x00ffffff; /* default set to the lower 16MB */
+unsigned long (*mach_gettimeoffset) (void);
+void (*mach_gettod) (int*, int*, int*, int*, int*, int*);
+int (*mach_hwclk) (int, struct hwclk_time*) = NULL;
+int (*mach_set_clock_mmss) (unsigned long) = NULL;
+void (*mach_reset)( void );
+long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */
#if defined(CONFIG_AMIGA_FLOPPY)
void (*mach_floppy_setup) (char *, int *) __initdata = NULL;
-void (*mach_floppy_eject) (void) __apusdata = NULL;
+void (*mach_floppy_eject) (void) = NULL;
#endif
#ifdef CONFIG_HEARTBEAT
-void (*mach_heartbeat) (int) __apusdata = NULL;
+void (*mach_heartbeat) (int) = NULL;
extern void apus_heartbeat (void);
#endif
@@ -118,29 +118,28 @@
extern unsigned count_period_num; /* 1 decrementer count equals */
extern unsigned count_period_den; /* count_period_num / count_period_den us */
-int num_memory __apusdata = 0;
-struct mem_info memory[NUM_MEMINFO] __apusdata;/* memory description */
+int num_memory = 0;
+struct mem_info memory[NUM_MEMINFO];/* memory description */
/* FIXME: Duplicate memory data to avoid conflicts with m68k shared code. */
-int m68k_realnum_memory __apusdata = 0;
-struct mem_info m68k_memory[NUM_MEMINFO] __apusdata;/* memory description */
+int m68k_realnum_memory = 0;
+struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
-struct mem_info ramdisk __apusdata;
+struct mem_info ramdisk;
extern void amiga_floppy_setup(char *, int *);
extern void config_amiga(void);
-static int __60nsram __apusdata = 0;
+static int __60nsram = 0;
/* for cpuinfo */
-static int __bus_speed __apusdata = 0;
-static int __speed_test_failed __apusdata = 0;
+static int __bus_speed = 0;
+static int __speed_test_failed = 0;
/********************************************** COMPILE PROTECTION */
/* Provide some stubs that links to Amiga specific functions.
* This allows CONFIG_APUS to be removed from generic PPC files while
* preventing link errors for other PPC targets.
*/
-__apus
unsigned long apus_get_rtc_time(void)
{
#ifdef CONFIG_APUS
@@ -152,7 +151,6 @@
#endif
}
-__apus
int apus_set_rtc_time(unsigned long nowtime)
{
#ifdef CONFIG_APUS
@@ -265,7 +263,6 @@
#endif
}
-__apus
int
apus_get_cpuinfo(char *buffer)
{
@@ -287,7 +284,6 @@
#endif
}
-__apus
static void get_current_tb(unsigned long long *time)
{
__asm __volatile ("1:mftbu 4 \n\t"
@@ -303,7 +299,6 @@
}
-__apus
void apus_calibrate_decr(void)
{
#ifdef CONFIG_APUS
@@ -388,7 +383,6 @@
#endif
}
-__apus
void arch_gettod(int *year, int *mon, int *day, int *hour,
int *min, int *sec)
{
@@ -415,7 +409,6 @@
mach_floppy_setup (str, ints);
}
-__apus
void floppy_eject(void)
{
if (mach_floppy_eject)
@@ -425,11 +418,10 @@
/*********************************************************** MEMORY */
#define KMAP_MAX 32
-unsigned long kmap_chunks[KMAP_MAX*3] __apusdata;
-int kmap_chunk_count __apusdata = 0;
+unsigned long kmap_chunks[KMAP_MAX*3];
+int kmap_chunk_count = 0;
/* From pgtable.h */
-__apus
static __inline__ pte_t *my_find_pte(struct mm_struct *mm,unsigned long va)
{
pgd_t *dir = 0;
@@ -452,7 +444,6 @@
/* Again simulating an m68k/mm/kmap.c function. */
-__apus
void kernel_set_cachemode( unsigned long address, unsigned long size,
unsigned int cmode )
{
@@ -495,7 +486,6 @@
}
}
-__apus
unsigned long mm_ptov (unsigned long paddr)
{
unsigned long ret;
@@ -524,7 +514,6 @@
return ret;
}
-__apus
int mm_end_of_chunk (unsigned long addr, int len)
{
if (memory[0].addr + memory[0].size == addr + len)
@@ -536,7 +525,6 @@
#define L1_CACHE_BYTES 32
#define MAX_CACHE_SIZE 8192
-__apus
void cache_push(__u32 addr, int length)
{
addr = mm_ptov(addr);
@@ -556,7 +544,6 @@
: : "r" (addr));
}
-__apus
void cache_clear(__u32 addr, int length)
{
if (MAX_CACHE_SIZE < length)
@@ -706,13 +693,11 @@
#endif
/****************************************************** IRQ stuff */
-__apus
static unsigned int apus_irq_cannonicalize(unsigned int irq)
{
return irq;
}
-__apus
int apus_get_irq_list(char *buf)
{
#ifdef CONFIG_APUS
@@ -725,7 +710,6 @@
}
/* IPL must be between 0 and 7 */
-__apus
static inline void apus_set_IPL(unsigned long ipl)
{
APUS_WRITE(APUS_IPL_EMU, IPLEMU_SETRESET | IPLEMU_DISABLEINT);
@@ -734,7 +718,6 @@
APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT);
}
-__apus
static inline unsigned long apus_get_IPL(void)
{
/* This returns the present IPL emulation level. */
@@ -743,7 +726,6 @@
return ((~__f) & IPLEMU_IPLMASK);
}
-__apus
static inline unsigned long apus_get_prev_IPL(struct pt_regs* regs)
{
/* The value saved in mq is the IPL_EMU value at the time of
@@ -794,7 +776,6 @@
}
#endif
-__apus
int apus_get_irq(struct pt_regs* regs)
{
#ifdef CONFIG_APUS
@@ -815,8 +796,6 @@
#endif
}
-
-__apus
void apus_post_irq(struct pt_regs* regs, int level)
{
#ifdef __INTERRUPT_DEBUG
@@ -826,22 +805,17 @@
apus_set_IPL(apus_get_prev_IPL(regs));
}
-
-
/****************************************************** keyboard */
-__apus
static int apus_kbd_setkeycode(unsigned int scancode, unsigned int keycode)
{
return -EOPNOTSUPP;
}
-__apus
static int apus_kbd_getkeycode(unsigned int scancode)
{
return scancode > 127 ? -EINVAL : scancode;
}
-__apus
static int apus_kbd_translate(unsigned char keycode, unsigned char *keycodep,
char raw_mode)
{
@@ -849,18 +823,15 @@
return 1;
}
-__apus
static char apus_kbd_unexpected_up(unsigned char keycode)
{
return 0200;
}
-__apus
static void apus_kbd_leds(unsigned char leds)
{
}
-__apus
static void apus_kbd_init_hw(void)
{
#ifdef CONFIG_APUS
@@ -893,7 +864,6 @@
ciab.pra &= ~SER_RTS; /* active low */
}
-__apus
int __debug_ser_out( unsigned char c )
{
custom.serdat = c | 0x100;
@@ -903,7 +873,6 @@
return 1;
}
-__apus
unsigned char __debug_ser_in( void )
{
unsigned char c;
@@ -917,7 +886,6 @@
return c;
}
-__apus
int __debug_serinit( void )
{
unsigned long flags;
@@ -949,7 +917,6 @@
return 0;
}
-__apus
void __debug_print_hex(unsigned long x)
{
int i;
@@ -963,7 +930,6 @@
__debug_ser_out('\r');
}
-__apus
void __debug_print_string(char* s)
{
unsigned char c;
@@ -973,7 +939,6 @@
__debug_ser_out('\r');
}
-__apus
static void apus_progress(char *s, unsigned short value)
{
__debug_print_string(s);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)