Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de1bb03a authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt
Browse files

Merge branch 'dt' into next

parents 11ee7e99 f459d63e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -211,7 +211,7 @@ static void __init update_fec_mac_prop(enum mac_oui oui)
		macaddr[4] = (val >> 8) & 0xff;
		macaddr[5] = (val >> 0) & 0xff;

		prom_update_property(np, newmac);
		of_update_property(np, newmac);
	}
}

+0 −47
Original line number Diff line number Diff line
#ifndef _PPC64_PSERIES_RECONFIG_H
#define _PPC64_PSERIES_RECONFIG_H
#ifdef __KERNEL__

#include <linux/notifier.h>

/*
 * Use this API if your code needs to know about OF device nodes being
 * added or removed on pSeries systems.
 */

#define PSERIES_RECONFIG_ADD		0x0001
#define PSERIES_RECONFIG_REMOVE		0x0002
#define PSERIES_DRCONF_MEM_ADD		0x0003
#define PSERIES_DRCONF_MEM_REMOVE	0x0004
#define PSERIES_UPDATE_PROPERTY		0x0005

/**
 * pSeries_reconfig_notify - Notifier value structure for OFDT property updates
 *
 * @node: Device tree node which owns the property being updated
 * @property: Updated property
 */
struct pSeries_reconfig_prop_update {
	struct device_node *node;
	struct property *property;
};

#ifdef CONFIG_PPC_PSERIES
extern int pSeries_reconfig_notifier_register(struct notifier_block *);
extern void pSeries_reconfig_notifier_unregister(struct notifier_block *);
extern int pSeries_reconfig_notify(unsigned long action, void *p);
/* Not the best place to put this, will be fixed when we move some
 * of the rtas suspend-me stuff to pseries */
extern void pSeries_coalesce_init(void);
#else /* !CONFIG_PPC_PSERIES */
static inline int pSeries_reconfig_notifier_register(struct notifier_block *nb)
{
	return 0;
}
static inline void pSeries_reconfig_notifier_unregister(struct notifier_block *nb) { }
static inline void pSeries_coalesce_init(void) { }
#endif /* CONFIG_PPC_PSERIES */


#endif /* __KERNEL__ */
#endif /* _PPC64_PSERIES_RECONFIG_H */
+16 −0
Original line number Diff line number Diff line
@@ -58,6 +58,22 @@ static inline int of_node_to_nid(struct device_node *device) { return 0; }

extern void of_instantiate_rtc(void);

/* The of_drconf_cell struct defines the layout of the LMB array
 * specified in the device tree property
 * ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory
 */
struct of_drconf_cell {
	u64	base_addr;
	u32	drc_index;
	u32	reserved;
	u32	aa_index;
	u32	flags;
};

#define DRCONF_MEM_ASSIGNED	0x00000008
#define DRCONF_MEM_AI_INVALID	0x00000040
#define DRCONF_MEM_RESERVED	0x00000080

/* These includes are put at the bottom because they may contain things
 * that are overridden by this file.  Ideally they shouldn't be included
 * by this file, but there are a bunch of .c files that currently depend
+5 −0
Original line number Diff line number Diff line
@@ -353,8 +353,13 @@ static inline int page_is_rtas_user_buf(unsigned long pfn)
		return 1;
	return 0;
}

/* Not the best place to put pSeries_coalesce_init, will be fixed when we
 * move some of the rtas suspend-me stuff to pseries */
extern void pSeries_coalesce_init(void);
#else
static inline int page_is_rtas_user_buf(unsigned long pfn) { return 0;}
static inline void pSeries_coalesce_init(void) { }
#endif

extern int call_rtas(const char *, int, int, unsigned long *, ...);
+7 −7
Original line number Diff line number Diff line
@@ -218,23 +218,23 @@ static void __init export_crashk_values(struct device_node *node)
	 * be sure what's in them, so remove them. */
	prop = of_find_property(node, "linux,crashkernel-base", NULL);
	if (prop)
		prom_remove_property(node, prop);
		of_remove_property(node, prop);

	prop = of_find_property(node, "linux,crashkernel-size", NULL);
	if (prop)
		prom_remove_property(node, prop);
		of_remove_property(node, prop);

	if (crashk_res.start != 0) {
		prom_add_property(node, &crashk_base_prop);
		of_add_property(node, &crashk_base_prop);
		crashk_size = resource_size(&crashk_res);
		prom_add_property(node, &crashk_size_prop);
		of_add_property(node, &crashk_size_prop);
	}

	/*
	 * memory_limit is required by the kexec-tools to limit the
	 * crash regions to the actual memory used.
	 */
	prom_update_property(node, &memory_limit_prop);
	of_update_property(node, &memory_limit_prop);
}

static int __init kexec_setup(void)
@@ -249,11 +249,11 @@ static int __init kexec_setup(void)
	/* remove any stale properties so ours can be found */
	prop = of_find_property(node, kernel_end_prop.name, NULL);
	if (prop)
		prom_remove_property(node, prop);
		of_remove_property(node, prop);

	/* information needed by userspace when using default_machine_kexec */
	kernel_end = __pa(_end);
	prom_add_property(node, &kernel_end_prop);
	of_add_property(node, &kernel_end_prop);

	export_crashk_values(node);

Loading