Commit b6cb7ebe authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://ppc.bkbits.net/for-linus-ppc

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 7f4b5468 3dd8bc0d
...@@ -1060,13 +1060,7 @@ config HIGHMEM_START_BOOL ...@@ -1060,13 +1060,7 @@ config HIGHMEM_START_BOOL
Say N here unless you know what you are doing. Say N here unless you know what you are doing.
config HIGHMEM_START config HIGHMEM_START
hex "Virtual start address of high memory pool" hex "Virtual start address of high memory pool" if HIGHMEM_START_BOOL
depends on HIGHMEM_START_BOOL
default "0xfe000000"
config HIGHMEM_START
hex
depends on !HIGHMEM_START_BOOL
default "0xfe000000" default "0xfe000000"
config LOWMEM_SIZE_BOOL config LOWMEM_SIZE_BOOL
...@@ -1082,13 +1076,7 @@ config LOWMEM_SIZE_BOOL ...@@ -1082,13 +1076,7 @@ config LOWMEM_SIZE_BOOL
Say N here unless you know what you are doing. Say N here unless you know what you are doing.
config LOWMEM_SIZE config LOWMEM_SIZE
hex "Maximum low memory size (in bytes)" hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
depends on LOWMEM_SIZE_BOOL
default "0x20000000"
config LOWMEM_SIZE
hex
depends on !LOWMEM_SIZE_BOOL
default "0x20000000" default "0x20000000"
config KERNEL_START_BOOL config KERNEL_START_BOOL
...@@ -1103,13 +1091,7 @@ config KERNEL_START_BOOL ...@@ -1103,13 +1091,7 @@ config KERNEL_START_BOOL
Say N here unless you know what you are doing. Say N here unless you know what you are doing.
config KERNEL_START config KERNEL_START
hex "Virtual address of kernel base" hex "Virtual address of kernel base" if KERNEL_START_BOOL
depends on KERNEL_START_BOOL
default "0xc0000000"
config KERNEL_START
hex
depends on !KERNEL_START_BOOL
default "0xc0000000" default "0xc0000000"
config TASK_SIZE_BOOL config TASK_SIZE_BOOL
...@@ -1123,13 +1105,7 @@ config TASK_SIZE_BOOL ...@@ -1123,13 +1105,7 @@ config TASK_SIZE_BOOL
Say N here unless you know what you are doing. Say N here unless you know what you are doing.
config TASK_SIZE config TASK_SIZE
hex "Size of user task space" hex "Size of user task space" if TASK_SIZE_BOOL
depends on TASK_SIZE_BOOL
default "0x80000000"
config TASK_SIZE
hex
depends on !TASK_SIZE_BOOL
default "0x80000000" default "0x80000000"
config BOOT_LOAD_BOOL config BOOT_LOAD_BOOL
...@@ -1143,19 +1119,8 @@ config BOOT_LOAD_BOOL ...@@ -1143,19 +1119,8 @@ config BOOT_LOAD_BOOL
Say N here unless you know what you are doing. Say N here unless you know what you are doing.
config BOOT_LOAD config BOOT_LOAD
hex "Link/load address for booting" hex "Link/load address for booting" if BOOT_LOAD_BOOL
depends on BOOT_LOAD_BOOL default "0x00400000" if 40x || 8xx || 8260
default "0x00400000"
# If we don't have a custom load, we define one here depending.
config BOOT_LOAD
hex
depends on !BOOT_LOAD_BOOL && (40x || 8xx || 8260)
default "0x00400000"
config BOOT_LOAD
hex
depends on !BOOT_LOAD_BOOL
default "0x00800000" default "0x00800000"
config PIN_TLB config PIN_TLB
......
...@@ -316,9 +316,31 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum, ...@@ -316,9 +316,31 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum,
{ {
struct bi_record *rec; struct bi_record *rec;
unsigned long initrd_loc;
rec = (struct bi_record *)_ALIGN((unsigned long)(zimage_size) + unsigned long rec_loc = _ALIGN((unsigned long)(zimage_size) +
(1 << 20) - 1, (1 << 20)); (1 << 20) - 1, (1 << 20));
rec = (struct bi_record *)rec_loc;
/* We need to make sure that the initrd and bi_recs do not
* overlap. */
if ( initrd_size ) {
initrd_loc = (unsigned long)(&__ramdisk_begin);
/* If the bi_recs are in the middle of the current
* initrd, move the initrd to the next MB
* boundary. */
if ((rec_loc > initrd_loc) &&
((initrd_loc + initrd_size)
> rec_loc)) {
initrd_loc = _ALIGN((unsigned long)(zimage_size)
+ (2 << 20) - 1, (2 << 20));
memmove((void *)initrd_loc, &__ramdisk_begin,
initrd_size);
puts("initrd moved: "); puthex(initrd_loc);
puts(" "); puthex(initrd_loc + initrd_size);
puts("\n");
}
}
rec->tag = BI_FIRST; rec->tag = BI_FIRST;
rec->size = sizeof(struct bi_record); rec->size = sizeof(struct bi_record);
...@@ -348,7 +370,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum, ...@@ -348,7 +370,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum,
if ( initrd_size ) { if ( initrd_size ) {
rec->tag = BI_INITRD; rec->tag = BI_INITRD;
rec->data[0] = (unsigned long)(&__ramdisk_begin); rec->data[0] = initrd_loc;
rec->data[1] = initrd_size; rec->data[1] = initrd_size;
rec->size = sizeof(struct bi_record) + 2 * rec->size = sizeof(struct bi_record) + 2 *
sizeof(unsigned long); sizeof(unsigned long);
......
...@@ -209,9 +209,30 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum, b ...@@ -209,9 +209,30 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum, b
puts("done.\n"); puts("done.\n");
{ {
struct bi_record *rec; struct bi_record *rec;
unsigned long initrd_loc;
unsigned long rec_loc = _ALIGN((unsigned long)(zimage_size) +
(1 << 20) - 1, (1 << 20));
rec = (struct bi_record *)rec_loc;
rec = (struct bi_record *)_ALIGN((unsigned long)zimage_size + /* We need to make sure that the initrd and bi_recs do not
(1 << 20) - 1,(1 << 20)); * overlap. */
if ( initrd_size ) {
initrd_loc = (unsigned long)(&__ramdisk_begin);
/* If the bi_recs are in the middle of the current
* initrd, move the initrd to the next MB
* boundary. */
if ((rec_loc > initrd_loc) &&
((initrd_loc + initrd_size)
> rec_loc)) {
initrd_loc = _ALIGN((unsigned long)(zimage_size)
+ (2 << 20) - 1, (2 << 20));
memmove((void *)initrd_loc, &__ramdisk_begin,
initrd_size);
puts("initrd moved: "); puthex(initrd_loc);
puts(" "); puthex(initrd_loc + initrd_size);
puts("\n");
}
}
rec->tag = BI_FIRST; rec->tag = BI_FIRST;
rec->size = sizeof(struct bi_record); rec->size = sizeof(struct bi_record);
...@@ -224,7 +245,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum, b ...@@ -224,7 +245,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum, b
if ( initrd_size ) { if ( initrd_size ) {
rec->tag = BI_INITRD; rec->tag = BI_INITRD;
rec->data[0] = (unsigned long)(&__ramdisk_begin); rec->data[0] = initrd_loc;
rec->data[1] = initrd_size; rec->data[1] = initrd_size;
rec->size = sizeof(struct bi_record) + 2 * rec->size = sizeof(struct bi_record) + 2 *
sizeof(unsigned long); sizeof(unsigned long);
......
...@@ -396,9 +396,30 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) ...@@ -396,9 +396,30 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
{ {
struct bi_record *rec; struct bi_record *rec;
unsigned long initrd_loc;
rec = (struct bi_record *)_ALIGN((ulong)zimage_size + unsigned long rec_loc = _ALIGN((unsigned long)(zimage_size) +
(1<<20)-1,(1<<20)); (1 << 20) - 1, (1 << 20));
rec = (struct bi_record *)rec_loc;
/* We need to make sure that the initrd and bi_recs do not
* overlap. */
if ( initrd_size ) {
initrd_loc = (unsigned long)(&__ramdisk_begin);
/* If the bi_recs are in the middle of the current
* initrd, move the initrd to the next MB
* boundary. */
if ((rec_loc > initrd_loc) &&
((initrd_loc + initrd_size)
> rec_loc)) {
initrd_loc = _ALIGN((unsigned long)(zimage_size)
+ (2 << 20) - 1, (2 << 20));
memmove((void *)initrd_loc, &__ramdisk_begin,
initrd_size);
puts("initrd moved: "); puthex(initrd_loc);
puts(" "); puthex(initrd_loc + initrd_size);
puts("\n");
}
}
rec->tag = BI_FIRST; rec->tag = BI_FIRST;
rec->size = sizeof(struct bi_record); rec->size = sizeof(struct bi_record);
...@@ -421,7 +442,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) ...@@ -421,7 +442,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
if ( initrd_size ) { if ( initrd_size ) {
rec->tag = BI_INITRD; rec->tag = BI_INITRD;
rec->data[0] = (unsigned long)(&__ramdisk_begin); rec->data[0] = initrd_loc;
rec->data[1] = initrd_size; rec->data[1] = initrd_size;
rec->size = sizeof(struct bi_record) + 2 * rec->size = sizeof(struct bi_record) + 2 *
sizeof(unsigned long); sizeof(unsigned long);
......
...@@ -76,8 +76,8 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) ...@@ -76,8 +76,8 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
{ {
int timer = 0; int timer = 0;
char *cp, ch; char *cp, ch;
struct bi_record *rec, *birecs; struct bi_record *rec;
unsigned long TotalMemory = 0; unsigned long TotalMemory = 0, rec_loc, initrd_loc;
serial_fixups(); serial_fixups();
com_port = serial_init(0, NULL); com_port = serial_init(0, NULL);
...@@ -197,10 +197,29 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) ...@@ -197,10 +197,29 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
/* /*
* Create bi_recs for cmd_line and initrds * Create bi_recs for cmd_line and initrds
*/ */
rec = (struct bi_record *)_ALIGN((unsigned long)(zimage_size) + rec_loc = _ALIGN((unsigned long)(zimage_size) +
(1 << 20) - 1, (1 << 20)); (1 << 20) - 1, (1 << 20));
birecs = rec; rec = (struct bi_record *)rec_loc;
/* We need to make sure that the initrd and bi_recs do not
* overlap. */
if ( initrd_size ) {
initrd_loc = (unsigned long)(&__ramdisk_begin);
/* If the bi_recs are in the middle of the current
* initrd, move the initrd to the next MB
* boundary. */
if ((rec_loc > initrd_loc) &&
((initrd_loc + initrd_size) > rec_loc)) {
initrd_loc = _ALIGN((unsigned long)(zimage_size)
+ (2 << 20) - 1, (2 << 20));
memmove((void *)initrd_loc, &__ramdisk_begin,
initrd_size);
puts("initrd moved: "); puthex(initrd_loc);
puts(" "); puthex(initrd_loc + initrd_size);
puts("\n");
}
}
rec->tag = BI_FIRST; rec->tag = BI_FIRST;
rec->size = sizeof(struct bi_record); rec->size = sizeof(struct bi_record);
rec = (struct bi_record *)((unsigned long)rec + rec->size); rec = (struct bi_record *)((unsigned long)rec + rec->size);
...@@ -219,7 +238,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) ...@@ -219,7 +238,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
if ( initrd_size ) { if ( initrd_size ) {
rec->tag = BI_INITRD; rec->tag = BI_INITRD;
rec->data[0] = (unsigned long)(&__ramdisk_begin); rec->data[0] = initrd_loc;
rec->data[1] = initrd_size; rec->data[1] = initrd_size;
rec->size = sizeof(struct bi_record) + 2 * rec->size = sizeof(struct bi_record) + 2 *
sizeof(unsigned long); sizeof(unsigned long);
...@@ -233,5 +252,5 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) ...@@ -233,5 +252,5 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
puts("Now booting the kernel\n"); puts("Now booting the kernel\n");
serial_close(com_port); serial_close(com_port);
return birecs; return (struct bi_record *)rec_loc;
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -286,13 +286,11 @@ void do_settimeofday(struct timeval *tv) ...@@ -286,13 +286,11 @@ void do_settimeofday(struct timeval *tv)
write_unlock_irqrestore(&xtime_lock, flags); write_unlock_irqrestore(&xtime_lock, flags);
} }
/* This function is only called on the boot processor */
void __init time_init(void) void __init time_init(void)
{ {
time_t sec, old_sec; time_t sec, old_sec;
unsigned old_stamp, stamp, elapsed; unsigned old_stamp, stamp, elapsed;
/* This function is only called on the boot processor */
unsigned long flags;
if (ppc_md.time_init != NULL) if (ppc_md.time_init != NULL)
time_offset = ppc_md.time_init(); time_offset = ppc_md.time_init();
...@@ -309,31 +307,31 @@ void __init time_init(void) ...@@ -309,31 +307,31 @@ void __init time_init(void)
/* Now that the decrementer is calibrated, it can be used in case the /* Now that the decrementer is calibrated, it can be used in case the
* clock is stuck, but the fact that we have to handle the 601 * clock is stuck, but the fact that we have to handle the 601
* makes things more complex. Repeatedly read the RTC until the * makes things more complex. Repeatedly read the RTC until the
* next second boundary to try to achieve some precision... * next second boundary to try to achieve some precision. If there
* is no RTC, we still need to set tb_last_stamp and
* last_jiffy_stamp(cpu 0) to the current stamp.
*/ */
stamp = get_native_tbl();
if (ppc_md.get_rtc_time) { if (ppc_md.get_rtc_time) {
stamp = get_native_tbl();
sec = ppc_md.get_rtc_time(); sec = ppc_md.get_rtc_time();
elapsed = 0; elapsed = 0;
do { do {
old_stamp = stamp; old_stamp = stamp;
old_sec = sec; old_sec = sec;
stamp = get_native_tbl(); stamp = get_native_tbl();
if (__USE_RTC() && stamp < old_stamp) old_stamp -= 1000000000; if (__USE_RTC() && stamp < old_stamp)
old_stamp -= 1000000000;
elapsed += stamp - old_stamp; elapsed += stamp - old_stamp;
sec = ppc_md.get_rtc_time(); sec = ppc_md.get_rtc_time();
} while ( sec == old_sec && elapsed < 2*HZ*tb_ticks_per_jiffy); } while ( sec == old_sec && elapsed < 2*HZ*tb_ticks_per_jiffy);
if (sec==old_sec) { if (sec==old_sec)
printk("Warning: real time clock seems stuck!\n"); printk("Warning: real time clock seems stuck!\n");
}
write_lock_irqsave(&xtime_lock, flags);
xtime.tv_sec = sec; xtime.tv_sec = sec;
last_jiffy_stamp(0) = tb_last_stamp = stamp;
xtime.tv_nsec = 0; xtime.tv_nsec = 0;
/* No update now, we just read the time from the RTC ! */ /* No update now, we just read the time from the RTC ! */
last_rtc_update = xtime.tv_sec; last_rtc_update = xtime.tv_sec;
write_unlock_irqrestore(&xtime_lock, flags);
} }
last_jiffy_stamp(0) = tb_last_stamp = stamp;
/* Not exact, but the timer interrupt takes care of this */ /* Not exact, but the timer interrupt takes care of this */
set_dec(tb_ticks_per_jiffy); set_dec(tb_ticks_per_jiffy);
......
...@@ -13,6 +13,9 @@ choice ...@@ -13,6 +13,9 @@ choice
config ASH config ASH
bool "Ash" bool "Ash"
config BEECH
bool "Beech"
config CEDAR config CEDAR
bool "Cedar" bool "Cedar"
...@@ -38,6 +41,9 @@ config REDWOOD_4 ...@@ -38,6 +41,9 @@ config REDWOOD_4
config REDWOOD_5 config REDWOOD_5
bool "Redwood-5" bool "Redwood-5"
config REDWOOD_6
bool "Redwood-6"
config TIVO config TIVO
bool "Tivo" bool "Tivo"
...@@ -75,7 +81,7 @@ config IBM405_ERR51 ...@@ -75,7 +81,7 @@ config IBM405_ERR51
config IBM_OCP config IBM_OCP
bool bool
depends on ASH || CEDAR || CPCI405 || EP405 || REDWOOD_4 || REDWOOD_5 || WALNUT depends on ASH || BEECH || CEDAR || CPCI405 || EP405 || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || WALNUT
default y default y
config NP405L config NP405L
...@@ -100,7 +106,7 @@ config 405GP ...@@ -100,7 +106,7 @@ config 405GP
config STB03xxx config STB03xxx
bool bool
depends on REDWOOD_5 || REDWOOD_4 depends on REDWOOD_5 || REDWOOD_4 || REDWOOD_6
default y default y
config EMBEDDEDBOOT config EMBEDDEDBOOT
...@@ -110,7 +116,7 @@ config EMBEDDEDBOOT ...@@ -110,7 +116,7 @@ config EMBEDDEDBOOT
config IBM_OPENBIOS config IBM_OPENBIOS
bool bool
depends on ASH || CEDAR || REDWOOD_4 || REDWOOD_5 || WALNUT depends on ASH || BEECH || CEDAR || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || WALNUT
default y default y
config 405_DMA config 405_DMA
......
# #
# Makefile for the PowerPC 4xx linux kernel. # Makefile for the PowerPC 4xx linux kernel.
export-objs := ibm405lp.o
obj-$(CONFIG_ASH) += ash.o obj-$(CONFIG_ASH) += ash.o
obj-$(CONFIG_BEECH) += beech.o
obj-$(CONFIG_CEDAR) += cedar.o obj-$(CONFIG_CEDAR) += cedar.o
obj-$(CONFIG_CPCI405) += cpci405.o obj-$(CONFIG_CPCI405) += cpci405.o
obj-$(CONFIG_EP405) += ep405.o obj-$(CONFIG_EP405) += ep405.o
obj-$(CONFIG_OAK) += oak.o obj-$(CONFIG_OAK) += oak.o
obj-$(CONFIG_REDWOOD_4) += redwood.o obj-$(CONFIG_REDWOOD_4) += redwood.o
obj-$(CONFIG_REDWOOD_5) += redwood5.o obj-$(CONFIG_REDWOOD_5) += redwood5.o
obj-$(CONFIG_REDWOOD_6) += redwood6.o
obj-$(CONFIG_WALNUT) += walnut.o obj-$(CONFIG_WALNUT) += walnut.o
obj-$(CONFIG_NP405L) += ibmnp405l.o obj-$(CONFIG_NP405L) += ibmnp405l.o
...@@ -15,3 +19,7 @@ obj-$(CONFIG_405GP) += ibm405gp.o ...@@ -15,3 +19,7 @@ obj-$(CONFIG_405GP) += ibm405gp.o
obj-$(CONFIG_REDWOOD_4) += ibmstb3.o obj-$(CONFIG_REDWOOD_4) += ibmstb3.o
obj-$(CONFIG_REDWOOD_5) += ibmstb4.o obj-$(CONFIG_REDWOOD_5) += ibmstb4.o
obj-$(CONFIG_NP405H) += ibmnp405h.o obj-$(CONFIG_NP405H) += ibmnp405h.o
obj-$(CONFIG_REDWOOD_6) += ibmstbx25.o
obj-$(CONFIG_NP4GS3) += ibmnp4gs.o
obj-$(CONFIG_405LP) += ibm405lp.o
obj-$(CONFIG_405GPR) += ibm405gpr.o
This diff is collapsed.
/* /*
* *
* *
* Copyright 2000 MontaVista Software Inc. * Copyright 2000-2002 MontaVista Software Inc.
* Author: MontaVista Software, Inc. * Author: MontaVista Software, Inc.
* akuster@mvista.com or source@mvista.com * akuster@mvista.com or source@mvista.com
* *
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#ifndef __ASM_ASH_H__ #ifndef __ASM_ASH_H__
#define __ASM_ASH_H__ #define __ASM_ASH_H__
#include <platforms/4xx/ibm_ocp.h> #include <asm/ibm_ocp.h>
#include <platforms/4xx/ibmnp405h.h> #include <platforms/4xx/ibmnp405h.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
...@@ -32,7 +32,7 @@ typedef struct board_info { ...@@ -32,7 +32,7 @@ typedef struct board_info {
unsigned char bi_s_version[4]; /* Version of this structure */ unsigned char bi_s_version[4]; /* Version of this structure */
unsigned char bi_r_version[30]; /* Version of the IBM ROM */ unsigned char bi_r_version[30]; /* Version of the IBM ROM */
unsigned int bi_memsize; /* DRAM installed, in bytes */ unsigned int bi_memsize; /* DRAM installed, in bytes */
unsigned char bi_enetaddr[EMAC_NUMS][6]; /* Local Ethernet MAC address */ unsigned char bi_enetaddr[4][6]; /* Local Ethernet MAC address */
unsigned char bi_pci_enetaddr[6]; unsigned char bi_pci_enetaddr[6];
unsigned int bi_intfreq; /* Processor speed, in Hz */ unsigned int bi_intfreq; /* Processor speed, in Hz */
unsigned int bi_busfreq; /* PLB Bus speed, in Hz */ unsigned int bi_busfreq; /* PLB Bus speed, in Hz */
...@@ -76,7 +76,7 @@ extern void *ash_rtc_base; ...@@ -76,7 +76,7 @@ extern void *ash_rtc_base;
#define BASE_BAUD 691200 #define BASE_BAUD 691200
#endif #endif
#define PPC4xx_MACHINE_NAME "IBM NP405H Ceder" #define PPC4xx_MACHINE_NAME "IBM NP405H Ash"
extern char pci_irq_table[][4]; extern char pci_irq_table[][4];
......
This diff is collapsed.
This diff is collapsed.
...@@ -11,73 +11,75 @@ ...@@ -11,73 +11,75 @@
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/io.h> #include <asm/io.h>
#ifdef CONFIG_PPC_RTC
#include <asm/todc.h> #include <asm/todc.h>
#endif
void *ceder_rtc_base; void *cedar_rtc_base;
void __init void __init
board_setup_arch(void) cedar_setup_arch(void)
{ {
bd_t *bip = &__res;
bd_t *bip = (bd_t *)__res; /* RTC step for the walnut */
cedar_rtc_base = (void *) CEDAR_RTC_VADDR;
TODC_INIT(TODC_TYPE_DS1743, cedar_rtc_base, cedar_rtc_base,
cedar_rtc_base, 8);
#ifdef CONFIG_PPC_RTC
/* RTC step for the walnut */
ceder_rtc_base = (void *) CEDER_RTC_VADDR;
TODC_INIT(TODC_TYPE_DS1743, ceder_rtc_base, ceder_rtc_base,ceder_rtc_base, 8);
#endif /* CONFIG_PPC_RTC */
#define CONFIG_DEBUG_BRINGUP
#ifdef CONFIG_DEBUG_BRINGUP #ifdef CONFIG_DEBUG_BRINGUP
printk("\n"); printk("\n");
printk("machine\t: %s\n", PPC4xx_MACHINE_NAME); printk("machine\t: %s\n", PPC4xx_MACHINE_NAME);
printk("\n"); printk("\n");
printk("bi_s_version\t %s\n", bip->bi_s_version); printk("bi_s_version\t %s\n", bip->bi_s_version);
printk("bi_r_version\t %s\n", bip->bi_r_version); printk("bi_r_version\t %s\n", bip->bi_r_version);
printk("bi_memsize\t 0x%8.8x\t %dMBytes\n", bip->bi_memsize,bip->bi_memsize/(1024*1000)); printk("bi_memsize\t 0x%8.8x\t %dMBytes\n", bip->bi_memsize,
bip->bi_memsize / (1024 * 1000));
printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 0, printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 0,
bip->bi_enetaddr[0][0], bip->bi_enetaddr[0][1], bip->bi_enetaddr[0][0], bip->bi_enetaddr[0][1],
bip->bi_enetaddr[0][2], bip->bi_enetaddr[0][3], bip->bi_enetaddr[0][2], bip->bi_enetaddr[0][3],
bip->bi_enetaddr[0][4], bip->bi_enetaddr[0][5]); bip->bi_enetaddr[0][4], bip->bi_enetaddr[0][5]);
printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 1, printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 1,
bip->bi_enetaddr[1][0], bip->bi_enetaddr[1][1], bip->bi_enetaddr[1][0], bip->bi_enetaddr[1][1],
bip->bi_enetaddr[1][2], bip->bi_enetaddr[1][3], bip->bi_enetaddr[1][2], bip->bi_enetaddr[1][3],
bip->bi_enetaddr[1][4], bip->bi_enetaddr[1][5]); bip->bi_enetaddr[1][4], bip->bi_enetaddr[1][5]);
printk("bi_intfreq\t 0x%8.8x\t clock:\t %dMhz\n", printk("bi_intfreq\t 0x%8.8x\t clock:\t %dMhz\n",
bip->bi_intfreq, bip->bi_intfreq/ 1000000); bip->bi_intfreq, bip->bi_intfreq / 1000000);
printk("bi_busfreq\t 0x%8.8x\t plb bus clock:\t %dMHz\n", printk("bi_busfreq\t 0x%8.8x\t plb bus clock:\t %dMHz\n",
bip->bi_busfreq, bip->bi_busfreq / 1000000 ); bip->bi_busfreq, bip->bi_busfreq / 1000000);
printk("bi_pci_busfreq\t 0x%8.8x\t pci bus clock:\t %dMHz\n", printk("bi_pci_busfreq\t 0x%8.8x\t pci bus clock:\t %dMHz\n",
bip->bi_pci_busfreq, bip->bi_pci_busfreq/1000000); bip->bi_pci_busfreq, bip->bi_pci_busfreq / 1000000);
printk("\n"); printk("\n");
#endif #endif
}
void __init /* Identify the system */
board_io_mapping(void) printk
{ ("IBM Cedar port (C) 2002 MontaVista Software, Inc. (source@mvista.com)\n");
io_block_mapping(CEDER_RTC_VADDR,
CEDER_RTC_PADDR, CEDER_RTC_SIZE, _PAGE_IO);
} }
void __init void __init
board_setup_irq(void) cedar_map_io(void)
{ {
ppc4xx_map_io();
io_block_mapping(CEDAR_RTC_VADDR,
CEDAR_RTC_PADDR, CEDAR_RTC_SIZE, _PAGE_IO);
} }
void __init void __init
board_init(void) platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{ {
#ifdef CONFIG_PPC_RTC ppc4xx_init(r3, r4, r5, r6, r7);
ppc_md.setup_arch = cedar_setup_arch;
ppc_md.setup_io_mappings = cedar_map_io;
ppc_md.time_init = todc_time_init; ppc_md.time_init = todc_time_init;
ppc_md.set_rtc_time = todc_set_rtc_time; ppc_md.set_rtc_time = todc_set_rtc_time;
ppc_md.get_rtc_time = todc_get_rtc_time; ppc_md.get_rtc_time = todc_get_rtc_time;
ppc_md.nvram_read_val = todc_direct_read_val; ppc_md.nvram_read_val = todc_direct_read_val;
ppc_md.nvram_write_val = todc_direct_write_val; ppc_md.nvram_write_val = todc_direct_write_val;
#endif
} }
This diff is collapsed.
...@@ -13,9 +13,6 @@ ...@@ -13,9 +13,6 @@
* Free Software Foundation; either version 2 of the License, or (at your * Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. * option) any later version.
* *
* History: 11/09/2001 - armin
* added board_init to add in additional instuctions needed during platfrom_init
*
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -26,6 +23,8 @@ ...@@ -26,6 +23,8 @@
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/todc.h> #include <asm/todc.h>
void *cpci405_nvram;
/* /*
* Some IRQs unique to CPCI-405. * Some IRQs unique to CPCI-405.
*/ */
...@@ -51,28 +50,31 @@ ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) ...@@ -51,28 +50,31 @@ ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
}; };
void __init void __init
board_setup_arch(void) cpci405_setup_arch(void)
{ {
ppc4xx_setup_arch();
TODC_INIT(TODC_TYPE_MK48T35, cpci405_nvram, cpci405_nvram, cpci405_nvram, 8);
} }
void __init void __init
board_io_mapping(void) cpci405_map_io(void)
{ {
ppc4xx_map_io();
cpci405_nvram = ioremap(CPCI405_NVRAM_PADDR, CPCI405_NVRAM_SIZE);
} }
void __init void __init
board_setup_irq(void) platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{ {
} ppc4xx_init(r3, r4, r5, r6, r7);
ppc_md.setup_arch = cpci405_setup_arch;
ppc_md.setup_io_mappings = cpci405_map_io;
void __init
board_init(void)
{
#ifdef CONFIG_PPC_RTC
ppc_md.time_init = todc_time_init; ppc_md.time_init = todc_time_init;
ppc_md.set_rtc_time = todc_set_rtc_time; ppc_md.set_rtc_time = todc_set_rtc_time;
ppc_md.get_rtc_time = todc_get_rtc_time; ppc_md.get_rtc_time = todc_get_rtc_time;
ppc_md.nvram_read_val = todc_direct_read_val; ppc_md.nvram_read_val = todc_direct_read_val;
ppc_md.nvram_write_val = todc_direct_write_val; ppc_md.nvram_write_val = todc_direct_write_val;
#endif
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment