From: michael Date: Sun, 24 Jul 2005 17:50:42 +0000 (+0000) Subject: update to kernel 2.6 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/linexec-j720/commitdiff_plain/ae778613553c3a62eef03e3a7a1e3a4935a5a1a0 update to kernel 2.6 --- diff --git a/setup.h b/setup.h index 46ca483..66eb117 100644 --- a/setup.h +++ b/setup.h @@ -8,88 +8,17 @@ * published by the Free Software Foundation. * * Structure passed to kernel to tell it about the - * hardware it's running on. See linux/Documentation/arm/Setup + * hardware it's running on. See 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 - -#define u32 UINT32 -#define u16 UINT16 -#define u8 UINT8 - - -/*#ifndef CONFIG_ACCEPT_GPL -#error This file covered by GPL but CONFIG_ACCEPT_GPL undefined. -#endif*/ +#define __ASMARM_SETUP_H +#define u32 UINT32 +#define u16 UINT16 +#define u8 UINT8 -/* - * 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 @@ -139,9 +68,14 @@ struct tag_ramdisk { u32 start; /* starting block of floppy-based RAM disk image */ }; -/* describes where the compressed ramdisk image lives */ -#define ATAG_INITRD 0x54410005 - +/* describes where the compressed ramdisk image lives (virtual address) */ +/* + * this one accidentally used virtual addresses - as such, + * it's deprecated. + */ +#define ATAG_INITRD 0x54410005 + +/* describes where the compressed ramdisk image lives (physical address) */ #define ATAG_INITRD2 0x54420005 struct tag_initrd { @@ -203,8 +137,6 @@ struct tag_acorn { u8 adfsdrives; }; -#define ATAG_PTABLE 0x53410001 - /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */ #define ATAG_MEMCLK 0x41000402 @@ -224,7 +156,6 @@ struct tag { struct tag_revision revision; struct tag_videolfb videolfb; struct tag_cmdline cmdline; -// struct tag_ptable ptable; /* * Acorn specific @@ -235,7 +166,6 @@ struct tag { * DC21285 specific */ struct tag_memclk memclk; - } u; }; @@ -244,7 +174,7 @@ struct tagtable { int (*parse)(const struct tag *); }; -#define __tag __attribute__((unused, __section__(".taglist"))) +#define __tag __attribute_used__ __attribute__((__section__(".taglist"))) #define __tagtable(tag, fn) \ static struct tagtable __tagtable_##fn __tag = { tag, fn } @@ -261,11 +191,14 @@ static struct tagtable __tagtable_##fn __tag = { tag, fn } /* * Memory map description */ -#define NR_BANKS 8 +#ifdef CONFIG_ARCH_LH7A40X +# define NR_BANKS 16 +#else +# define NR_BANKS 8 +#endif struct meminfo { int nr_banks; - unsigned long end; struct { unsigned long start; unsigned long size; @@ -273,6 +206,16 @@ struct meminfo { } bank[NR_BANKS]; }; -extern struct meminfo meminfo; +/* + * Early command line parameters. + */ +struct early_params { + const char *arg; + void (*fn)(char **p); +}; + +#define __early_param(name,fn) \ +static struct early_params __early_##fn __attribute_used__ \ +__attribute__((__section__("__early_param"))) = { name, fn } #endif