Commit d797ebd3 authored by Russell King's avatar Russell King

[ARM] Localise old param_struct to arch/arm/kernel/compat.c.

parent 1688e82a
......@@ -9,6 +9,11 @@
*
* We keep the old params compatibility cruft in one place (here)
* so we don't end up with lots of mess around other places.
*
* NOTE:
* The old struct param_struct is deprecated, but it will be kept in
* the kernel for 5 years from now (2001). This will allow boot loaders
* to convert to the new struct tag way.
*/
#include <linux/config.h>
#include <linux/types.h>
......@@ -22,6 +27,59 @@
#include <asm/mach/arch.h>
/*
* Usage:
* - do not go blindly adding fields, add them at the end
* - when adding fields, don't rely on the address until
* a patch from me has been released
* - unused fields should be zero (for future expansion)
* - this structure is relatively short-lived - only
* guaranteed to contain useful data in setup_arch()
*
* This is the old deprecated way to pass parameters to the kernel
*/
struct param_struct {
union {
struct {
unsigned long page_size; /* 0 */
unsigned long nr_pages; /* 4 */
unsigned long ramdisk_size; /* 8 */
unsigned long flags; /* 12 */
#define FLAG_READONLY 1
#define FLAG_RDLOAD 4
#define FLAG_RDPROMPT 8
unsigned long rootdev; /* 16 */
unsigned long video_num_cols; /* 20 */
unsigned long video_num_rows; /* 24 */
unsigned long video_x; /* 28 */
unsigned long video_y; /* 32 */
unsigned long memc_control_reg; /* 36 */
unsigned char sounddefault; /* 40 */
unsigned char adfsdrives; /* 41 */
unsigned char bytes_per_char_h; /* 42 */
unsigned char bytes_per_char_v; /* 43 */
unsigned long pages_in_bank[4]; /* 44 */
unsigned long pages_in_vram; /* 60 */
unsigned long initrd_start; /* 64 */
unsigned long initrd_size; /* 68 */
unsigned long rd_start; /* 72 */
unsigned long system_rev; /* 76 */
unsigned long system_serial_low; /* 80 */
unsigned long system_serial_high; /* 84 */
unsigned long mem_fclk_21285; /* 88 */
} s;
char unused[256];
} u1;
union {
char paths[8][128];
struct {
unsigned long magic;
char n[1024 - sizeof(unsigned long)];
} s;
} u2;
char commandline[COMMAND_LINE_SIZE];
};
static struct tag * __init memtag(struct tag *tag, unsigned long start, unsigned long size)
{
tag = tag_next(tag);
......@@ -33,7 +91,7 @@ static struct tag * __init memtag(struct tag *tag, unsigned long start, unsigned
return tag;
}
static void __init build_tag_list(struct param_struct *params, void *taglist, int mem_init)
static void __init build_tag_list(struct param_struct *params, void *taglist)
{
struct tag *tag = taglist;
......@@ -44,6 +102,22 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in
"trying to continue\n");
return;
}
#ifdef CONFIG_ARCH_NETWINDER
if (params->u1.s.nr_pages != 0x02000 &&
params->u1.s.nr_pages != 0x04000 &&
params->u1.s.nr_pages != 0x08000 &&
params->u1.s.nr_pages != 0x10000) {
printk(KERN_WARNING "Warning: bad NeTTrom parameters "
"detected, using defaults\n");
params->u1.s.nr_pages = 0x1000; /* 16MB */
params->u1.s.ramdisk_size = 0;
params->u1.s.flags = FLAG_READONLY;
params->u1.s.initrd_start = 0;
params->u1.s.initrd_size = 0;
params->u1.s.rd_start = 0;
}
#endif
tag->hdr.tag = ATAG_CORE;
tag->hdr.size = tag_size(tag_core);
......@@ -76,17 +150,15 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in
tag->hdr.size = tag_size(tag_revision);
tag->u.revision.rev = params->u1.s.system_rev;
if (mem_init) {
#ifdef CONFIG_ARCH_ACORN
if (machine_is_riscpc()) {
int i;
for (i = 0; i < 4; i++)
tag = memtag(tag, PHYS_OFFSET + (i << 26),
params->u1.s.pages_in_bank[i] * PAGE_SIZE);
} else
if (machine_is_riscpc()) {
int i;
for (i = 0; i < 4; i++)
tag = memtag(tag, PHYS_OFFSET + (i << 26),
params->u1.s.pages_in_bank[i] * PAGE_SIZE);
} else
#endif
tag = memtag(tag, PHYS_OFFSET, params->u1.s.nr_pages * PAGE_SIZE);
}
tag = memtag(tag, PHYS_OFFSET, params->u1.s.nr_pages * PAGE_SIZE);
#ifdef CONFIG_FOOTBRIDGE
if (params->u1.s.mem_fclk_21285) {
......@@ -97,6 +169,23 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in
}
#endif
#ifdef CONFIG_ARCH_EBSA285
if (machine_is_ebsa285()) {
tag = tag_next(tag);
tag->hdr.tag = ATAG_VIDEOTEXT;
tag->hdr.size = tag_size(tag_videotext);
tag->u.videotext.x = params->u1.s.video_x;
tag->u.videotext.y = params->u1.s.video_y;
tag->u.videotext.video_page = 0;
tag->u.videotext.video_mode = 0;
tag->u.videotext.video_cols = params->u1.s.video_num_cols;
tag->u.videotext.video_ega_bx = 0;
tag->u.videotext.video_lines = params->u1.s.video_num_rows;
tag->u.videotext.video_isvga = 1;
tag->u.videotext.video_points = 8;
}
#endif
#ifdef CONFIG_ARCH_ACORN
tag = tag_next(tag);
tag->hdr.tag = ATAG_ACORN;
......@@ -114,14 +203,22 @@ static void __init build_tag_list(struct param_struct *params, void *taglist, in
strcpy(tag->u.cmdline.cmdline, params->commandline);
tag = tag_next(tag);
tag->hdr.tag = 0;
tag->hdr.tag = ATAG_NONE;
tag->hdr.size = 0;
memmove(params, taglist, ((int)tag) - ((int)taglist) +
sizeof(struct tag_header));
}
void __init convert_to_tag_list(struct param_struct *params, int mem_init)
void __init convert_to_tag_list(struct tag *tags)
{
struct param_struct *params = (struct param_struct *)tags;
build_tag_list(params, &params->u2);
}
void __init squash_mem_tags(struct tag *tag)
{
build_tag_list(params, &params->u2, mem_init);
for (; tag->hdr.size; tag = tag_next(tag))
if (tag->hdr.tag == ATAG_MEM)
tag->hdr.tag = ATAG_NONE;
}
......@@ -57,7 +57,8 @@ __setup("fpe=", fpe_setup);
extern unsigned int mem_fclk_21285;
extern void paging_init(struct meminfo *, struct machine_desc *desc);
extern void convert_to_tag_list(struct param_struct *params, int mem_init);
extern void convert_to_tag_list(struct tag *tags);
extern void squash_mem_tags(struct tag *tag);
extern void bootmem_init(struct meminfo *);
extern void reboot_setup(char *str);
extern int root_mountflags;
......@@ -589,14 +590,29 @@ static void __init parse_tags(const struct tag *t)
t->hdr.tag);
}
/*
* This holds our defaults.
*/
static struct init_tags {
struct tag_header hdr1;
struct tag_core core;
struct tag_header hdr2;
struct tag_mem32 mem;
struct tag_header hdr3;
} init_tags __initdata = {
{ tag_size(tag_core), ATAG_CORE },
{ 1, PAGE_SIZE, 0xff },
{ tag_size(tag_mem32), ATAG_MEM },
{ MEM_SIZE, PHYS_OFFSET },
{ 0, ATAG_NONE }
};
void __init setup_arch(char **cmdline_p)
{
struct tag *tags = NULL;
struct tag *tags = (struct tag *)&init_tags;
struct machine_desc *mdesc;
char *from = default_command_line;
ROOT_DEV = mk_kdev(0, 255);
setup_processor();
mdesc = setup_machine(machine_arch_type);
machine_name = mdesc->name;
......@@ -607,29 +623,22 @@ void __init setup_arch(char **cmdline_p)
if (mdesc->param_offset)
tags = phys_to_virt(mdesc->param_offset);
/*
* Do the machine-specific fixups before we parse the
* parameters or tags.
*/
if (mdesc->fixup)
mdesc->fixup(mdesc, (struct param_struct *)tags,
&from, &meminfo);
/*
* If we have the old style parameters, convert them to
* a tag list before.
* a tag list.
*/
if (tags && tags->hdr.tag != ATAG_CORE)
convert_to_tag_list((struct param_struct *)tags,
meminfo.nr_banks == 0);
if (tags->hdr.tag != ATAG_CORE)
convert_to_tag_list(tags);
if (tags->hdr.tag != ATAG_CORE)
tags = (struct tag *)&init_tags;
if (tags && tags->hdr.tag == ATAG_CORE)
parse_tags(tags);
if (mdesc->fixup)
mdesc->fixup(mdesc, tags, &from, &meminfo);
if (meminfo.nr_banks == 0) {
meminfo.nr_banks = 1;
meminfo.bank[0].start = PHYS_OFFSET;
meminfo.bank[0].size = MEM_SIZE;
if (tags->hdr.tag == ATAG_CORE) {
if (meminfo.nr_banks != 0)
squash_mem_tags(tags);
parse_tags(tags);
}
init_mm.start_code = (unsigned long) &_text;
......
......@@ -22,7 +22,7 @@ extern void adifcc_map_io(void);
extern void adifcc_init_irq(void);
static void __init
fixup_adifcc(struct machine_desc *desc, struct param_struct *params,
fixup_adifcc(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
#ifdef CONFIG_ARCH_ADI_EVB
......
......@@ -27,7 +27,7 @@ extern void anakin_map_io(void);
extern void genarch_init_irq(void);
static void __init
fixup_anakin(struct machine_desc *desc, struct param_struct *unused,
fixup_anakin(struct machine_desc *desc, struct tag *tag,
char **cmdline, struct meminfo *mi)
{
ROOT_DEV = mk_kdev(RAMDISK_MAJOR, 0);
......
......@@ -45,7 +45,7 @@ static struct map_desc cdb89712_io_desc[] __initdata = {
};
static void __init
fixup_cdb89712(struct machine_desc *desc, struct param_struct *params,
fixup_cdb89712(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
}
......
......@@ -27,7 +27,7 @@ extern void clps711x_init_irq(void);
extern void clps711x_map_io(void);
static void __init
fixup_clep7312(struct machine_desc *desc, struct param_struct *params,
fixup_clep7312(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
mi->nr_banks=1;
......
......@@ -29,7 +29,7 @@ extern void clps711x_init_irq(void);
extern void edb7211_map_io(void);
static void __init
fixup_edb7211(struct machine_desc *desc, struct param_struct *params,
fixup_edb7211(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
/*
......
......@@ -53,7 +53,7 @@ typedef struct tag_IMAGE_PARAMS
#define IMAGE_PARAMS_PHYS 0xC01F0000
static void __init
fortunet_fixup(struct machine_desc *desc, struct param_struct *params,
fortunet_fixup(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
IMAGE_PARAMS *ip;
......
......@@ -49,11 +49,9 @@ static struct map_desc p720t_io_desc[] __initdata = {
};
static void __init
fixup_p720t(struct machine_desc *desc, struct param_struct *params,
fixup_p720t(struct machine_desc *desc, struct tag *tag,
char **cmdline, struct meminfo *mi)
{
struct tag *tag = (struct tag *)params;
/*
* Our bootloader doesn't setup any tags (yet).
*/
......
......@@ -35,7 +35,7 @@ extern void epxa10db_init_irq(void);
static void __init
epxa10db_fixup(struct machine_desc *desc, struct param_struct *params,
epxa10db_fixup(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
......
......@@ -36,25 +36,11 @@ static int __init parse_tag_memclk(const struct tag *tag)
__tagtable(ATAG_MEMCLK, parse_tag_memclk);
#ifdef CONFIG_ARCH_EBSA285
static void __init
fixup_ebsa285(struct machine_desc *desc, struct param_struct *params,
char **cmdline, struct meminfo *mi)
{
#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
ORIG_X = params->u1.s.video_x;
ORIG_Y = params->u1.s.video_y;
ORIG_VIDEO_COLS = params->u1.s.video_num_cols;
ORIG_VIDEO_LINES = params->u1.s.video_num_rows;
#endif
}
MACHINE_START(EBSA285, "EBSA285")
MAINTAINER("Russell King")
BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
BOOT_PARAMS(0x00000100)
VIDEO(0x000a0000, 0x000bffff)
FIXUP(fixup_ebsa285)
MAPIO(footbridge_map_io)
INITIRQ(footbridge_init_irq)
MACHINE_END
......@@ -67,7 +53,7 @@ MACHINE_END
* the parameter page.
*/
static void __init
fixup_netwinder(struct machine_desc *desc, struct param_struct *params,
fixup_netwinder(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
#ifdef CONFIG_ISAPNP
......@@ -80,21 +66,6 @@ fixup_netwinder(struct machine_desc *desc, struct param_struct *params,
*/
isapnp_disable = 1;
#endif
if (params->u1.s.nr_pages != 0x02000 &&
params->u1.s.nr_pages != 0x04000 &&
params->u1.s.nr_pages != 0x08000 &&
params->u1.s.nr_pages != 0x10000) {
printk(KERN_WARNING "Warning: bad NeTTrom parameters "
"detected, using defaults\n");
params->u1.s.nr_pages = 0x1000; /* 16MB */
params->u1.s.ramdisk_size = 0;
params->u1.s.flags = FLAG_READONLY;
params->u1.s.initrd_start = 0;
params->u1.s.initrd_size = 0;
params->u1.s.rd_start = 0;
}
}
MACHINE_START(NETWINDER, "Rebel-NetWinder")
......@@ -116,7 +87,7 @@ MACHINE_END
* hard reboots fail on early boards.
*/
static void __init
fixup_cats(struct machine_desc *desc, struct param_struct *unused,
fixup_cats(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
ORIG_VIDEO_LINES = 25;
......@@ -138,7 +109,7 @@ MACHINE_END
#ifdef CONFIG_ARCH_CO285
static void __init
fixup_coebsa285(struct machine_desc *desc, struct param_struct *unused,
fixup_coebsa285(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
extern unsigned long boot_memory_end;
......
......@@ -51,7 +51,7 @@ static struct kmi_info integrator_mouse __initdata = {
#endif
static void __init
integrator_fixup(struct machine_desc *desc, struct param_struct *unused,
integrator_fixup(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
#ifdef CONFIG_KMI_KEYB
......
......@@ -26,7 +26,7 @@ extern void iq80310_map_io(void);
extern void iq80310_init_irq(void);
static void __init
fixup_iq80310(struct machine_desc *desc, struct param_struct *params,
fixup_iq80310(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
system_rev = (*(volatile unsigned int*)0xfe830000) & 0x0f;
......
......@@ -83,7 +83,7 @@ static void __init l7200_map_io(void)
}
static void __init
fixup_l7200(struct machine_desc *desc, struct param_struct *unused,
fixup_l7200(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
mi->nr_banks = 1;
......
......@@ -69,7 +69,7 @@ static void __init idp_init_irq(void)
}
static void __init
fixup_idp(struct machine_desc *desc, struct param_struct *params,
fixup_idp(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
#ifdef PXA_IDP_REV02
......
......@@ -120,7 +120,7 @@ static int __init lubbock_init(void)
__initcall(lubbock_init);
static void __init
fixup_lubbock(struct machine_desc *desc, struct param_struct *params,
fixup_lubbock(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK (0, 0xa0000000, 64*1024*1024);
......
......@@ -61,7 +61,7 @@ __tagtable(ATAG_ACORN, parse_tag_acorn);
#endif
static void __init
fixup_riscpc(struct machine_desc *desc, struct param_struct *unusd,
fixup_riscpc(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
/*
......
......@@ -82,7 +82,7 @@ static void __init adsbitsy_init_irq(void)
*/
static void __init
fixup_adsbitsy(struct machine_desc *desc, struct param_struct *params,
fixup_adsbitsy(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 32*1024*1024 );
......
......@@ -159,13 +159,11 @@ static void __init get_assabet_scr(void)
SCR_value = scr;
}
extern void convert_to_tag_list(struct param_struct *params, int mem_init);
static void __init
fixup_assabet(struct machine_desc *desc, struct param_struct *params,
fixup_assabet(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
struct tag *t = (struct tag *)params;
struct tag *t = tags;
/* This must be done before any call to machine_has_neponset() */
map_sa1100_gpio_regs();
......@@ -174,12 +172,6 @@ fixup_assabet(struct machine_desc *desc, struct param_struct *params,
if (machine_has_neponset())
printk("Neponset expansion board detected\n");
/*
* Apparantly bootldr uses a param_struct. Groan.
*/
if (t->hdr.tag != ATAG_CORE)
convert_to_tag_list(params, 1);
if (t->hdr.tag != ATAG_CORE) {
t->hdr.tag = ATAG_CORE;
t->hdr.size = tag_size(tag_core);
......
......@@ -143,13 +143,6 @@ void badge4_set_5V(unsigned subsystem, int on)
EXPORT_SYMBOL(badge4_set_5V);
static void __init
fixup_badge4(struct machine_desc *desc, struct param_struct *params,
char **cmdline, struct meminfo *mi)
{
/* nothing needed here */
}
static struct map_desc badge4_io_desc[] __initdata = {
/* virtual physical length domain r w c b */
{0xf1000000, 0x08000000, 0x00100000, DOMAIN_IO, 0,1,0,0},/* SRAM bank 1 */
......@@ -170,7 +163,6 @@ static void __init badge4_map_io(void)
MACHINE_START(BADGE4, "Hewlett-Packard Laboratories BadgePAD 4")
BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
BOOT_PARAMS(0xc0000100)
FIXUP(fixup_badge4)
MAPIO(badge4_map_io)
INITIRQ(sa1100_init_irq)
MACHINE_END
......@@ -23,7 +23,7 @@
static void __init
fixup_brutus(struct machine_desc *desc, struct param_struct *params,
fixup_brutus(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 4*1024*1024 );
......
......@@ -36,7 +36,7 @@ static void __init cerf_init_irq(void)
}
static void __init
fixup_cerf(struct machine_desc *desc, struct param_struct *params,
fixup_cerf(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
#if defined(CONFIG_SA1100_CERF_64MB)
......
......@@ -17,7 +17,7 @@
static void __init
fixup_empeg(struct machine_desc *desc, struct param_struct *params,
fixup_empeg(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 4*1024*1024 );
......
......@@ -152,13 +152,9 @@ __initcall(flexanet_init);
static void __init
fixup_flexanet(struct machine_desc *desc, struct param_struct *params,
fixup_flexanet(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
int status;
unsigned long now;
/* fixed RAM size, by now (64MB) */
SET_BANK( 0, 0xc0000000, 64*1024*1024 );
mi->nr_banks = 1;
......
......@@ -52,7 +52,7 @@ static int __init freebird_init(void)
__initcall(freebird_init);
static void __init
fixup_freebird(struct machine_desc *desc, struct param_struct *params,
fixup_freebird(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
#ifdef CONFIG_SA1100_FREEBIRD_OLD
......
......@@ -125,7 +125,7 @@ static void __init graphicsclient_init_irq(void)
*/
static void __init
fixup_graphicsclient(struct machine_desc *desc, struct param_struct *params,
fixup_graphicsclient(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 16*1024*1024 );
......
......@@ -157,7 +157,7 @@ static void __init graphicsmaster_init_irq(void)
*/
static void __init
fixup_graphicsmaster(struct machine_desc *desc, struct param_struct *params,
fixup_graphicsmaster(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 16*1024*1024 );
......
......@@ -55,7 +55,7 @@ __initcall(init_huw_cs3);
static void __init
fixup_huw_webpanel(struct machine_desc *desc, struct param_struct *params,
fixup_huw_webpanel(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
/**
......
......@@ -17,7 +17,7 @@
static void __init
fixup_itsy(struct machine_desc *desc, struct param_struct *params,
fixup_itsy(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 16*1024*1024 );
......
......@@ -57,7 +57,7 @@ __initcall(jornada720_init);
static void __init
fixup_jornada720(struct machine_desc *desc, struct param_struct *params,
fixup_jornada720(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 32*1024*1024 );
......
......@@ -17,7 +17,7 @@
static void __init
fixup_nanoengine(struct machine_desc *desc, struct param_struct *params,
fixup_nanoengine(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 32*1024*1024 );
......
......@@ -41,7 +41,7 @@ static int __init omnimeter_init(void)
__initcall(omnimeter_init);
static void __init
fixup_omnimeter(struct machine_desc *desc, struct param_struct *params,
fixup_omnimeter(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 16*1024*1024 );
......
......@@ -17,7 +17,7 @@
static void __init
fixup_pangolin(struct machine_desc *desc, struct param_struct *params,
fixup_pangolin(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 128*1024*1024 );
......
......@@ -57,7 +57,7 @@ static void __init pfs168_init_irq(void)
static void __init
fixup_pfs168(struct machine_desc *desc, struct param_struct *params,
fixup_pfs168(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 16*1024*1024 );
......
......@@ -16,7 +16,7 @@
#include "generic.h"
static void __init
fixup_pleb(struct machine_desc *desc, struct param_struct *params,
fixup_pleb(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK(0, 0xc0000000, 16*1024*1024);
......
......@@ -17,7 +17,7 @@
static void __init
fixup_sherman(struct machine_desc *desc, struct param_struct *params,
fixup_sherman(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 64*1024*1024 );
......
......@@ -41,7 +41,7 @@ void clear_cs3_bit(int value)
}
static void __init
fixup_simpad(struct machine_desc *desc, struct param_struct *params,
fixup_simpad(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
#ifdef CONFIG_SA1100_SIMPAD_DRAM_64MB /* DRAM */
......
......@@ -74,7 +74,7 @@
/* init funcs */
static void __init fixup_system3(struct machine_desc *desc,
struct param_struct *params, char **cmdline, struct meminfo *mi);
struct tag *tags, char **cmdline, struct meminfo *mi);
static int __init system3_init(void);
static void __init system3_init_irq(void);
static void __init system3_map_io(void);
......@@ -87,8 +87,6 @@ static int sdram_notifier(struct notifier_block *nb, unsigned long event, void *
static void system3_lcd_power(int on);
static void system3_backlight_power(int on);
extern void convert_to_tag_list(struct param_struct *params, int mem_init);
/**********************************************************************
* global data
......@@ -239,7 +237,7 @@ static int sdram_notifier(struct notifier_block *nb, unsigned long event,
*
*/
static void __init fixup_system3(struct machine_desc *desc,
struct param_struct *params, char **cmdline, struct meminfo *mi)
struct tag *tags, char **cmdline, struct meminfo *mi)
{
DPRINTK( "%s\n", "START" );
......
......@@ -42,7 +42,7 @@ __initcall(victor_init);
static void __init
fixup_victor(struct machine_desc *desc, struct param_struct *params,
fixup_victor(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 4*1024*1024 );
......
......@@ -58,7 +58,7 @@ __initcall(xp860_init);
static void __init
fixup_xp860(struct machine_desc *desc, struct param_struct *params,
fixup_xp860(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
SET_BANK( 0, 0xc0000000, 32*1024*1024 );
......
......@@ -10,77 +10,12 @@
* Structure passed to kernel to tell it about the
* hardware it's running on. See linux/Documentation/arm/Setup
* for more info.
*
* NOTE:
* This file contains two ways to pass information from the boot
* loader to the kernel. The old struct param_struct is deprecated,
* but it will be kept in the kernel for 5 years from now
* (2001). This will allow boot loaders to convert to the new struct
* tag way.
*/
#ifndef __ASMARM_SETUP_H
#define __ASMARM_SETUP_H
/*
* Usage:
* - do not go blindly adding fields, add them at the end
* - when adding fields, don't rely on the address until
* a patch from me has been released
* - unused fields should be zero (for future expansion)
* - this structure is relatively short-lived - only
* guaranteed to contain useful data in setup_arch()
*/
#define COMMAND_LINE_SIZE 1024
/* This is the old deprecated way to pass parameters to the kernel */
struct param_struct {
union {
struct {
unsigned long page_size; /* 0 */
unsigned long nr_pages; /* 4 */
unsigned long ramdisk_size; /* 8 */
unsigned long flags; /* 12 */
#define FLAG_READONLY 1
#define FLAG_RDLOAD 4
#define FLAG_RDPROMPT 8
unsigned long rootdev; /* 16 */
unsigned long video_num_cols; /* 20 */
unsigned long video_num_rows; /* 24 */
unsigned long video_x; /* 28 */
unsigned long video_y; /* 32 */
unsigned long memc_control_reg; /* 36 */
unsigned char sounddefault; /* 40 */
unsigned char adfsdrives; /* 41 */
unsigned char bytes_per_char_h; /* 42 */
unsigned char bytes_per_char_v; /* 43 */
unsigned long pages_in_bank[4]; /* 44 */
unsigned long pages_in_vram; /* 60 */
unsigned long initrd_start; /* 64 */
unsigned long initrd_size; /* 68 */
unsigned long rd_start; /* 72 */
unsigned long system_rev; /* 76 */
unsigned long system_serial_low; /* 80 */
unsigned long system_serial_high; /* 84 */
unsigned long mem_fclk_21285; /* 88 */
} s;
char unused[256];
} u1;
union {
char paths[8][128];
struct {
unsigned long magic;
char n[1024 - sizeof(unsigned long)];
} s;
} u2;
char commandline[COMMAND_LINE_SIZE];
};
/*
* The new way of passing information: a list of tagged entries
*/
/* The list ends with an ATAG_NONE node. */
#define ATAG_NONE 0x00000000
......
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