Commit 0744a3ee authored by Russell King's avatar Russell King

ARM: platform fixups: remove mdesc argument to fixup function

Get rid of the mdesc pointer in the fixup function call.  No one uses
the mdesc pointer, it shouldn't be modified anyway, and we can't wrap
it, so let's remove it.

Platform files found by:

  $ regexp=$(git grep -h '\.fixup.*=' arch/arm |
		sed 's!.*= *\([^,]*\),* *!\1!' | sort -u |
		tr '\n' '|' | sed 's,|$,,;s,|,\\|,g')
  $ git grep $regexp arch/arm
Acked-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 87e040b6
...@@ -34,8 +34,7 @@ struct machine_desc { ...@@ -34,8 +34,7 @@ struct machine_desc {
unsigned int reserve_lp1 :1; /* never has lp1 */ unsigned int reserve_lp1 :1; /* never has lp1 */
unsigned int reserve_lp2 :1; /* never has lp2 */ unsigned int reserve_lp2 :1; /* never has lp2 */
unsigned int soft_reboot :1; /* soft reboot */ unsigned int soft_reboot :1; /* soft reboot */
void (*fixup)(struct machine_desc *, void (*fixup)(struct tag *, char **,
struct tag *, char **,
struct meminfo *); struct meminfo *);
void (*reserve)(void);/* reserve mem blocks */ void (*reserve)(void);/* reserve mem blocks */
void (*map_io)(void);/* IO mapping function */ void (*map_io)(void);/* IO mapping function */
......
...@@ -879,7 +879,7 @@ static struct machine_desc * __init setup_machine_tags(unsigned int nr) ...@@ -879,7 +879,7 @@ static struct machine_desc * __init setup_machine_tags(unsigned int nr)
} }
if (mdesc->fixup) if (mdesc->fixup)
mdesc->fixup(mdesc, tags, &from, &meminfo); mdesc->fixup(tags, &from, &meminfo);
if (tags->hdr.tag == ATAG_CORE) { if (tags->hdr.tag == ATAG_CORE) {
if (meminfo.nr_banks != 0) if (meminfo.nr_banks != 0)
......
...@@ -136,8 +136,8 @@ static void __init bcmring_init_machine(void) ...@@ -136,8 +136,8 @@ static void __init bcmring_init_machine(void)
* *
*****************************************************************************/ *****************************************************************************/
static void __init bcmring_fixup(struct machine_desc *desc, static void __init bcmring_fixup(struct tag *t, char **cmdline,
struct tag *t, char **cmdline, struct meminfo *mi) { struct meminfo *mi) {
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
printk(KERN_NOTICE "bcmring_fixup\n"); printk(KERN_NOTICE "bcmring_fixup\n");
t->hdr.tag = ATAG_CORE; t->hdr.tag = ATAG_CORE;
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
#include "common.h" #include "common.h"
static void __init static void __init
fixup_clep7312(struct machine_desc *desc, struct tag *tags, fixup_clep7312(struct tag *tags, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
mi->nr_banks=1; mi->nr_banks=1;
mi->bank[0].start = 0xc0000000; mi->bank[0].start = 0xc0000000;
......
...@@ -37,8 +37,7 @@ static void __init edb7211_reserve(void) ...@@ -37,8 +37,7 @@ static void __init edb7211_reserve(void)
} }
static void __init static void __init
fixup_edb7211(struct machine_desc *desc, struct tag *tags, fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
/* /*
* Bank start addresses are not present in the information * Bank start addresses are not present in the information
......
...@@ -57,8 +57,7 @@ typedef struct tag_IMAGE_PARAMS ...@@ -57,8 +57,7 @@ typedef struct tag_IMAGE_PARAMS
#define IMAGE_PARAMS_PHYS 0xC01F0000 #define IMAGE_PARAMS_PHYS 0xC01F0000
static void __init static void __init
fortunet_fixup(struct machine_desc *desc, struct tag *tags, fortunet_fixup(struct tag *tags, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
IMAGE_PARAMS *ip = phys_to_virt(IMAGE_PARAMS_PHYS); IMAGE_PARAMS *ip = phys_to_virt(IMAGE_PARAMS_PHYS);
*cmdline = phys_to_virt(ip->command_line); *cmdline = phys_to_virt(ip->command_line);
......
...@@ -56,8 +56,7 @@ static struct map_desc p720t_io_desc[] __initdata = { ...@@ -56,8 +56,7 @@ static struct map_desc p720t_io_desc[] __initdata = {
}; };
static void __init static void __init
fixup_p720t(struct machine_desc *desc, struct tag *tag, fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
/* /*
* Our bootloader doesn't setup any tags (yet). * Our bootloader doesn't setup any tags (yet).
......
...@@ -76,8 +76,7 @@ __initcall(cats_hw_init); ...@@ -76,8 +76,7 @@ __initcall(cats_hw_init);
* hard reboots fail on early boards. * hard reboots fail on early boards.
*/ */
static void __init static void __init
fixup_cats(struct machine_desc *desc, struct tag *tags, fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
screen_info.orig_video_lines = 25; screen_info.orig_video_lines = 25;
screen_info.orig_video_points = 16; screen_info.orig_video_points = 16;
......
...@@ -631,8 +631,7 @@ __initcall(nw_hw_init); ...@@ -631,8 +631,7 @@ __initcall(nw_hw_init);
* the parameter page. * the parameter page.
*/ */
static void __init static void __init
fixup_netwinder(struct machine_desc *desc, struct tag *tags, fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
#ifdef CONFIG_ISAPNP #ifdef CONFIG_ISAPNP
extern int isapnp_disable; extern int isapnp_disable;
......
...@@ -78,8 +78,8 @@ static void __init halibut_init(void) ...@@ -78,8 +78,8 @@ static void __init halibut_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
static void __init halibut_fixup(struct machine_desc *desc, struct tag *tags, static void __init halibut_fixup(struct tag *tags, char **cmdline,
char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
mi->nr_banks=1; mi->nr_banks=1;
mi->bank[0].start = PHYS_OFFSET; mi->bank[0].start = PHYS_OFFSET;
......
...@@ -53,8 +53,8 @@ static void __init mahimahi_init(void) ...@@ -53,8 +53,8 @@ static void __init mahimahi_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
static void __init mahimahi_fixup(struct machine_desc *desc, struct tag *tags, static void __init mahimahi_fixup(struct tag *tags, char **cmdline,
char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
mi->nr_banks = 2; mi->nr_banks = 2;
mi->bank[0].start = PHYS_OFFSET; mi->bank[0].start = PHYS_OFFSET;
......
...@@ -77,8 +77,8 @@ static struct map_desc sapphire_io_desc[] __initdata = { ...@@ -77,8 +77,8 @@ static struct map_desc sapphire_io_desc[] __initdata = {
} }
}; };
static void __init sapphire_fixup(struct machine_desc *desc, struct tag *tags, static void __init sapphire_fixup(struct tag *tags, char **cmdline,
char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
int smi_sz = parse_tag_smi((const struct tag *)tags); int smi_sz = parse_tag_smi((const struct tag *)tags);
......
...@@ -48,8 +48,8 @@ static void __init trout_init_irq(void) ...@@ -48,8 +48,8 @@ static void __init trout_init_irq(void)
msm_init_irq(); msm_init_irq();
} }
static void __init trout_fixup(struct machine_desc *desc, struct tag *tags, static void __init trout_fixup(struct tag *tags, char **cmdline,
char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
mi->nr_banks = 1; mi->nr_banks = 1;
mi->bank[0].start = PHYS_OFFSET; mi->bank[0].start = PHYS_OFFSET;
......
...@@ -308,8 +308,8 @@ void __init orion5x_init(void) ...@@ -308,8 +308,8 @@ void __init orion5x_init(void)
* Many orion-based systems have buggy bootloader implementations. * Many orion-based systems have buggy bootloader implementations.
* This is a common fixup for bogus memory tags. * This is a common fixup for bogus memory tags.
*/ */
void __init tag_fixup_mem32(struct machine_desc *mdesc, struct tag *t, void __init tag_fixup_mem32(struct tag *t, char **from,
char **from, struct meminfo *meminfo) struct meminfo *meminfo)
{ {
for (; t->hdr.size; t = tag_next(t)) for (; t->hdr.size; t = tag_next(t))
if (t->hdr.tag == ATAG_MEM && if (t->hdr.tag == ATAG_MEM &&
......
...@@ -53,11 +53,9 @@ int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); ...@@ -53,11 +53,9 @@ int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys);
struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
struct machine_desc;
struct meminfo; struct meminfo;
struct tag; struct tag;
extern void __init tag_fixup_mem32(struct machine_desc *, struct tag *, extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *);
char **, struct meminfo *);
#endif #endif
...@@ -839,8 +839,8 @@ static void __init cm_x300_init(void) ...@@ -839,8 +839,8 @@ static void __init cm_x300_init(void)
cm_x300_init_bl(); cm_x300_init_bl();
} }
static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags, static void __init cm_x300_fixup(struct tag *tags, char **cmdline,
char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
/* Make sure that mi->bank[0].start = PHYS_ADDR */ /* Make sure that mi->bank[0].start = PHYS_ADDR */
for (; tags->hdr.size; tags = tag_next(tags)) for (; tags->hdr.size; tags = tag_next(tags))
......
...@@ -705,8 +705,8 @@ static void __init corgi_init(void) ...@@ -705,8 +705,8 @@ static void __init corgi_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
static void __init fixup_corgi(struct machine_desc *desc, static void __init fixup_corgi(struct tag *tags, char **cmdline,
struct tag *tags, char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
sharpsl_save_param(); sharpsl_save_param();
mi->nr_banks=1; mi->nr_banks=1;
......
...@@ -41,8 +41,7 @@ ...@@ -41,8 +41,7 @@
#include "clock.h" #include "clock.h"
/* Only e800 has 128MB RAM */ /* Only e800 has 128MB RAM */
void __init eseries_fixup(struct machine_desc *desc, void __init eseries_fixup(struct tag *tags, char **cmdline, struct meminfo *mi)
struct tag *tags, char **cmdline, struct meminfo *mi)
{ {
mi->nr_banks=1; mi->nr_banks=1;
mi->bank[0].start = 0xa0000000; mi->bank[0].start = 0xa0000000;
......
void __init eseries_fixup(struct machine_desc *desc, void __init eseries_fixup(struct tag *tags, char **cmdline, struct meminfo *mi);
struct tag *tags, char **cmdline, struct meminfo *mi);
extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info; extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info;
extern struct pxaficp_platform_data e7xx_ficp_platform_data; extern struct pxaficp_platform_data e7xx_ficp_platform_data;
......
...@@ -454,8 +454,8 @@ static void __init poodle_init(void) ...@@ -454,8 +454,8 @@ static void __init poodle_init(void)
poodle_init_spi(); poodle_init_spi();
} }
static void __init fixup_poodle(struct machine_desc *desc, static void __init fixup_poodle(struct tag *tags, char **cmdline,
struct tag *tags, char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
sharpsl_save_param(); sharpsl_save_param();
mi->nr_banks=1; mi->nr_banks=1;
......
...@@ -970,8 +970,8 @@ static void __init spitz_init(void) ...@@ -970,8 +970,8 @@ static void __init spitz_init(void)
spitz_i2c_init(); spitz_i2c_init();
} }
static void __init spitz_fixup(struct machine_desc *desc, static void __init spitz_fixup(struct tag *tags, char **cmdline,
struct tag *tags, char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
sharpsl_save_param(); sharpsl_save_param();
mi->nr_banks = 1; mi->nr_banks = 1;
......
...@@ -960,8 +960,8 @@ static void __init tosa_init(void) ...@@ -960,8 +960,8 @@ static void __init tosa_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
static void __init fixup_tosa(struct machine_desc *desc, static void __init fixup_tosa(struct tag *tags, char **cmdline,
struct tag *tags, char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
sharpsl_save_param(); sharpsl_save_param();
mi->nr_banks=1; mi->nr_banks=1;
......
...@@ -517,8 +517,7 @@ void __init realview_timer_init(unsigned int timer_irq) ...@@ -517,8 +517,7 @@ void __init realview_timer_init(unsigned int timer_irq)
/* /*
* Setup the memory banks. * Setup the memory banks.
*/ */
void realview_fixup(struct machine_desc *mdesc, struct tag *tags, char **from, void realview_fixup(struct tag *tags, char **from, struct meminfo *meminfo)
struct meminfo *meminfo)
{ {
/* /*
* Most RealView platforms have 512MB contiguous RAM at 0x70000000. * Most RealView platforms have 512MB contiguous RAM at 0x70000000.
......
...@@ -63,8 +63,8 @@ extern int realview_flash_register(struct resource *res, u32 num); ...@@ -63,8 +63,8 @@ extern int realview_flash_register(struct resource *res, u32 num);
extern int realview_eth_register(const char *name, struct resource *res); extern int realview_eth_register(const char *name, struct resource *res);
extern int realview_usb_register(struct resource *res); extern int realview_usb_register(struct resource *res);
extern void realview_init_early(void); extern void realview_init_early(void);
extern void realview_fixup(struct machine_desc *mdesc, struct tag *tags, extern void realview_fixup(struct tag *tags, char **from,
char **from, struct meminfo *meminfo); struct meminfo *meminfo);
extern void (*realview_reset)(char); extern void (*realview_reset)(char);
#endif #endif
...@@ -316,8 +316,7 @@ static void realview_pb1176_reset(char mode) ...@@ -316,8 +316,7 @@ static void realview_pb1176_reset(char mode)
__raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl); __raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl);
} }
static void realview_pb1176_fixup(struct machine_desc *mdesc, static void realview_pb1176_fixup(struct tag *tags, char **from,
struct tag *tags, char **from,
struct meminfo *meminfo) struct meminfo *meminfo)
{ {
/* /*
......
...@@ -319,8 +319,8 @@ static struct sys_timer realview_pbx_timer = { ...@@ -319,8 +319,8 @@ static struct sys_timer realview_pbx_timer = {
.init = realview_pbx_timer_init, .init = realview_pbx_timer_init,
}; };
static void realview_pbx_fixup(struct machine_desc *mdesc, struct tag *tags, static void realview_pbx_fixup(struct tag *tags, char **from,
char **from, struct meminfo *meminfo) struct meminfo *meminfo)
{ {
#ifdef CONFIG_SPARSEMEM #ifdef CONFIG_SPARSEMEM
/* /*
...@@ -335,7 +335,7 @@ static void realview_pbx_fixup(struct machine_desc *mdesc, struct tag *tags, ...@@ -335,7 +335,7 @@ static void realview_pbx_fixup(struct machine_desc *mdesc, struct tag *tags,
meminfo->bank[2].size = SZ_256M; meminfo->bank[2].size = SZ_256M;
meminfo->nr_banks = 3; meminfo->nr_banks = 3;
#else #else
realview_fixup(mdesc, tags, from, meminfo); realview_fixup(tags, from, meminfo);
#endif #endif
} }
......
...@@ -92,8 +92,7 @@ static struct platform_device *smdk2413_devices[] __initdata = { ...@@ -92,8 +92,7 @@ static struct platform_device *smdk2413_devices[] __initdata = {
&s3c_device_usbgadget, &s3c_device_usbgadget,
}; };
static void __init smdk2413_fixup(struct machine_desc *desc, static void __init smdk2413_fixup(struct tag *tags, char **cmdline,
struct tag *tags, char **cmdline,
struct meminfo *mi) struct meminfo *mi)
{ {
if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) {
......
...@@ -129,9 +129,8 @@ static struct platform_device *vstms_devices[] __initdata = { ...@@ -129,9 +129,8 @@ static struct platform_device *vstms_devices[] __initdata = {
&s3c_device_nand, &s3c_device_nand,
}; };
static void __init vstms_fixup(struct machine_desc *desc, static void __init vstms_fixup(struct tag *tags, char **cmdline,
struct tag *tags, char **cmdline, struct meminfo *mi)
struct meminfo *mi)
{ {
if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) {
mi->nr_banks=1; mi->nr_banks=1;
......
...@@ -301,8 +301,7 @@ static void __init get_assabet_scr(void) ...@@ -301,8 +301,7 @@ static void __init get_assabet_scr(void)
} }
static void __init static void __init
fixup_assabet(struct machine_desc *desc, struct tag *tags, fixup_assabet(struct tag *tags, char **cmdline, struct meminfo *mi)
char **cmdline, struct meminfo *mi)
{ {
/* This must be done before any call to machine_has_neponset() */ /* This must be done before any call to machine_has_neponset() */
map_sa1100_gpio_regs(); map_sa1100_gpio_regs();
......
...@@ -123,8 +123,8 @@ static struct platform_device *harmony_devices[] __initdata = { ...@@ -123,8 +123,8 @@ static struct platform_device *harmony_devices[] __initdata = {
&harmony_audio_device, &harmony_audio_device,
}; };
static void __init tegra_harmony_fixup(struct machine_desc *desc, static void __init tegra_harmony_fixup(struct tag *tags, char **cmdline,
struct tag *tags, char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
mi->nr_banks = 2; mi->nr_banks = 2;
mi->bank[0].start = PHYS_OFFSET; mi->bank[0].start = PHYS_OFFSET;
......
...@@ -84,8 +84,8 @@ static void paz00_usb_init(void) ...@@ -84,8 +84,8 @@ static void paz00_usb_init(void)
platform_device_register(&tegra_ehci3_device); platform_device_register(&tegra_ehci3_device);
} }
static void __init tegra_paz00_fixup(struct machine_desc *desc, static void __init tegra_paz00_fixup(struct tag *tags, char **cmdline,
struct tag *tags, char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
mi->nr_banks = 1; mi->nr_banks = 1;
mi->bank[0].start = PHYS_OFFSET; mi->bank[0].start = PHYS_OFFSET;
......
...@@ -126,8 +126,8 @@ static void trimslice_usb_init(void) ...@@ -126,8 +126,8 @@ static void trimslice_usb_init(void)
platform_device_register(&tegra_ehci1_device); platform_device_register(&tegra_ehci1_device);
} }
static void __init tegra_trimslice_fixup(struct machine_desc *desc, static void __init tegra_trimslice_fixup(struct tag *tags, char **cmdline,
struct tag *tags, char **cmdline, struct meminfo *mi) struct meminfo *mi)
{ {
mi->nr_banks = 2; mi->nr_banks = 2;
mi->bank[0].start = PHYS_OFFSET; mi->bank[0].start = PHYS_OFFSET;
......
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